]>
Commit | Line | Data |
---|---|---|
e306af50 TL |
1 | import { PageHelper } from '../page-helper.po'; |
2 | ||
3 | export class DaemonsPageHelper extends PageHelper { | |
4 | pages = { | |
5 | index: { url: '#/rgw/daemon', id: 'cd-rgw-daemon-list' } | |
6 | }; | |
7 | ||
f67539c2 | 8 | getTableCell() { |
e306af50 | 9 | return cy |
f67539c2 | 10 | .get('.tab-content') |
e306af50 TL |
11 | .its(1) |
12 | .find('cd-table') | |
f67539c2 | 13 | .should('have.length', 1) // Only 1 table should be renderer |
e306af50 TL |
14 | .find('datatable-body-cell'); |
15 | } | |
16 | ||
17 | checkTables() { | |
18 | // click on a daemon so details table appears | |
19 | cy.get('.datatable-body-cell-label').first().click(); | |
20 | ||
21 | // check details table is visible | |
22 | // check at least one field is present | |
f67539c2 | 23 | this.getTableCell().should('be.visible').should('contain.text', 'ceph_version'); |
e306af50 TL |
24 | |
25 | // click on performance counters tab and check table is loaded | |
26 | cy.contains('.nav-link', 'Performance Counters').click(); | |
27 | ||
28 | // check at least one field is present | |
f67539c2 | 29 | this.getTableCell().should('be.visible').should('contain.text', 'objecter.op_r'); |
e306af50 TL |
30 | |
31 | // click on performance details tab | |
32 | cy.contains('.nav-link', 'Performance Details').click(); | |
e306af50 TL |
33 | } |
34 | } |