Fork me on GitHub
#shadow-cljs
<
2023-07-09
>
itaied09:07:34

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.

thheller10:07:01

no clue. not really a shadow-cljs question. maybe try #C03S1L9DN?