ci(playwright.yml): add Playwright tests workflow

fix(Landing.jsx): add id attribute to landing page title
test(landing.spec.js): update landing page title and h1 text content assertions
This commit is contained in:
Daniel Avila 2023-04-06 17:33:02 -04:00
parent 21920dd864
commit e98ce09d6b
3 changed files with 31 additions and 3 deletions

View file

@ -2,6 +2,6 @@ import {expect, test} from '@playwright/test';
test('landing page', async ({page}) => {
await page.goto('/');
expect (await page.title()).toBe('ChatGPT Clone');
expect (await page.textContent('h1')).toBe('ChatGPT Clone');
expect (await page.title()).toBe('New Chat');
expect (await page.textContent('#landing-title')).toBe('ChatGPT Clone');
});