Migrate analytics-toast.spec.ts from Cypress to Playwright (#11939)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2023-11-27 10:00:16 +00:00 committed by GitHub
parent 6f50405e34
commit 40aa5ad0fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 119 additions and 98 deletions

View file

@ -24,6 +24,7 @@ import { Credentials, HomeserverInstance, StartHomeserverOpts } from "./plugins/
import { Synapse } from "./plugins/synapse";
import { Instance } from "./plugins/mailhog";
import { OAuthServer } from "./plugins/oauth_server";
import { Toasts } from "./pages/toasts";
const CONFIG_JSON: Partial<IConfigOptions> = {
// This is deliberately quite a minimal config.json, so that we can test that the default settings
@ -60,6 +61,7 @@ export const test = base.extend<
};
displayName?: string;
mailhog?: { api: mailhog.API; instance: Instance };
toasts: Toasts;
}
>({
crypto: ["legacy", { option: true }],
@ -147,6 +149,10 @@ export const test = base.extend<
expect(results.violations).toEqual([]);
}),
toasts: async ({ page }, use) => {
await use(new Toasts(page));
},
});
test.use({});