-
Notifications
You must be signed in to change notification settings - Fork 334
Expand file tree
/
Copy pathcluster-role-bindings.spec.ts
More file actions
50 lines (40 loc) · 2.15 KB
/
cluster-role-bindings.spec.ts
File metadata and controls
50 lines (40 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { clusterRoleBindingNoData, generateClusterRoleBindingDataSmall } from '@/cypress/e2e/blueprints/explorer/rbac/cluster-role-bindings-get';
import { ClusterRoleBindingsPagePo } from '@/cypress/e2e/po/pages/explorer/cluster-role-bindings.po';
const clusterRoleBindingsPage = new ClusterRoleBindingsPagePo();
describe('ClusterRoleBindings', { testIsolation: false, tags: ['@explorer', '@adminUser'] }, () => {
before(() => {
cy.login();
});
describe('List', { tags: ['@noVai', '@adminUser'] }, () => {
it('validate cluster role bindings table in empty state', () => {
clusterRoleBindingNoData();
clusterRoleBindingsPage.goTo();
clusterRoleBindingsPage.waitForPage();
cy.wait('@clusterRoleBindingNoData');
const expectedHeaders = ['State', 'Name', 'Role', 'Users', 'Groups', 'Service Accounts', 'Age'];
clusterRoleBindingsPage.list().resourceTable().sortableTable().tableHeaderRow()
.get('.table-header-container .content')
.each((el, i) => {
expect(el.text().trim()).to.eq(expectedHeaders[i]);
});
clusterRoleBindingsPage.list().resourceTable().sortableTable().checkRowCount(true, 1);
});
it('validate cluster role bindings table', () => {
generateClusterRoleBindingDataSmall();
clusterRoleBindingsPage.goTo();
clusterRoleBindingsPage.waitForPage();
cy.wait('@clusterRoleBindingDataSmall');
// check table headers are visible
const expectedHeaders = ['State', 'Name', 'Role', 'Users', 'Groups', 'Service Accounts', 'Age'];
clusterRoleBindingsPage.list().resourceTable().sortableTable().tableHeaderRow()
.get('.table-header-container .content')
.each((el, i) => {
expect(el.text().trim()).to.eq(expectedHeaders[i]);
});
clusterRoleBindingsPage.list().resourceTable().sortableTable().checkVisible();
clusterRoleBindingsPage.list().resourceTable().sortableTable().checkLoadingIndicatorNotVisible();
clusterRoleBindingsPage.list().resourceTable().sortableTable().noRowsShouldNotExist();
clusterRoleBindingsPage.list().resourceTable().sortableTable().checkRowCount(false, 2);
});
});
});