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/'
This commit is contained in:
Daniel Avila 2023-04-06 19:33:33 -04:00
parent 323e951d7f
commit 3f42db4956
2 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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');
});