From 927a7510061851fba9c82ccbf0fc76594e8e01b4 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Thu, 5 Dec 2024 15:29:26 -0800 Subject: [PATCH 01/15] Test --- .github/workflows/test_windows.yml | 24 +++++++++++++++++++++++ playwright.config.ts | 5 +++-- playwright.setup.ts | 31 ++++++++++++++++++++++++++++++ scripts/launchdev.js | 3 ++- tests/integration/example.spec.ts | 22 +++++++++++++++++++++ 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test_windows.yml create mode 100644 playwright.setup.ts create mode 100644 tests/integration/example.spec.ts diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 00000000..38c90dbc --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,24 @@ +name: Playwright App Windows Test + +on: + workflow_dispatch: + workflow_call: + +jobs: + build-windows-debug: + runs-on: windows-latest + steps: + - name: Github checkout + uses: actions/checkout@v4 + - name: Declare some variables + run: | + echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" + shell: bash + - name: Build + uses: ./.github/actions/build/windows/app + with: + build-gpu: 'cpu' + sign-and-publish: false + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Run Playwright Tests + run: npm run test:e2e diff --git a/playwright.config.ts b/playwright.config.ts index 6d972f45..56d275bf 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ - testMatch: 'src/__tests__/e2e/*.test.ts', - timeout: 1000000, + testDir: './tests/integration', + /* Run local instance before starting the tests */ + globalSetup: require.resolve('./playwright.setup'), }); diff --git a/playwright.setup.ts b/playwright.setup.ts new file mode 100644 index 00000000..4c1013e4 --- /dev/null +++ b/playwright.setup.ts @@ -0,0 +1,31 @@ +import { chromium, type FullConfig } from '@playwright/test'; +import { spawn } from 'child_process'; +import { writeFileSync } from 'fs'; + +async function globalSetup(config: FullConfig) { + console.log('globalSetup'); + + return new Promise(async (resolve, reject) => { + const electron = spawn('node', ['./scripts/launchdev.js']); + + if (electron.pid) { + writeFileSync('.electron.pid', electron.pid?.toString()); + } + + electron.on('close', () => { + reject('process failed to start'); + }); + + electron.stdout.on('data', (data) => { + if (data.indexOf('App ready') >= 0) { + resolve(); + } + }); + + // electron.stderr.on('data', (data) => { + // reject(`${data}`) + // }); + }); +} + +export default globalSetup; diff --git a/scripts/launchdev.js b/scripts/launchdev.js index 649d24a2..23b7c349 100644 --- a/scripts/launchdev.js +++ b/scripts/launchdev.js @@ -39,10 +39,11 @@ function setupMainPackageWatcher() { } /** Spawn new electron process */ - electronApp = spawn(String(electronPath), ['--inspect=9223', '.'], { + electronApp = spawn(String(electronPath), ['--remote-debugging-port=9000', '--remote-allow-origins=http://127.0.0.1:9000', '.'], { stdio: 'inherit', }); + electronApp.addListener('') /** Stops the watch script when the application has been quit */ electronApp.addListener('exit', process.exit); }, diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts new file mode 100644 index 00000000..8ec4b5b6 --- /dev/null +++ b/tests/integration/example.spec.ts @@ -0,0 +1,22 @@ +import { test, expect } from '@playwright/test'; +import { chromium } from '@playwright/test'; + +test('has title', async () => { + const browser = await chromium.connectOverCDP('http://127.0.0.1:9000'); + + console.log(browser.isConnected() && 'Connected to Chrome.'); + console.log(`Contexts in CDP session: ${browser.contexts().length}.`); + + const context = browser.contexts()[0]; + const pages = context.pages(); + + console.log(`Pages in context: ${pages.length}.`); + const page = pages[0]; + + console.info(await page.title()); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/ComfyUI/); + + await page.screenshot({ path: 'screenshot.png' }); +}); From 47d64a1214b221aaaf52467befc3bb24b4139d63 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Thu, 5 Dec 2024 15:32:33 -0800 Subject: [PATCH 02/15] Test --- .github/workflows/test_windows.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 38c90dbc..5ab5dc06 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -4,6 +4,15 @@ on: workflow_dispatch: workflow_call: + push: + branches: + - "enh/playwright-tests" + pull_request: + branches: + - "main" + paths: + - ".github/workflows/test_windows.yml" + jobs: build-windows-debug: runs-on: windows-latest From ae681f0c62dea6a1c9a1ca8251614d6a21688510 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Thu, 5 Dec 2024 15:43:13 -0800 Subject: [PATCH 03/15] Test --- .github/workflows/test_windows.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 5ab5dc06..60d3f81f 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -31,3 +31,9 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Run Playwright Tests run: npm run test:e2e + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: screenshot + path: screenshot.png + From b203ac07e279a6fc262b2d89c838a9804974b0f5 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 10:25:56 -0800 Subject: [PATCH 04/15] Temp workaround --- src/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 1fa6f7f5..d6569c98 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -116,6 +116,9 @@ export async function validateHardware(): Promise { const graphics = await si.graphics(); const hasNvidia = graphics.controllers.some((controller) => controller.vendor.toLowerCase().includes('nvidia')); + + return { isValid: true }; // Temporary workaround for test + if (!hasNvidia) { try { // wmic is unreliable. Check in PS. From c290a7247ab3ad8fb7e10f6de032250b7320135d Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 10:49:14 -0800 Subject: [PATCH 05/15] Temp workaround --- .github/workflows/test_windows.yml | 2 +- tests/integration/example.spec.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index 60d3f81f..add49058 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -35,5 +35,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: screenshot - path: screenshot.png + path: screenshot*.png diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index 8ec4b5b6..3b4a57f4 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -18,5 +18,14 @@ test('has title', async () => { // Expect a title "to contain" a substring. await expect(page).toHaveTitle(/ComfyUI/); - await page.screenshot({ path: 'screenshot.png' }); + await page.screenshot({ path: 'screenshot-load.png' }); + + const getStartedButton = await page.$("button[data-testid='get-started-button']"); + + expect(getStartedButton).toBeDefined(); + + getStartedButton?.click(); + + + await page.screenshot({ path: 'screenshot-get-started.png' }); }); From 836f7e2677a54d7b2b7e2e576208b73d4911afd2 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 11:09:11 -0800 Subject: [PATCH 06/15] Temp workaround --- tests/integration/example.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index 3b4a57f4..cee7c21d 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -26,6 +26,8 @@ test('has title', async () => { getStartedButton?.click(); + await page.waitForTimeout(3000); + await page.screenshot({ path: 'screenshot-get-started.png' }); }); From fcc4c6a2915cd1afcce67de761b34649f492e953 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 13:07:12 -0800 Subject: [PATCH 07/15] Temp workaround --- tests/integration/example.spec.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index cee7c21d..cf85a68f 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -18,16 +18,17 @@ test('has title', async () => { // Expect a title "to contain" a substring. await expect(page).toHaveTitle(/ComfyUI/); - await page.screenshot({ path: 'screenshot-load.png' }); + const getStartedButton = page.getByText("Get Started") - const getStartedButton = await page.$("button[data-testid='get-started-button']"); - - expect(getStartedButton).toBeDefined(); + await expect(getStartedButton).toBeVisible(); + await expect(getStartedButton).toBeEnabled(); - getStartedButton?.click(); + await page.screenshot({ path: 'screenshot-load.png' }); - await page.waitForTimeout(3000); + await getStartedButton.click(); + await expect(page.getByText("Choose Installation Location")).toBeVisible(); + await page.screenshot({ path: 'screenshot-get-started.png' }); }); From fe733ef59ebfb1b07dac1f587c47199ec7485b9e Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 13:38:23 -0800 Subject: [PATCH 08/15] Temp workaround --- tests/integration/example.spec.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index cf85a68f..0de85b61 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -28,7 +28,30 @@ test('has title', async () => { await getStartedButton.click(); await expect(page.getByText("Choose Installation Location")).toBeVisible(); - await page.screenshot({ path: 'screenshot-get-started.png' }); + + const nextButton = page.getByText("Next") + + await expect(nextButton).toBeVisible(); + await expect(nextButton).toBeEnabled(); + + await nextButton.click(); + + await expect(page.getByText("Migrate from Existing Installation")).toBeVisible(); + + await page.screenshot({ path: 'screenshot-migrate.png' }); + + await nextButton.click(); + + await expect(page.getByText("Desktop App Settings")).toBeVisible(); + + const installButton = page.getByText("Install") + + await expect(installButton).toBeVisible(); + await expect(installButton).toBeEnabled(); + + await installButton.click(); + + }); From 175136c3ec69f4f58134cb6866c57e106e70b48d Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 13:39:32 -0800 Subject: [PATCH 09/15] Temp workaround --- tests/integration/example.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index 0de85b61..643f4d62 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -48,6 +48,8 @@ test('has title', async () => { const installButton = page.getByText("Install") + await page.screenshot({ path: 'screenshot-install.png' }); + await expect(installButton).toBeVisible(); await expect(installButton).toBeEnabled(); From bd9fc89574035ed35d6b094ab1516ab084939163 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 14:07:09 -0800 Subject: [PATCH 10/15] Temp workaround --- tests/integration/example.spec.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index 643f4d62..e435b67d 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -31,7 +31,7 @@ test('has title', async () => { await page.screenshot({ path: 'screenshot-get-started.png' }); - const nextButton = page.getByText("Next") + const nextButton = page.getByRole('button', { name: 'Next' }) await expect(nextButton).toBeVisible(); await expect(nextButton).toBeEnabled(); @@ -42,18 +42,18 @@ test('has title', async () => { await page.screenshot({ path: 'screenshot-migrate.png' }); - await nextButton.click(); + // await nextButton.click(); - await expect(page.getByText("Desktop App Settings")).toBeVisible(); + // await expect(page.getByText("Desktop App Settings")).toBeVisible(); - const installButton = page.getByText("Install") + // const installButton = page.getByText("Install") - await page.screenshot({ path: 'screenshot-install.png' }); + // await page.screenshot({ path: 'screenshot-install.png' }); - await expect(installButton).toBeVisible(); - await expect(installButton).toBeEnabled(); + // await expect(installButton).toBeVisible(); + // await expect(installButton).toBeEnabled(); - await installButton.click(); + // await installButton.click(); }); From c1105af0e5a10db3a8afebc01f3ef8105de2d5ed Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Fri, 6 Dec 2024 14:20:03 -0800 Subject: [PATCH 11/15] Temp workaround --- tests/integration/example.spec.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/example.spec.ts b/tests/integration/example.spec.ts index e435b67d..620d1e68 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/example.spec.ts @@ -31,7 +31,7 @@ test('has title', async () => { await page.screenshot({ path: 'screenshot-get-started.png' }); - const nextButton = page.getByRole('button', { name: 'Next' }) + let nextButton = page.getByRole('button', { name: 'Next' }) await expect(nextButton).toBeVisible(); await expect(nextButton).toBeEnabled(); @@ -42,13 +42,15 @@ test('has title', async () => { await page.screenshot({ path: 'screenshot-migrate.png' }); - // await nextButton.click(); + nextButton = page.getByRole('button', { name: 'Next' }) - // await expect(page.getByText("Desktop App Settings")).toBeVisible(); + await nextButton.click(); + + await expect(page.getByText("Desktop App Settings")).toBeVisible(); // const installButton = page.getByText("Install") - // await page.screenshot({ path: 'screenshot-install.png' }); + await page.screenshot({ path: 'screenshot-install.png' }); // await expect(installButton).toBeVisible(); // await expect(installButton).toBeEnabled(); From 7e5b5b0485636f7db4f8ce0b131e87090d9f24ea Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Sat, 7 Dec 2024 08:57:39 -0800 Subject: [PATCH 12/15] Cleanup --- .github/workflows/test_windows.yml | 7 +++--- playwright.setup.ts | 11 +------- scripts/launchdev.js | 4 ++- src/utils.ts | 5 ++-- .../{example.spec.ts => startup.spec.ts} | 25 ++++++------------- 5 files changed, 18 insertions(+), 34 deletions(-) rename tests/integration/{example.spec.ts => startup.spec.ts} (63%) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml index add49058..fd10cbbb 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows.yml @@ -6,12 +6,12 @@ on: push: branches: - - "enh/playwright-tests" + - 'enh/playwright-tests' pull_request: branches: - - "main" + - 'main' paths: - - ".github/workflows/test_windows.yml" + - '.github/workflows/test_windows.yml' jobs: build-windows-debug: @@ -36,4 +36,3 @@ jobs: with: name: screenshot path: screenshot*.png - diff --git a/playwright.setup.ts b/playwright.setup.ts index 4c1013e4..0c74fcfa 100644 --- a/playwright.setup.ts +++ b/playwright.setup.ts @@ -1,6 +1,5 @@ -import { chromium, type FullConfig } from '@playwright/test'; +import { type FullConfig } from '@playwright/test'; import { spawn } from 'child_process'; -import { writeFileSync } from 'fs'; async function globalSetup(config: FullConfig) { console.log('globalSetup'); @@ -8,10 +7,6 @@ async function globalSetup(config: FullConfig) { return new Promise(async (resolve, reject) => { const electron = spawn('node', ['./scripts/launchdev.js']); - if (electron.pid) { - writeFileSync('.electron.pid', electron.pid?.toString()); - } - electron.on('close', () => { reject('process failed to start'); }); @@ -21,10 +16,6 @@ async function globalSetup(config: FullConfig) { resolve(); } }); - - // electron.stderr.on('data', (data) => { - // reject(`${data}`) - // }); }); } diff --git a/scripts/launchdev.js b/scripts/launchdev.js index 23b7c349..8850afbd 100644 --- a/scripts/launchdev.js +++ b/scripts/launchdev.js @@ -38,8 +38,10 @@ function setupMainPackageWatcher() { electronApp = null; } + const args = process.env.CI ? ['--remote-debugging-port=9000', '--remote-allow-origins=http://127.0.0.1:9000' ] : ['--inspect=9223'] + /** Spawn new electron process */ - electronApp = spawn(String(electronPath), ['--remote-debugging-port=9000', '--remote-allow-origins=http://127.0.0.1:9000', '.'], { + electronApp = spawn(String(electronPath), [...args, '.'], { stdio: 'inherit', }); diff --git a/src/utils.ts b/src/utils.ts index d6569c98..69925a6d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -116,8 +116,9 @@ export async function validateHardware(): Promise { const graphics = await si.graphics(); const hasNvidia = graphics.controllers.some((controller) => controller.vendor.toLowerCase().includes('nvidia')); - - return { isValid: true }; // Temporary workaround for test + if (process.env.CI) { + return { isValid: true }; // Temporary workaround for testing with Playwright + } if (!hasNvidia) { try { diff --git a/tests/integration/example.spec.ts b/tests/integration/startup.spec.ts similarity index 63% rename from tests/integration/example.spec.ts rename to tests/integration/startup.spec.ts index 620d1e68..f2bec3d9 100644 --- a/tests/integration/example.spec.ts +++ b/tests/integration/startup.spec.ts @@ -18,44 +18,35 @@ test('has title', async () => { // Expect a title "to contain" a substring. await expect(page).toHaveTitle(/ComfyUI/); - const getStartedButton = page.getByText("Get Started") + const getStartedButton = page.getByText('Get Started'); await expect(getStartedButton).toBeVisible(); await expect(getStartedButton).toBeEnabled(); - await page.screenshot({ path: 'screenshot-load.png' }); + await page.screenshot({ path: 'screenshot-load.png' }); await getStartedButton.click(); - await expect(page.getByText("Choose Installation Location")).toBeVisible(); - + await expect(page.getByText('Choose Installation Location')).toBeVisible(); + await page.screenshot({ path: 'screenshot-get-started.png' }); - let nextButton = page.getByRole('button', { name: 'Next' }) + let nextButton = page.getByRole('button', { name: 'Next' }); await expect(nextButton).toBeVisible(); await expect(nextButton).toBeEnabled(); await nextButton.click(); - await expect(page.getByText("Migrate from Existing Installation")).toBeVisible(); + await expect(page.getByText('Migrate from Existing Installation')).toBeVisible(); await page.screenshot({ path: 'screenshot-migrate.png' }); - nextButton = page.getByRole('button', { name: 'Next' }) + nextButton = page.getByRole('button', { name: 'Next' }); await nextButton.click(); - await expect(page.getByText("Desktop App Settings")).toBeVisible(); - - // const installButton = page.getByText("Install") + await expect(page.getByText('Desktop App Settings')).toBeVisible(); await page.screenshot({ path: 'screenshot-install.png' }); - - // await expect(installButton).toBeVisible(); - // await expect(installButton).toBeEnabled(); - - // await installButton.click(); - - }); From 10ccf6625b3cf055bf86d5f0fa29b23f4a834339 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Sat, 7 Dec 2024 09:09:36 -0800 Subject: [PATCH 13/15] Cleanup --- ...ndows.yml => integration_test_windows.yml} | 26 ++++++------------- tests/integration/startup.spec.ts | 10 +++---- 2 files changed, 12 insertions(+), 24 deletions(-) rename .github/workflows/{test_windows.yml => integration_test_windows.yml} (51%) diff --git a/.github/workflows/test_windows.yml b/.github/workflows/integration_test_windows.yml similarity index 51% rename from .github/workflows/test_windows.yml rename to .github/workflows/integration_test_windows.yml index fd10cbbb..34004326 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/integration_test_windows.yml @@ -1,28 +1,18 @@ -name: Playwright App Windows Test +name: Windows App Integration Test on: - workflow_dispatch: - workflow_call: - - push: - branches: - - 'enh/playwright-tests' pull_request: - branches: - - 'main' - paths: - - '.github/workflows/test_windows.yml' + branches: [main] + push: + branches: [main] + jobs: - build-windows-debug: + integration-windows-test: runs-on: windows-latest steps: - name: Github checkout - uses: actions/checkout@v4 - - name: Declare some variables - run: | - echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" - shell: bash + uses: actions/checkout@v4 - name: Build uses: ./.github/actions/build/windows/app with: @@ -31,7 +21,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Run Playwright Tests run: npm run test:e2e - - name: Upload artifact + - name: Upload screenshots uses: actions/upload-artifact@v3 with: name: screenshot diff --git a/tests/integration/startup.spec.ts b/tests/integration/startup.spec.ts index f2bec3d9..33847431 100644 --- a/tests/integration/startup.spec.ts +++ b/tests/integration/startup.spec.ts @@ -4,17 +4,15 @@ import { chromium } from '@playwright/test'; test('has title', async () => { const browser = await chromium.connectOverCDP('http://127.0.0.1:9000'); - console.log(browser.isConnected() && 'Connected to Chrome.'); - console.log(`Contexts in CDP session: ${browser.contexts().length}.`); + expect(browser.isConnected()).toBeTruthy(); + expect(browser.contexts()).toBeGreaterThan(0); - const context = browser.contexts()[0]; + const context = browser.contexts()[0]; const pages = context.pages(); - console.log(`Pages in context: ${pages.length}.`); + expect(pages).toHaveLength(1); const page = pages[0]; - console.info(await page.title()); - // Expect a title "to contain" a substring. await expect(page).toHaveTitle(/ComfyUI/); From b310da58a25e3b2376c557e7eb459c2c3241240c Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Sat, 7 Dec 2024 09:17:30 -0800 Subject: [PATCH 14/15] Formatting --- .github/workflows/integration_test_windows.yml | 3 +-- tests/integration/startup.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_test_windows.yml b/.github/workflows/integration_test_windows.yml index 34004326..914a0024 100644 --- a/.github/workflows/integration_test_windows.yml +++ b/.github/workflows/integration_test_windows.yml @@ -6,13 +6,12 @@ on: push: branches: [main] - jobs: integration-windows-test: runs-on: windows-latest steps: - name: Github checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4 - name: Build uses: ./.github/actions/build/windows/app with: diff --git a/tests/integration/startup.spec.ts b/tests/integration/startup.spec.ts index 33847431..cc3498df 100644 --- a/tests/integration/startup.spec.ts +++ b/tests/integration/startup.spec.ts @@ -4,10 +4,10 @@ import { chromium } from '@playwright/test'; test('has title', async () => { const browser = await chromium.connectOverCDP('http://127.0.0.1:9000'); - expect(browser.isConnected()).toBeTruthy(); + expect(browser.isConnected()).toBeTruthy(); expect(browser.contexts()).toBeGreaterThan(0); - const context = browser.contexts()[0]; + const context = browser.contexts()[0]; const pages = context.pages(); expect(pages).toHaveLength(1); From 9cabd58d7c6004e015b5f67298725e4706e85516 Mon Sep 17 00:00:00 2001 From: Oto Ciulis Date: Sat, 7 Dec 2024 13:09:54 -0800 Subject: [PATCH 15/15] Formatting --- tests/integration/startup.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/startup.spec.ts b/tests/integration/startup.spec.ts index cc3498df..9edbd1cd 100644 --- a/tests/integration/startup.spec.ts +++ b/tests/integration/startup.spec.ts @@ -5,7 +5,7 @@ test('has title', async () => { const browser = await chromium.connectOverCDP('http://127.0.0.1:9000'); expect(browser.isConnected()).toBeTruthy(); - expect(browser.contexts()).toBeGreaterThan(0); + expect(browser.contexts().length).toBeGreaterThan(0); const context = browser.contexts()[0]; const pages = context.pages();