mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test: Migrate UI tests from Cypress -> Playwright (no-changelog) (#18201)
This commit is contained in:
@@ -144,6 +144,41 @@ export class ApiHelpers {
|
||||
});
|
||||
}
|
||||
|
||||
// ===== FEATURE FLAG METHODS =====
|
||||
|
||||
async setEnvFeatureFlags(flags: Record<string, string>): Promise<{
|
||||
data: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
flags: Record<string, string>;
|
||||
};
|
||||
}> {
|
||||
const response = await this.request.patch('/rest/e2e/env-feature-flags', {
|
||||
data: { flags },
|
||||
});
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
async clearEnvFeatureFlags(): Promise<{
|
||||
data: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
flags: Record<string, string>;
|
||||
};
|
||||
}> {
|
||||
const response = await this.request.patch('/rest/e2e/env-feature-flags', {
|
||||
data: { flags: {} },
|
||||
});
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
async getEnvFeatureFlags(): Promise<{
|
||||
data: Record<string, string>;
|
||||
}> {
|
||||
const response = await this.request.get('/rest/e2e/env-feature-flags');
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
// ===== CONVENIENCE METHODS =====
|
||||
|
||||
async enableFeature(feature: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user