Skip to content

test: [M3-7957] - Add Cypress integration test for SSH key update and delete - #10542

Merged
cliu-akamai merged 4 commits into
linode:developfrom
cliu-akamai:feature/M3-7957
Jul 2, 2024
Merged

cliu-akamai merged 4 commits into
linode:developfrom
cliu-akamai:feature/M3-7957

Conversation

@cliu-akamai

Copy link
Copy Markdown
Contributor

Description 📝

Add integration test to update and delete SSH key via Profile page.

Major Changes 🔄

  • Check users can update the label of SSH key through Profile page.
  • Check users can delete SSH key through Profile page.

How to test 🧪

yarn cy:run -s "cypress/e2e/core/account/ssh-keys.spec.ts"

@cliu-akamai
cliu-akamai requested a review from a team as a code owner June 3, 2024 22:18
@cliu-akamai
cliu-akamai requested review from AzureLatte and jdamore-linode and removed request for a team June 3, 2024 22:18
@github-actions

github-actions Bot commented Jun 3, 2024

Copy link
Copy Markdown

Coverage Report:
Base Coverage: 82.43%
Current Coverage: 82.43%

@mjac0bs mjac0bs changed the title M3-7957 Cypress integration test for SSH key update and delete test: [M3-7957] - Add Cypress integration test for SSH key update and delete Jun 4, 2024

@jdamore-linode jdamore-linode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work @cliu-akamai, posted a couple really minor suggestions for the comments, but the tests look perfect! Approved pending adding changeset with yarn changeset 👍

Comment on lines +424 to +430
* Intercepts POST request to create an SSH key.
*
* @param sshKey - SSH key object with which to mock response.
* @returns Cypress chainable.
*/
export const interceptCreateSSHKey = (): Cypress.Chainable<null> => {
return cy.intercept('POST', apiMatcher(`profile/sshkeys*`));
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we using this util anywhere?


describe('SSH keys', () => {
/*
* - Vaildates SSH key update flow using mock data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* - Vaildates SSH key update flow using mock data.
* - Validates SSH key update flow using mock data.


mockGetSSHKeys(mockSSHKeys).as('getSSHKeys');

// Navigate to SSH key landing page, click the "Add an SSH Key" button.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Navigate to SSH key landing page, click the "Add an SSH Key" button.
// Navigate to SSH key landing page.


mockGetSSHKeys([mockSSHKey]).as('getSSHKeys');

// Navigate to SSH key landing page, click the "Add an SSH Key" button.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Navigate to SSH key landing page, click the "Add an SSH Key" button.
// Navigate to SSH key landing page.

@AzureLatte AzureLatte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test passed

@cliu-akamai
cliu-akamai requested a review from a team as a code owner June 25, 2024 17:04
@cliu-akamai
cliu-akamai requested review from bnussman-akamai and hana-akamai and removed request for a team June 25, 2024 17:04
@jaalah-akamai jaalah-akamai added Approved Multiple approvals and ready to merge! and removed Missing Changeset labels Jun 27, 2024
@cliu-akamai
cliu-akamai merged commit 34c9d7b into linode:develop Jul 2, 2024
@cliu-akamai
cliu-akamai deleted the feature/M3-7957 branch July 2, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge!

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants