Skip to content

Commit efe4a34

Browse files
committed
Remove debug code from the integration tests
Doing so simplifies the code a bit, and such code is generally not checked in because it can easily be added locally if needed.
1 parent 35f85c5 commit efe4a34

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

test/integration/stamp_editor_spec.mjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,15 +1388,10 @@ describe("Stamp Editor", () => {
13881388

13891389
await Promise.all(
13901390
pages.map(async ([browserName, page]) => {
1391-
const debug = false;
1392-
13931391
await page.click("#secondaryToolbarToggleButton");
13941392
await page.waitForSelector("#secondaryToolbar", { visible: true });
13951393
const secondary = await page.$("#secondaryToolbar");
1396-
const png = await secondary.screenshot({
1397-
type: "png",
1398-
path: debug ? `foo.png` : "",
1399-
});
1394+
const png = await secondary.screenshot({ type: "png" });
14001395
const secondaryImage = PNG.sync.read(Buffer.from(png));
14011396
const buffer = new Uint32Array(secondaryImage.data.buffer);
14021397
expect(buffer.every(x => x === 0xff0000ff))

test/integration/viewer_spec.mjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,6 @@ describe("PDF viewer", () => {
400400
it("must check that canvas perfectly fits the page whatever the zoom level is", async () => {
401401
await Promise.all(
402402
pages.map(async ([browserName, page]) => {
403-
const debug = false;
404-
405403
// The pdf has a single page with a red background.
406404
// We set the viewer background to red, because when screenshoting
407405
// some part of the viewer background can be visible.
@@ -426,10 +424,7 @@ describe("PDF viewer", () => {
426424
await scrollIntoView(page, `.page[data-page-number="1"]`);
427425

428426
const element = await page.$(`.page[data-page-number="1"]`);
429-
const png = await element.screenshot({
430-
type: "png",
431-
path: debug ? `foo${i}.png` : "",
432-
});
427+
const png = await element.screenshot({ type: "png" });
433428
const pageImage = PNG.sync.read(Buffer.from(png));
434429
let buffer = new Uint32Array(pageImage.data.buffer);
435430

0 commit comments

Comments
 (0)