Skip to content

Commit

Permalink
[Storage] pin same cid twice test (#2234)
Browse files Browse the repository at this point in the history
* pin same cid twice test

* Update packages/storage-ui/cypress/tests/cid-management.cy.ts

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
  • Loading branch information
juans-chainsafe and asnaith committed Jul 26, 2022
1 parent 3c43b95 commit b3d6d5b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/storage-ui/cypress/tests/cid-management.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("CID management", () => {
cidsPage.cidItemRow().should("contain.text", "queued")
})

it("can see a warning when attempting to pin the same CID twice", () => {
it("can pin the same CID twice following initial warning", () => {
cy.web3Login({ withNewSession: true })
navigationMenu.cidsNavButton().click()

Expand All @@ -52,8 +52,19 @@ describe("CID management", () => {
// see warning if attempting to pin the cid again
cidsPage.pinButton().click()
addCidModal.body().should("be.visible")
addCidModal.nameInput().type(testCidName)
addCidModal.cidInput().type(testCid)
addCidModal.cidPinnedWarningLabel().should("be.visible")

// confirm pin same cid
addCidModal.pinSubmitButton().click()

// ensure both cid are pinned in the table
cidsPage.cidItemRow().should("have.length", 2)
cidsPage.cidItemRow().within(() => {
cidsPage.cidNameCell().eq(0).should("have.text", testCidName)
cidsPage.cidNameCell().eq(1).should("have.text", testCidName)
})
})

it("can search via name or cid", () => {
Expand Down

0 comments on commit b3d6d5b

Please sign in to comment.