Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[version-4-5] chore: bump @playwright/test from 1.42.1 to 1.49.0 (#4836) #4944

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"devDependencies": {
"@argos-ci/cli": "^2.4.2",
"@argos-ci/playwright": "^2.0.0",
"@playwright/test": "^1.42.1",
"@playwright/test": "^1.49.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "latest",
Expand Down
11 changes: 10 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
snapshotDir: "screenshots/",
Expand All @@ -20,6 +21,14 @@ const config: PlaywrightTestConfig = {
url: "http://127.0.0.1:3000",
reuseExistingServer: !process.env.CI,
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
},
},
],
};

export default config;
2 changes: 1 addition & 1 deletion visuals/exclude.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["/integrations/"]
["/integrations/*", "/security-bulletins/reports/*"]
20 changes: 13 additions & 7 deletions visuals/screenshot.docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,29 @@ const stylesheet = fs.readFileSync(stylesheetPath).toString();
test.describe.configure({ mode: "parallel" });

function isVersionedDocsPathname(pathname: string, excludeList: string[]): boolean {
if (excludeList.some((excludedPath) => pathname === excludedPath || pathname.startsWith(excludedPath))) {
console.log(`Excluding ${pathname} because it matches or starts with an exclude list pattern`);
if (
excludeList.some((excludedPath) => {
if (excludedPath.endsWith("/*")) {
// Let's remove the trailing "/*" to match sub-paths
const basePath = excludedPath.slice(0, -2);
// Exclude sub-paths only, not the index page
return pathname.startsWith(basePath) && pathname !== `${basePath}/`;
}
// This is an exact match
return pathname === excludedPath;
})
) {
return false;
}

// Additional exclusion criteria
if (pathname.startsWith("/api/") || pathname.match(/\/\d+\.\d+\.x\//)) {
return false;
}

return true;
}

test.beforeAll(() => {
console.log("Excluded pages: ", excludeList);
console.log("Total pages: ", extractSitemapPathnames(sitemapPath).length);
});

function screenshotPathname(pathname: string) {
test(`pathname ${pathname}`, async ({ page }) => {
console.log(`Taking screenshot of ${pathname}`);
Expand Down
Loading