Skip to content

Commit

Permalink
test: [M3-6609] - Add Linode details page assertion for LISH via SSH …
Browse files Browse the repository at this point in the history
…Info (#10513)

* Add Linode details page assertion for LISH via SSH Info

* update comments

* update test

* update test

* Added changeset: Add Linode details page assertion for LISH via SSH Info

* updates after reviews
  • Loading branch information
AzureLatte authored May 28, 2024
1 parent 432909f commit b6c4094
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10513-tests-1716492994025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Add Linode details page assertion for LISH via SSH Info ([#10513](https://github.com/linode/manager/pull/10513))
19 changes: 19 additions & 0 deletions packages/manager/cypress/e2e/core/linodes/create-linode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import {
} from 'support/intercepts/feature-flags';
import { interceptCreateLinode } from 'support/intercepts/linodes';
import { makeFeatureFlagData } from 'support/util/feature-flags';
import { interceptGetProfile } from 'support/intercepts/profile';

let username: string;

authenticate();
describe('Create Linode', () => {
Expand Down Expand Up @@ -70,6 +73,8 @@ describe('Create Linode', () => {
});
const linodeLabel = randomLabel();

interceptGetProfile().as('getProfile');

interceptCreateLinode().as('createLinode');
cy.visitWithLogin('/linodes/create');

Expand Down Expand Up @@ -116,10 +121,24 @@ describe('Create Linode', () => {
cy.url().should('endWith', `/linodes/${responsePayload['id']}`);
});

cy.wait('@getProfile').then((xhr) => {
username = xhr.response?.body.username;
});

// TODO Confirm whether or not toast notification should appear here.
cy.findByText('RUNNING', { timeout: LINODE_CREATE_TIMEOUT }).should(
'be.visible'
);

// confirm that LISH Console via SSH section is correct
cy.contains('LISH Console via SSH')
.should('be.visible')
.closest('tr')
.within(() => {
cy.contains(
`ssh -t ${username}@lish-${linodeRegion.id}.linode.com ${linodeLabel}`
).should('be.visible');
});
});
});
});
Expand Down

0 comments on commit b6c4094

Please sign in to comment.