Skip to content

Commit

Permalink
Add test for splashscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
rwood-moz committed Dec 6, 2024
1 parent 9b5d618 commit a989f4f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
5 changes: 5 additions & 0 deletions test/e2e/const/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// appointment urls
export const APPT_PROD_URL = 'https://appointment.day/';

// page titles
export const APPT_PAGE_TITLE = 'Thunderbird Appointment';
2 changes: 1 addition & 1 deletion test/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [['html'], ['list']],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
18 changes: 0 additions & 18 deletions test/e2e/tests/example.spec.ts

This file was deleted.

14 changes: 14 additions & 0 deletions test/e2e/tests/splashscreen.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test, expect } from '@playwright/test';
import { APPT_PROD_URL, APPT_PAGE_TITLE } from '../const/constants';

// verify main appointment splash screen appears
test.describe('splash screen', {
tag: '@prod-sanity'
}, () => {
test('has title', async ({ page }) => {
await page.goto(APPT_PROD_URL);
await expect(page).toHaveTitle(APPT_PAGE_TITLE);
});

// todo: more checks on splash screen appearance
});

0 comments on commit a989f4f

Please sign in to comment.