From 82d03b5c1b37ef031e23d27d07eed1860b112c8c Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 22 Sep 2024 08:53:01 +0900 Subject: [PATCH] Add colorPalette cleanup for playwright test (#907) --- browser_tests/colorPalette.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser_tests/colorPalette.spec.ts b/browser_tests/colorPalette.spec.ts index bd5922d4b..2885d7289 100644 --- a/browser_tests/colorPalette.spec.ts +++ b/browser_tests/colorPalette.spec.ts @@ -135,13 +135,17 @@ test.describe('Color Palette', () => { await comfyPage.setSetting('Comfy.CustomColorPalettes', customColorPalettes) }) + test.afterEach(async ({ comfyPage }) => { + await comfyPage.setSetting('Comfy.CustomColorPalettes', {}) + await comfyPage.setSetting('Comfy.ColorPalette', 'dark') + }) + test('Can show custom color palette', async ({ comfyPage }) => { await comfyPage.setSetting('Comfy.ColorPalette', 'custom_obsidian_dark') await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot( 'custom-color-palette-obsidian-dark.png' ) - // Reset to default color palette for other tests await comfyPage.setSetting('Comfy.ColorPalette', 'dark') await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot('default-color-palette.png')