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] Input validations pin cid modal test #2235

Merged
merged 3 commits into from
Aug 4, 2022
Merged
Changes from all commits
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
14 changes: 13 additions & 1 deletion packages/storage-ui/cypress/tests/cid-management.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ describe("CID management", () => {
cy.web3Login({ withNewSession: true })
navigationMenu.cidsNavButton().click()

// pin a cid and see it in the pinned items table
// go to pin a cid modal and type the name
cidsPage.pinButton().click()
addCidModal.body().should("be.visible")
addCidModal.nameInput().type(testCidName)

// ensure can't pin an empty cid
// TODO: uncomment when #2229 issue is fixed
//addCidModal.pinSubmitButton().safeClick()
Copy link
Contributor Author

@juans-chainsafe juans-chainsafe Jul 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this one as well, but because the development is not ready, I leave it commented for now

//addCidModal.nameInput().should("have.class", "error")

// ensure can't pin an invalid cid
addCidModal.cidInput().type("invalid cid")
addCidModal.cidInput().should("have.class", "error")
addCidModal.cidInput().clear()

// pin a valid cid and see it in the pinned items table
addCidModal.cidInput().type(testCid)
addCidModal.pinSubmitButton().safeClick()
cidsPage.cidItemRow().should("have.length", 1)
Expand Down