-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MGMT-12926: Grouping disks by holders (#2269)
* Grouping disks by holders * Tests for grouping disks by holders * Cleanup selectors and constants * Extract StoragePage and Alert classes * Align test classes and structure --------- Co-authored-by: Montse Ortega <[email protected]>
- Loading branch information
Showing
20 changed files
with
501 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
libs/ui-lib-tests/cypress/integration/storage/storage-step-disk-holders.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { commonActions } from '../../views/common'; | ||
import { ValidateDiskHoldersParams, hostsTableSection } from '../../views/hostsTableSection'; | ||
import { StorageForm } from '../../views/forms/Storage/StorageForm'; | ||
|
||
describe(`Assisted Installer Storage Step`, () => { | ||
let storageForm; | ||
const disks = [ | ||
{ name: 'vda' }, | ||
{ name: 'vdb' }, | ||
{ name: 'dm-1' }, | ||
{ name: 'sda', indented: true }, | ||
{ name: 'sdb', indented: true }, | ||
{ name: 'md0' }, | ||
{ name: 'vdc', indented: true }, | ||
{ name: 'vdd', indented: true }, | ||
{ name: 'sr0' }, | ||
] as ValidateDiskHoldersParams; | ||
|
||
const warningTexts = [ | ||
'LVM logical volumes were found on the installation disk vdb selected for host storage-test-odf-master-1 and will be deleted during installation.', | ||
'The installation disk vdc selected for host storage-test-odf-master-2, is part of a software RAID that will be deleted during the installation.', | ||
'The installation disk sdb selected for host storage-test-odf-master-3 is managed by multipath. We strongly recommend using the multipath device dm-1 to improve reliability.', | ||
]; | ||
|
||
const setTestStartSignal = (activeSignal: string) => { | ||
cy.setTestEnvironment({ | ||
activeSignal, | ||
activeScenario: 'AI_DISK_HOLDERS_CLUSTER', | ||
}); | ||
}; | ||
|
||
before(() => { | ||
setTestStartSignal('READY_TO_INSTALL'); | ||
}); | ||
|
||
describe(`Host storage`, () => { | ||
beforeEach(() => { | ||
setTestStartSignal('READY_TO_INSTALL'); | ||
commonActions.visitClusterDetailsPage(); | ||
commonActions.startAtWizardStep('Storage'); | ||
|
||
storageForm = new StorageForm(); | ||
}); | ||
|
||
it('Should display the correct alerts', () => { | ||
storageForm.diskLimitationAlert.title.should( | ||
'contain.text', | ||
'Warning alert:Installation disk limitations', | ||
); | ||
|
||
storageForm.diskLimitationAlert.description.find('li').then(($res) => { | ||
expect($res).to.have.length(3); | ||
warningTexts.forEach((text, index) => expect($res[index]).to.contain(text)); | ||
}); | ||
|
||
storageForm.diskFormattingAlert.title.should( | ||
'contain.text', | ||
'Warning alert:All bootable disks, except for read-only disks, will be formatted during installation. Make sure to back up any critical data before proceeding.', | ||
); | ||
}); | ||
|
||
it('Should display the correct warning for LVM', () => { | ||
disks[1].warning = true; | ||
|
||
hostsTableSection.getHostDisksExpander(0).click(); | ||
hostsTableSection.validateGroupingByDiskHolders(disks, warningTexts[0]); | ||
}); | ||
|
||
it('Should display the correct warning for RAID', () => { | ||
disks[1].warning = false; | ||
disks[6].warning = true; | ||
|
||
hostsTableSection.getHostDisksExpander(1).click(); | ||
hostsTableSection.validateGroupingByDiskHolders(disks, warningTexts[1]); | ||
}); | ||
|
||
it('Should display the correct warning for multipath', () => { | ||
disks[6].warning = false; | ||
disks[4].warning = true; | ||
|
||
hostsTableSection.getHostDisksExpander(2).click(); | ||
hostsTableSection.validateGroupingByDiskHolders(disks, warningTexts[2]); | ||
}); | ||
|
||
it('Should display no warnings', () => { | ||
disks[6].warning = false; | ||
|
||
hostsTableSection.getHostDisksExpander(2).click(); | ||
hostsTableSection.validateGroupingByDiskHolders(disks); | ||
}); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
libs/ui-lib-tests/cypress/integration/use-cases/create-cluster/with-mce-operator.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
libs/ui-lib-tests/cypress/support/variables/installation.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.