]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/e2e/cluster/logs.e2e-spec.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / e2e / cluster / logs.e2e-spec.ts
CommitLineData
e306af50 1import { PoolPageHelper } from '../pools/pools.po';
e306af50
TL
2import { LogsPageHelper } from './logs.po';
3
4describe('Logs page', () => {
5 const logs = new LogsPageHelper();
6 const pools = new PoolPageHelper();
e306af50
TL
7
8 const poolname = 'e2e_logs_test_pool';
e306af50
TL
9 const today = new Date();
10 let hour = today.getHours();
11 if (hour > 12) {
12 hour = hour - 12;
13 }
14 const minute = today.getMinutes();
15
16 beforeEach(() => {
17 cy.login();
18 });
19
20 describe('breadcrumb and tab tests', () => {
21 beforeEach(() => {
22 logs.navigateTo();
23 });
24
25 it('should open and show breadcrumb', () => {
26 logs.expectBreadcrumbText('Logs');
27 });
28
2a845540
TL
29 it('should show three tabs', () => {
30 logs.getTabsCount().should('eq', 3);
e306af50
TL
31 });
32
33 it('should show cluster logs tab at first', () => {
34 logs.getTabText(0).should('eq', 'Cluster Logs');
35 });
36
37 it('should show audit logs as a second tab', () => {
38 logs.getTabText(1).should('eq', 'Audit Logs');
39 });
2a845540
TL
40
41 it('should show daemon logs as a third tab', () => {
42 logs.getTabText(2).should('eq', 'Daemon Logs');
43 });
e306af50
TL
44 });
45
46 describe('audit logs respond to pool creation and deletion test', () => {
47 it('should create pool and check audit logs reacted', () => {
48 pools.navigateTo('create');
49 pools.create(poolname, 8);
50 pools.navigateTo();
a4b75251 51 pools.existTableCell(poolname, true);
e306af50
TL
52 logs.checkAuditForPoolFunction(poolname, 'create', hour, minute);
53 });
54
55 it('should delete pool and check audit logs reacted', () => {
56 pools.navigateTo();
57 pools.delete(poolname);
58 logs.checkAuditForPoolFunction(poolname, 'delete', hour, minute);
59 });
60 });
e306af50 61});