mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat: Add credentials E2E test suite and page object (#4596)
* fix: Fix inferred type of X cannot be named error after pnpm update * feat: Change page objects to expose actions and getters. Add credential creation suite
This commit is contained in:
@@ -1,15 +1,6 @@
|
||||
import { IE2ETestPage, IE2ETestPageElement } from "../types";
|
||||
|
||||
|
||||
export class BasePage implements IE2ETestPage {
|
||||
elements: Record<string, IE2ETestPageElement> = {};
|
||||
get(id: keyof BasePage['elements'], ...args: unknown[]): ReturnType<IE2ETestPageElement> {
|
||||
const getter = this.elements[id];
|
||||
|
||||
if (!getter) {
|
||||
throw new Error(`No element with id "${id}" found. Check your page object definition.`);
|
||||
}
|
||||
|
||||
return getter(...args);
|
||||
}
|
||||
getters: Record<string, IE2ETestPageElement> = {};
|
||||
actions: Record<string, (...args: any[]) => void> = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user