From 3f42db4956accf57a8bd7b4e424d05a60b9e8b0a Mon Sep 17 00:00:00 2001 From: Daniel Avila Date: Thu, 6 Apr 2023 19:33:33 -0400 Subject: [PATCH] chore(playwright.yml): move 'Start API server' job to after 'Install Playwright Browsers' job fix(landing.spec.js): change page.goto URL to 'http://localhost:3080/' --- .github/workflows/playwright.yml | 12 ++++++------ e2e/specs/landing.spec.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 6586a9321..869360e2c 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -45,12 +45,6 @@ jobs: working-directory: ./client run: npm ci - - name: Start API server - working-directory: ./api - run: | - npm run start & - sleep 10 # Wait for the server to start - - name: Build Client working-directory: ./client run: npm run build @@ -61,6 +55,12 @@ jobs: - name: Install Playwright Browsers run: npx playwright install --with-deps + - name: Start API server + working-directory: ./api + run: | + npm run start & + sleep 10 # Wait for the server to start + - name: Run Playwright tests run: npx playwright test diff --git a/e2e/specs/landing.spec.js b/e2e/specs/landing.spec.js index d97e8a01a..c10c78221 100644 --- a/e2e/specs/landing.spec.js +++ b/e2e/specs/landing.spec.js @@ -1,7 +1,7 @@ import {expect, test} from '@playwright/test'; test('landing page', async ({page}) => { - await page.goto('/'); + await page.goto('http://localhost:3080/'); expect (await page.title()).toBe('New Chat'); expect (await page.textContent('#landing-title')).toBe('ChatGPT Clone'); }); \ No newline at end of file