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] Add multiple s3 keys test #2247

Merged
merged 12 commits into from
Aug 31, 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
33 changes: 31 additions & 2 deletions packages/storage-ui/cypress/tests/api-keys-management.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ describe("Main Navigation", () => {
})
})

it("can copy to clipboard secret storage api key", () => {
it("can copy secret storage api key to the clipboard", () => {
// go to api keys section
navigationMenu.apiKeysNavButton().click()

// add new s3 api key
// add new storage api key
apiKeysPage.addApiKeyButton().click()

// ensure can copy to clipboard the secret key
Expand All @@ -90,5 +90,34 @@ describe("Main Navigation", () => {
newKeyModal.secretLabel().should("have.text", text)
})
})

it("can add multiple s3 api keys", () => {
// go to api keys section
navigationMenu.apiKeysNavButton().click()

// add first s3 api key
apiKeysPage.addS3KeyButton().click()
newKeyModal.secretLabel().should("be.visible")
newKeyModal.keyIdLabel().invoke("text").as("firstKeyId")
newKeyModal.closeButton().click()

// ensure key id and status of first key are correct in the table
cy.get<string>("@firstKeyId").then((keyId) => {
apiKeysPage.apiKeyIdCell().should("have.text", keyId)
})
apiKeysPage.apiKeyTypeCell().should("have.text", "s3")

// add second s3 api key
apiKeysPage.addS3KeyButton().click()
newKeyModal.secretLabel().should("be.visible")
newKeyModal.keyIdLabel().invoke("text").as("secondKeyId")
newKeyModal.closeButton().click()

// ensure key id and status of second key are correct in the table
cy.get<string>("@secondKeyId").then((keyId) => {
apiKeysPage.apiKeyIdCell().eq(1).should("have.text", keyId)
})
apiKeysPage.apiKeyTypeCell().eq(1).should("have.text", "s3")
})
})
})