This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-09
Channels
Hey all, I'm running a UI regression tests (using javascript and puppeteer) by capturing screenshots. How can I make changes to my app, compile and reload from my JS tests? For example, that is my test:
const { toMatchImageSnapshot } = require("jest-image-snapshot");
expect.extend({ toMatchImageSnapshot });
const APP_URL = "";
describe("UI test", () => {
jest.setTimeout(50000);
beforeAll(async () => {
await page.goto(APP_URL);
});
it("Test", async () => {
const image = await page.screenshot({
fullPage: true,
captureBeyondViewport: true,
});
expect(image).toMatchImageSnapshot({
failureThreshold: "0.10",
failureThresholdType: "percent",
});
});
});
For the following tests I want to make changes in the home page, for example changing the layout of the page and comparing it to the previous version.