Migrate user-onboarding-*.spec.ts from Cypress to Playwright (#11927)

Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: Johannes Marbach <johannesm@element.io>
Co-authored-by: Milton Moura <miltonmoura@gmail.com>
This commit is contained in:
Michael Telatynski 2023-11-27 12:11:00 +00:00 committed by GitHub
parent 87f1ae4665
commit d827723b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 314 additions and 273 deletions

View file

@ -23,6 +23,7 @@ import type { IConfigOptions } from "../src/IConfigOptions";
import { Credentials, HomeserverInstance, StartHomeserverOpts } from "./plugins/utils/homeserver";
import { Synapse } from "./plugins/synapse";
import { Instance } from "./plugins/mailhog";
import { ElementAppPage } from "./pages/ElementAppPage";
import { OAuthServer } from "./plugins/oauth_server";
import { Toasts } from "./pages/toasts";
@ -60,6 +61,7 @@ export const test = base.extend<
displayName: string;
};
displayName?: string;
app: ElementAppPage;
mailhog?: { api: mailhog.API; instance: Instance };
toasts: Toasts;
}
@ -150,6 +152,9 @@ export const test = base.extend<
expect(results.violations).toEqual([]);
}),
app: async ({ page }, use) => {
await use(new ElementAppPage(page));
},
toasts: async ({ page }, use) => {
await use(new Toasts(page));
},