Skip to content

Commit

Permalink
enable trace on failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
depapp committed Oct 13, 2022
1 parent c620052 commit 335f0c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test.describe('Senarai Homepage E2E Test', () => {
await homePage.open();
await expect(page).toHaveURL('/');
await expect(page).toHaveTitle(/Senarai/);
})
});

test('user should be able to see all activities', async () => {
await expect(homePage.activityCard).toHaveText([
Expand Down
4 changes: 2 additions & 2 deletions e2e/pages/home.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Page, Locator, expect } from '@playwright/test';
import { Page, Locator } from '@playwright/test';

export class HomePage {
readonly page: Page;
Expand All @@ -8,7 +8,7 @@ export class HomePage {
constructor(page: Page) {
this.page = page;
this.activityCard = page.locator('h3.text-lg.font-medium');
this.paudActivity = page.locator('text=PAUDPendidikan Anak Usia Dini >> span')
this.paudActivity = page.locator('text=PAUDPendidikan Anak Usia Dini >> span');
}

async open() {
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const config: PlaywrightTestConfig<Fixtures> = {
baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: 'retain-on-failure',
},

/* Configure projects for major browsers */
Expand Down

0 comments on commit 335f0c1

Please sign in to comment.