Skip to content

Commit

Permalink
fix the smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-akamai committed Dec 10, 2024
1 parent cc2198e commit 2d228e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from 'support/intercepts/linodes';
import {
mockCreateVolume,
mockGetVolume,
mockGetVolumes,
mockDetachVolume,
mockGetVolumeTypesError,
Expand Down Expand Up @@ -85,6 +86,7 @@ describe('volumes', () => {

mockGetVolumes([]).as('getVolumes');
mockCreateVolume(mockVolume).as('createVolume');
mockGetVolume(mockVolume).as('getVolume');
mockGetVolumeTypes(mockVolumeTypes).as('getVolumeTypes');

cy.visitWithLogin('/volumes', {
Expand Down Expand Up @@ -114,7 +116,7 @@ describe('volumes', () => {

mockGetVolumes([mockVolume]).as('getVolumes');
ui.button.findByTitle('Create Volume').should('be.visible').click();
cy.wait(['@createVolume', '@getVolumes']);
cy.wait(['@createVolume', '@getVolume', '@getVolumes']);
validateBasicVolume(mockVolume.label);

ui.actionMenu
Expand Down Expand Up @@ -193,6 +195,7 @@ describe('volumes', () => {

mockDetachVolume(mockAttachedVolume.id).as('detachVolume');
mockGetVolumes([mockAttachedVolume]).as('getAttachedVolumes');
mockGetVolume(mockAttachedVolume).as('getVolume');
cy.visitWithLogin('/volumes', {
preferenceOverrides,
localStorageOverrides,
Expand All @@ -209,6 +212,8 @@ describe('volumes', () => {

ui.actionMenuItem.findByTitle('Detach').click();

cy.wait('@getVolume');

ui.dialog
.findByTitle(`Detach Volume ${mockAttachedVolume.label}?`)
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {
mockGetLinodeDisks,
mockGetLinodeVolumes,
} from 'support/intercepts/linodes';
import { mockMigrateVolumes, mockGetVolumes } from 'support/intercepts/volumes';
import {
mockMigrateVolumes,
mockGetVolumes,
mockGetVolume,
} from 'support/intercepts/volumes';
import { ui } from 'support/ui';

describe('volume upgrade/migration', () => {
Expand All @@ -23,6 +27,7 @@ describe('volume upgrade/migration', () => {
});

mockGetVolumes([volume]).as('getVolumes');
mockGetVolume(volume).as('getVolume');
mockMigrateVolumes().as('migrateVolumes');
mockGetNotifications([migrationScheduledNotification]).as(
'getNotifications'
Expand Down Expand Up @@ -53,7 +58,7 @@ describe('volume upgrade/migration', () => {
.click();
});

cy.wait(['@migrateVolumes', '@getNotifications']);
cy.wait(['@migrateVolumes', '@getVolume', '@getNotifications']);

cy.findByText('UPGRADE PENDING').should('be.visible');

Expand Down

0 comments on commit 2d228e2

Please sign in to comment.