Skip to content

Commit 7df207d

Browse files
committed
chore: fix synpress error
1 parent 5cc5580 commit 7df207d

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# FROM synthetixio/docker-e2e:18.16-ubuntu as base
33
FROM synthetixio/docker-e2e@sha256:d46dd0c38a4a6cf44355dbf583f3bb83c60e445c5508c10d7680c5a30dc81d8a as base
44

5+
# Download and install Google Chrome
6+
ENV CHROME_VERSION=130.0.6723.116-1
7+
RUN wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
8+
RUN apt-get install -y ./google-chrome-stable_${CHROME_VERSION}_amd64.deb
9+
510
RUN mkdir /app
611
WORKDIR /app
712

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"integration:testcafe": "run-s blockchain:contracts:testcafe build:test integration:testcafe:prod",
3030
"integration:testcafe:ci": "concurrently -k -s first \"npm:blockchain\" \"npm:integration:testcafe\"",
3131
"integration:metamask": "run-s wait blockchain:contracts:synpress integration:synpress",
32-
"integration:synpress": "cross-env METAMASK_VERSION=11.15.6 CYPRESS_RESOURCES_WAIT=1 STABLE_MODE=true SECRET_WORDS='indicate swing place chair flight used hammer soon photo region volume shuffle' NETWORK_NAME='localhost' RPC_URL=http://localhost:8545 CHAIN_ID=1337 SYMBOL=ETH IS_TESTNET=true synpress run --configFile='./synpress.config.js'",
32+
"integration:synpress": "node ./scripts/fix_synpress.js && cross-env METAMASK_VERSION=11.15.6 CYPRESS_RESOURCES_WAIT=1 STABLE_MODE=true SECRET_WORDS='indicate swing place chair flight used hammer soon photo region volume shuffle' NETWORK_NAME='localhost' RPC_URL=http://localhost:8545 CHAIN_ID=1337 SYMBOL=ETH IS_TESTNET=true synpress run --configFile='./synpress.config.js'",
3333
"integration:local": "cross-env NET=local npm run dev",
3434
"integration:local:static": "cross-env NET=local npm run build:test && npm run serve-static",
3535
"integration:headful": "concurrently -k -s first \"npm:blockchain\" \"npm:integration:local:static\" \"npm:integration:metamask\"",

scripts/fix_synpress.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const fs = require("fs");
2+
3+
const synpressConfigPath = "./node_modules/@synthetixio/synpress/commands/playwright.js";
4+
5+
const playwright = fs.readFileSync(synpressConfigPath, { encoding: "utf8" });
6+
const overwrite = playwright.replace(").split(': ')[1];", ").split(': ')[1].replace(/(\\n| )/g, '');");
7+
8+
fs.writeFileSync(synpressConfigPath, overwrite, { encoding: "utf8" });

src/common/hooks/useEndorsementChain/useEndorsementChain.integration.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ describe("useEndorsementChain|integration", () => {
4747
expect(result.current.endorsementChain).toBe(undefined);
4848
expect(result.current.pending).toBe(false);
4949
},
50-
{ timeout: 60000 }
50+
{ timeout: 120_000 }
5151
);
5252
});
53-
}, 60000);
53+
}, 120_000);
5454

5555
it("should work correctly for a given tokenRegistryAddress + tokenId with Transfer, Surrender, Burnt events", async () => {
5656
const { result } = renderHook(
@@ -207,8 +207,8 @@ describe("useEndorsementChain|integration", () => {
207207
expect(result.current.pending).toBe(false);
208208
expect(result.current.error).toBe("");
209209
},
210-
{ timeout: 60_000 }
210+
{ timeout: 120_000 }
211211
);
212212
});
213-
}, 60_000);
213+
}, 120_000);
214214
});

0 commit comments

Comments
 (0)