mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
ci: Migrate workflow tests to Playwright (#17370)
This commit is contained in:
@@ -12,7 +12,7 @@ import { TestError } from '../Types';
|
||||
|
||||
export interface LoginResponseData {
|
||||
id: string;
|
||||
[key: string]: any;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type UserRole = 'owner' | 'admin' | 'member';
|
||||
@@ -182,15 +182,15 @@ export class ApiHelpers {
|
||||
throw new TestError(errorText);
|
||||
}
|
||||
|
||||
let responseData: any;
|
||||
let responseData: unknown;
|
||||
try {
|
||||
responseData = await response.json();
|
||||
} catch (error) {
|
||||
} catch (error: unknown) {
|
||||
const errorText = await response.text();
|
||||
throw new TestError(errorText);
|
||||
}
|
||||
|
||||
const loginData: LoginResponseData = responseData.data;
|
||||
const loginData: LoginResponseData = (responseData as { data: LoginResponseData }).data;
|
||||
|
||||
if (!loginData?.id) {
|
||||
throw new TestError('Login did not return expected user data (missing user ID)');
|
||||
|
||||
Reference in New Issue
Block a user