Replace manual returns with pending in the integration tests

This allows Jasmine to track skipped tests and makes it easier to
discover them using e.g. `grep`.
This commit is contained in:
Tim van der Meij 2025-09-07 19:25:06 +02:00
parent 1cae8e2933
commit ffeaa9111a
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762
3 changed files with 13 additions and 19 deletions

View File

@ -1072,14 +1072,12 @@ describe("Highlight Editor", () => {
it("must check that an highlight can be left with the keyboard", async () => { it("must check that an highlight can be left with the keyboard", async () => {
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
await switchToHighlight(page);
if (browserName === "chrome") { if (browserName === "chrome") {
// Unfortunately, we can't test this on Chrome because we can't set pending("Caret browsing mode cannot be used in Chrome.");
// the caret browsing mode to true.
return;
} }
await switchToHighlight(page);
let rect = await getSpanRectFromText( let rect = await getSpanRectFromText(
page, page,
1, 1,
@ -1855,9 +1853,7 @@ describe("Highlight Editor", () => {
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
if (navigator.platform.includes("Win")) { if (navigator.platform.includes("Win")) {
// Skip the test on Windows because it permafails. pending("Fails consistently on Windows (issue #20136).");
// TODO: Remove this check once #20136 is fixed.
return;
} }
await switchToHighlight(page); await switchToHighlight(page);

View File

@ -1217,10 +1217,9 @@ describe("The pen-drawn shape must maintain correct curvature regardless of the
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
if (browserName === "chrome" && navigator.platform.includes("Win")) { if (browserName === "chrome" && navigator.platform.includes("Win")) {
// Skip the test for Chrome on Windows because it doesn't allow to pending(
// have elements outside the viewport and thus permafails with e.g. "Chrome on Windows doesn't allow having elements outside the viewport."
// `Cannot move beyond viewport (x: -32, y: 241)`. );
return;
} }
await switchToInk(page); await switchToInk(page);

View File

@ -1375,15 +1375,14 @@ describe("PDF viewer", () => {
await Promise.all( await Promise.all(
pages.map(async ([browserName, page]) => { pages.map(async ([browserName, page]) => {
if (browserName === "firefox") { if (browserName === "firefox") {
// Firefox does not support touch events on devices pending(
// with no touch screen. "Touch events are not supported on devices without touch screen in Firefox."
return; );
} }
if (browserName === "chrome") { if (browserName === "chrome") {
// Skip the test for Chrome as it doesn't support pinch zoom pending(
// emulation for WebDriver BiDi yet. "Pinch zoom emulation is not supported for WebDriver BiDi in Chrome."
// TODO: Remove this check once the issue is fixed. );
return;
} }
const rect = await getSpanRectFromText(page, 1, "type-stable"); const rect = await getSpanRectFromText(page, 1, "type-stable");