feat: Frontend app title environment variable (#291)

* Add app name change support

* fix indentation
This commit is contained in:
dncc89 2023-05-18 08:23:13 +09:00 committed by GitHub
parent 782a899ab3
commit 44ea3601c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 57 deletions

View file

@ -1,7 +1,8 @@
import {expect, test} from '@playwright/test';
import { expect, test } from '@playwright/test';
test('landing page', async ({page}) => {
test('landing page', async ({ page }) => {
await page.goto('http://localhost:3080/');
// expect (await page.title()).toBe('ChatGPT Clone');
expect (await page.textContent('#landing-title')).toBe('ChatGPT Clone');
expect(await page.textContent('#landing-title')).toBe(import.meta.env.VITE_APP_TITLE || "ChatGPT Clone");
});