Skip to content

Commit

Permalink
dump
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilsang committed May 3, 2024
1 parent c960d30 commit b2c74b9
Show file tree
Hide file tree
Showing 77 changed files with 63 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
run: npm install -g pnpm && pnpm install

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
run: pnpm e2e:install

- name: Build post
run: pnpm deploy-blog:ci
run: pnpm e2e:build

- name: Run Playwright tests
run: pnpm e2e
Expand Down
5 changes: 3 additions & 2 deletions e2e/404.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, test } from '@playwright/test';
import { screenshotFullPage } from './utils';

test.describe('404', () => {
test('should redirect 404', async ({ page }) => {
Expand All @@ -7,12 +8,12 @@ test.describe('404', () => {
});

test(`screen`, async ({ page }) => {
await page.goto(`/404`);
await expect(page).toHaveScreenshot([`404.png`], { fullPage: true });
await screenshotFullPage({ page, url: `/404`, arg: [`404.png`] });
});

test(`dom`, async ({ page }) => {
await page.goto(`/404`);
await page.waitForTimeout(1000);
const body = await page.locator('#__next').innerHTML();
expect(body).toMatchSnapshot([`404.html`]);
});
Expand Down
Loading

0 comments on commit b2c74b9

Please sign in to comment.