Skip to content

Commit

Permalink
Refactor test assertion for title in example.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
irsooti committed Jan 30, 2024
1 parent 06be47b commit 1f38b2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
27 changes: 0 additions & 27 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,5 @@ export default defineConfig({
name: "webkit",
use: { ...devices["Desktop Safari"] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});
2 changes: 1 addition & 1 deletion tests/example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ test("has title in the document", async ({ page }) => {

const title = page.getByRole("heading");

await expect(title).toHaveText("Hedwig");
await expect(title).toHaveText(/Hedwig/i);
});

0 comments on commit 1f38b2b

Please sign in to comment.