-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgr/dashboard: Cluster Creation Create OSDs Section
Create OSDs section in cluster creation wizard Fixes: https://tracker.ceph.com/issues/51991 Signed-off-by: Aashish Sharma <aasharma@redhat.com>
- Loading branch information
Aashish Sharma
committed
Aug 9, 2021
1 parent
b53698b
commit 9e4add7
Showing
4 changed files
with
106 additions
and
2 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
60 changes: 60 additions & 0 deletions
60
...ntend/cypress/integration/orchestrator/workflow/03-create-cluster-create-osds.e2e-spec.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,60 @@ | ||
import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po'; | ||
|
||
describe('Create cluster create osds page', () => { | ||
const createCluster = new CreateClusterWizardHelper(); | ||
|
||
beforeEach(() => { | ||
cy.login(); | ||
Cypress.Cookies.preserveOnce('token'); | ||
createCluster.navigateTo(); | ||
createCluster.createCluster(); | ||
cy.get('button[aria-label="Next"]').click(); | ||
}); | ||
|
||
it('should check if nav-link and title contains Create OSDs', () => { | ||
cy.get('.nav-link').should('contain.text', 'Create OSDs'); | ||
|
||
cy.get('.title').should('contain.text', 'Create OSDs'); | ||
}); | ||
|
||
describe('when Orchestrator is available', () => { | ||
it('should create OSDs', () => { | ||
createCluster.getTableCount('total').as('initOSDCount'); | ||
|
||
createCluster.create('hdd'); | ||
|
||
cy.get('@newOSDCount').then((newCount) => { | ||
cy.get('@initOSDCount').then((oldCount) => { | ||
const expectedCount = Number(oldCount) + Number(newCount); | ||
|
||
// check total rows | ||
createCluster.expectTableCount('total', expectedCount); | ||
|
||
cy.wait(30000); | ||
expect(Number(newCount)).to.be.gte(1); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('by selecting one row in OSDs List', () => { | ||
beforeEach(() => { | ||
createCluster.getExpandCollapseElement().click(); | ||
}); | ||
|
||
it('should show the correct text for the tab labels', () => { | ||
cy.get('#tabset-osd-details > li > a').then(($tabs) => { | ||
const tabHeadings = $tabs.map((_i, e) => e.textContent).get(); | ||
|
||
expect(tabHeadings).to.eql([ | ||
'Devices', | ||
'Attributes (OSD map)', | ||
'Metadata', | ||
'Device health', | ||
'Performance counter', | ||
'Performance Details' | ||
]); | ||
}); | ||
}); | ||
}); | ||
}); |
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