From b384052dfaf690a0576cc208cdbeb6f4b9bd3030 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Tue, 7 Jun 2022 21:35:18 +0200 Subject: [PATCH] Reduce flakyness of connect.spec Signed-off-by: Sebastian Martinez --- cypress/fixtures/ceramicStream.json | 37 +++++++++++++++++++++++++++++ cypress/integration/connect.spec.ts | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 cypress/fixtures/ceramicStream.json diff --git a/cypress/fixtures/ceramicStream.json b/cypress/fixtures/ceramicStream.json new file mode 100644 index 000000000..7dd278162 --- /dev/null +++ b/cypress/fixtures/ceramicStream.json @@ -0,0 +1,37 @@ +{ + "streamId": "k2t6wyse1ukyaidd42gy4h1guy10xcycfe424h13gjxkoupzhssv9j2svmb8rr", + "state": { + "type": 1, + "content": "did:3:kjzl6cwe1jw1481xu9oyww9bhmueqr8f5uryk4xha9jzhj6vi063e0blpnil383", + "metadata": { + "family": "caip10-eip155:1", + "controllers": [ + "0x5e813e48a81977c6fdd565ed5097eb600c73c4f0@eip155:1" + ] + }, + "signature": 2, + "anchorStatus": "ANCHORED", + "log": [ + { + "cid": "bafyreiayiqzx3vth6pu5yniakbu7nm4otiab2j4izu2knyvp2hyzbhxte4", + "type": 0 + }, + { + "cid": "bafyreic6lcoeq5gr3i532focvbiwe7xtajm66nsnoj5i66rmvqexgrjb6y", + "type": 1 + }, + { + "cid": "bafyreihochpuwo4fg36neapdljruhuzsjkakyvrcmvtxfbzcz3vn2sduye", + "type": 2 + } + ], + "anchorProof": { + "root": "bafyreigcirwd56d5reel2gn2ndqyshyvbtvtffgqyldefwk4gucnc52lau", + "txHash": "bagjqcgzacitwxfpo6uh5uyoa2cwt2lknpqovc75njw53hgkscxae6jlfytwa", + "chainId": "eip155:1", + "blockNumber": 13015348, + "blockTimestamp": 1628838351 + }, + "doctype": "caip10-link" + } +} diff --git a/cypress/integration/connect.spec.ts b/cypress/integration/connect.spec.ts index fdf5fe6ac..fffe53bbc 100644 --- a/cypress/integration/connect.spec.ts +++ b/cypress/integration/connect.spec.ts @@ -9,7 +9,7 @@ describe("MetaMask", () => { } }); cy.intercept("POST", "https://api.thegraph.com/subgraphs/name/radicle-dev/radicle-orgs-rinkeby", { data: { safe: null } } ); - cy.intercept("https://gateway.ceramic.network/api/v0/streams", new Blob([])); + cy.intercept("https://gateway.ceramic.network/api/v0/streams", { fixture: "ceramicStream.json" }); cy.get("button.connect").click(); cy.get("button.secondary").click(); cy.get("button.address").should("contain", "3256 – 5721");