-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up some flaky test selectors, refine reference to openGraph pag…
…e fixture
1 parent
13c2602
commit 121437d
Showing
3 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { OpenGraphPage } from "./fixtures/open-graph"; | ||
import { test } from "@playwright/test"; | ||
|
||
const ogTest = test.extend<{ ogPage: OpenGraphPage }>({ | ||
ogPage: async ({ page }, use) => { | ||
const ogPage = new OpenGraphPage(page, "/"); | ||
await ogPage.goto(); | ||
await use(ogPage); | ||
const ogTest = test.extend<{ openGraphPage: OpenGraphPage }>({ | ||
openGraphPage: async ({ page }, use) => { | ||
const openGraphPage = new OpenGraphPage(page, "/"); | ||
await openGraphPage.goto(); | ||
await use(openGraphPage); | ||
}, | ||
}); | ||
|
||
ogTest( | ||
"has Homepage Open Graph Data and meta title and description", | ||
async ({ ogPage }) => { | ||
await ogPage.hasSiteName(); | ||
await ogPage.hasMetaTitle( | ||
async ({ openGraphPage }) => { | ||
await openGraphPage.hasSiteName(); | ||
await openGraphPage.hasMetaTitle( | ||
"Digital Collections - Northwestern University Libraries" | ||
); | ||
await ogPage.hasDefaultDescription(); | ||
await ogPage.hasDefaultOGDescription(); | ||
await ogPage.hasOGUrl(""); | ||
await ogPage.hasDefaultOGImage(); | ||
await ogPage.hasDefaultOGDescription(); | ||
await openGraphPage.hasDefaultDescription(); | ||
await openGraphPage.hasDefaultOGDescription(); | ||
await openGraphPage.hasOGUrl(""); | ||
await openGraphPage.hasDefaultOGImage(); | ||
await openGraphPage.hasDefaultOGDescription(); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters