Fix Danish translations and enhance mobile department auto-selection logic
This commit is contained in:
@@ -159,6 +159,7 @@ async function runPlaywright({ label, commandArgs, artifactSuffix }) {
|
||||
PLAYWRIGHT: "1",
|
||||
PLAYWRIGHT_ARTIFACT_NAMESPACE: getArtifactNamespace(artifactSuffix),
|
||||
PLAYWRIGHT_REPORTER_MODE: "line-html",
|
||||
PLAYWRIGHT_WORKERS: process.env.PLAYWRIGHT_WORKERS || "1",
|
||||
},
|
||||
stdio: "inherit",
|
||||
windowsHide: true,
|
||||
@@ -318,11 +319,19 @@ function groupSpecsByProjects(specProjects) {
|
||||
|
||||
async function runCorePrGate() {
|
||||
const projects = getSelectedProjects();
|
||||
return runPlaywright({
|
||||
label: `core ${prGrep} gate`,
|
||||
artifactSuffix: "core",
|
||||
commandArgs: ["--grep", prGrep, ...buildProjectArgs(projects)],
|
||||
});
|
||||
for (const project of projects) {
|
||||
const code = await runPlaywright({
|
||||
label: `core ${prGrep} gate (${project})`,
|
||||
artifactSuffix: `core-${project}`,
|
||||
commandArgs: ["--grep", prGrep, "--project", project],
|
||||
});
|
||||
|
||||
if (code !== 0) {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
async function runChangedSelection(selection) {
|
||||
@@ -332,11 +341,19 @@ async function runChangedSelection(selection) {
|
||||
console.log(
|
||||
`[playwright-pr] Falling back to broader ${smokeGrep} coverage because these changed files were unmapped: ${selection.unmappedFiles.join(", ")}`
|
||||
);
|
||||
return runPlaywright({
|
||||
label: `fallback ${smokeGrep} gate`,
|
||||
artifactSuffix: "smoke-fallback",
|
||||
commandArgs: ["--grep", smokeGrep, "--grep-invert", prGrep, ...buildProjectArgs(projects)],
|
||||
});
|
||||
for (const project of projects) {
|
||||
const code = await runPlaywright({
|
||||
label: `fallback ${smokeGrep} gate (${project})`,
|
||||
artifactSuffix: `smoke-fallback-${project}`,
|
||||
commandArgs: ["--grep", smokeGrep, "--grep-invert", prGrep, "--project", project],
|
||||
});
|
||||
|
||||
if (code !== 0) {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const groups = groupSpecsByProjects(selection.specProjects);
|
||||
@@ -346,14 +363,16 @@ async function runChangedSelection(selection) {
|
||||
}
|
||||
|
||||
for (const [index, group] of groups.entries()) {
|
||||
const code = await runPlaywright({
|
||||
label: `changed-area specs ${index + 1}/${groups.length}`,
|
||||
artifactSuffix: `changed-${index + 1}`,
|
||||
commandArgs: [...group.specs, ...buildProjectArgs(group.projects)],
|
||||
});
|
||||
for (const project of group.projects) {
|
||||
const code = await runPlaywright({
|
||||
label: `changed-area specs ${index + 1}/${groups.length} (${project})`,
|
||||
artifactSuffix: `changed-${index + 1}-${project}`,
|
||||
commandArgs: [...group.specs, "--project", project],
|
||||
});
|
||||
|
||||
if (code !== 0) {
|
||||
return code;
|
||||
if (code !== 0) {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user