Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] pin same cid twice test #2234

Merged
merged 3 commits into from
Jul 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 and see the warning message", () => {
juans-chainsafe marked this conversation as resolved.
Show resolved Hide resolved
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