Skip to content

Commit 7423ab9

Browse files
force ordering of tests
1 parent d5b7192 commit 7423ab9

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed
File renamed without changes.

tests/integration/installWizard.spec.ts renamed to tests/integration/002-installWizard.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import { expect } from '@playwright/test';
22

33
import { test } from './testExtensions';
44

5-
test.describe('Install Wizard', () => {
5+
// Configure installation tests to run serially
6+
test.describe.configure({ mode: 'serial' });
7+
8+
// Use test.describe.serial to ensure tests run in order
9+
test.describe.serial('Install Wizard', () => {
610
test('can click through first time installer', async ({ installWizard, window, attachScreenshot }) => {
711
await attachScreenshot('screenshot-app-start');
812

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { test } from './testExtensions';
4+
5+
test.describe('App Window', () => {
6+
test.beforeAll(async ({ installWizard }) => {
7+
await installWizard.stepThroughOnboarding();
8+
});
9+
10+
test('App window has title', async ({ app }) => {
11+
const window = await app.firstWindow();
12+
await expect(window).toHaveTitle('ComfyUI');
13+
});
14+
15+
test('App quits when window is closed', async ({ app }) => {
16+
const window = await app.firstWindow();
17+
18+
await window.close();
19+
await app.app.waitForEvent('close');
20+
});
21+
22+
test('beforeunload dialog should not block app quit with unsaved changes', async ({ installedApp }) => {
23+
await installedApp.waitUntilLoaded();
24+
25+
// Create a workflow and add unsaved changes
26+
await installedApp.createBlankWorkflow();
27+
await installedApp.saveWorkflow();
28+
await installedApp.addFirstNodeResult();
29+
30+
// Verify that closing with unsaved changes doesn't trigger beforeunload dialog
31+
// (https://github.com/Comfy-Org/desktop/issues/688)
32+
await installedApp.window.close({
33+
runBeforeUnload: true,
34+
});
35+
await installedApp.window.waitForEvent('close');
36+
});
37+
});

tests/integration/appWindow.spec.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

tests/integration/testInstalledApp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ export class TestInstalledApp {
1919
}).toPass({ timeout, intervals: [500] });
2020
}
2121

22-
/** Creates a new blank workflow using the button in the tabs */
22+
/** Creates a new blank workflow */
2323
async createBlankWorkflow() {
2424
const newWorkflowButton = this.window.getByLabel('Create a new blank workflow');
2525
await newWorkflowButton.click();
2626
}
2727

28-
/** Saves the current workflow using keyboard shortcuts. */
28+
/** Saves the current workflow */
2929
async saveWorkflow() {
3030
await this.window.keyboard.press('Control+S');
3131
await this.window.waitForSelector('#global-prompt', { state: 'visible' });

0 commit comments

Comments
 (0)