1 import { OSDsPageHelper } from './osds.po';
3 describe('OSDs page', () => {
4 const osds = new OSDsPageHelper();
8 Cypress.Cookies.preserveOnce('token');
12 describe('breadcrumb and tab tests', () => {
13 it('should open and show breadcrumb', () => {
14 osds.expectBreadcrumbText('OSDs');
17 it('should show two tabs', () => {
18 osds.getTabsCount().should('eq', 2);
19 osds.getTabText(0).should('eq', 'OSDs List');
20 osds.getTabText(1).should('eq', 'Overall Performance');
24 describe('check existence of fields on OSD page', () => {
25 it('should check that number of rows and count in footer match', () => {
26 osds.getTableCount('total').then((text) => {
27 osds.getTableRows().its('length').should('equal', text);
31 it('should verify that buttons exist', () => {
32 cy.contains('button', 'Create');
33 cy.contains('button', 'Cluster-wide configuration');
36 describe('by selecting one row in OSDs List', () => {
38 osds.getExpandCollapseElement().click();
41 it('should show the correct text for the tab labels', () => {
42 cy.get('#tabset-osd-details > li > a').then(($tabs) => {
43 const tabHeadings = $tabs.map((_i, e) => e.textContent).get();
45 expect(tabHeadings).to.eql([
47 'Attributes (OSD map)',
50 'Performance counter',