2024-03-06 22:26:03 +08:00
|
|
|
const { test } = require('../fixtures');
|
2023-09-01 04:21:48 +08:00
|
|
|
const { fullyParallel } = require('../playwright.config');
|
2022-08-15 21:37:54 +08:00
|
|
|
const { Options } = require('./options');
|
2024-01-20 00:42:01 +08:00
|
|
|
const { initializePages } = require('../core/helpers');
|
2024-03-13 21:28:39 +08:00
|
|
|
const { encodeCustomParams } = require('../parameters/util');
|
|
|
|
const { PARAMETER_HIDE_PRESENTATION_TOAST } = require('../core/constants');
|
|
|
|
|
|
|
|
const hidePresentationToast = encodeCustomParams(PARAMETER_HIDE_PRESENTATION_TOAST);
|
2023-09-01 04:21:48 +08:00
|
|
|
|
|
|
|
test.describe('Options', () => {
|
2023-04-24 20:44:25 +08:00
|
|
|
const options = new Options();
|
2024-01-20 00:42:01 +08:00
|
|
|
|
|
|
|
test.describe.configure({ mode: fullyParallel ? 'parallel' : 'serial' });
|
|
|
|
test[fullyParallel ? 'beforeEach' : 'beforeAll'](async ({ browser }) => {
|
2024-03-21 21:22:02 +08:00
|
|
|
await initializePages(options, browser, { joinParameter: hidePresentationToast });
|
2023-04-25 04:52:47 +08:00
|
|
|
});
|
2023-04-24 20:44:25 +08:00
|
|
|
|
|
|
|
test('Open about modal', async () => {
|
|
|
|
await options.openedAboutModal();
|
2022-08-15 20:37:52 +08:00
|
|
|
});
|
2022-09-12 20:33:53 +08:00
|
|
|
|
2023-04-24 20:44:25 +08:00
|
|
|
test('Open Help Button', async () => {
|
2024-03-06 22:26:03 +08:00
|
|
|
await options.openHelp();
|
2023-04-24 20:44:25 +08:00
|
|
|
});
|
|
|
|
|
2023-04-25 04:52:47 +08:00
|
|
|
test('Locales test', async () => {
|
|
|
|
await options.localesTest();
|
2022-08-15 20:37:52 +08:00
|
|
|
});
|
2022-11-11 04:25:18 +08:00
|
|
|
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Dark mode', { tag: ['@ci', '@flaky'] }, async () => {
|
2023-04-25 04:52:47 +08:00
|
|
|
await options.darkMode();
|
2022-11-11 04:25:18 +08:00
|
|
|
});
|
2023-01-19 00:29:45 +08:00
|
|
|
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Font size', { tag: ['@ci', '@flaky'] }, async () => {
|
2023-04-25 04:52:47 +08:00
|
|
|
await options.fontSizeTest();
|
2023-01-19 00:29:45 +08:00
|
|
|
});
|
2023-04-04 04:21:24 +08:00
|
|
|
});
|