mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Add colorPalette cleanup for playwright test (#907)
This commit is contained in:
@@ -135,13 +135,17 @@ test.describe('Color Palette', () => {
|
|||||||
await comfyPage.setSetting('Comfy.CustomColorPalettes', customColorPalettes)
|
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 }) => {
|
test('Can show custom color palette', async ({ comfyPage }) => {
|
||||||
await comfyPage.setSetting('Comfy.ColorPalette', 'custom_obsidian_dark')
|
await comfyPage.setSetting('Comfy.ColorPalette', 'custom_obsidian_dark')
|
||||||
await comfyPage.nextFrame()
|
await comfyPage.nextFrame()
|
||||||
await expect(comfyPage.canvas).toHaveScreenshot(
|
await expect(comfyPage.canvas).toHaveScreenshot(
|
||||||
'custom-color-palette-obsidian-dark.png'
|
'custom-color-palette-obsidian-dark.png'
|
||||||
)
|
)
|
||||||
// Reset to default color palette for other tests
|
|
||||||
await comfyPage.setSetting('Comfy.ColorPalette', 'dark')
|
await comfyPage.setSetting('Comfy.ColorPalette', 'dark')
|
||||||
await comfyPage.nextFrame()
|
await comfyPage.nextFrame()
|
||||||
await expect(comfyPage.canvas).toHaveScreenshot('default-color-palette.png')
|
await expect(comfyPage.canvas).toHaveScreenshot('default-color-palette.png')
|
||||||
|
|||||||
Reference in New Issue
Block a user