From f571e24fb3a7495b6c84c17e84c4b88912908e71 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Mon, 8 Jul 2024 12:48:46 -0700 Subject: [PATCH] Playwright enable advanced settings and capture full settings page screenshot --- test/playwright/visual.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/playwright/visual.spec.js b/test/playwright/visual.spec.js index 579c2d0b3b..2fd88098d8 100644 --- a/test/playwright/visual.spec.js +++ b/test/playwright/visual.spec.js @@ -37,6 +37,18 @@ test('visual', async ({page, extensionId}) => { // Take a simple screenshot of the settings page await expect.soft(page).toHaveScreenshot('settings-fresh.png', {mask: [storage_locator]}); + // Enable advanced settings + await page.locator('input#advanced-checkbox').check(); + + // Wait for any animations or changes to complete + await page.waitForTimeout(500); + + // Take a full page screenshot of the settings page with advanced settings enabled + await expect.soft(page).toHaveScreenshot('settings-fresh-full-advanced.png', { + fullPage: true, + mask: [storage_locator], + }); + // Load in jmdict_english.zip await page.locator('input[id="dictionary-import-file-input"]').setInputFiles(path.join(root, 'dictionaries/jmdict_english.zip')); await expect(page.locator('id=dictionaries')).toHaveText('Dictionaries (1 installed, 1 enabled)', {timeout: 5 * 60 * 1000});