]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/logs.e2e-spec.ts
buildsys: change download over to reef release
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / cluster / logs.e2e-spec.ts
1 import { PoolPageHelper } from '../pools/pools.po';
2 import { LogsPageHelper } from './logs.po';
3
4 describe('Logs page', () => {
5 const logs = new LogsPageHelper();
6 const pools = new PoolPageHelper();
7
8 const poolname = 'e2e_logs_test_pool';
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 Cypress.Cookies.preserveOnce('token');
19 });
20
21 describe('breadcrumb and tab tests', () => {
22 beforeEach(() => {
23 logs.navigateTo();
24 });
25
26 it('should open and show breadcrumb', () => {
27 logs.expectBreadcrumbText('Logs');
28 });
29
30 it('should show three tabs', () => {
31 logs.getTabsCount().should('eq', 3);
32 });
33
34 it('should show cluster logs tab at first', () => {
35 logs.getTabText(0).should('eq', 'Cluster Logs');
36 });
37
38 it('should show audit logs as a second tab', () => {
39 logs.getTabText(1).should('eq', 'Audit Logs');
40 });
41
42 it('should show daemon logs as a third tab', () => {
43 logs.getTabText(2).should('eq', 'Daemon Logs');
44 });
45 });
46
47 describe('audit logs respond to pool creation and deletion test', () => {
48 it('should create pool and check audit logs reacted', () => {
49 pools.navigateTo('create');
50 pools.create(poolname, 8);
51 pools.navigateTo();
52 pools.existTableCell(poolname, true);
53 logs.checkAuditForPoolFunction(poolname, 'create', hour, minute);
54 });
55
56 it('should delete pool and check audit logs reacted', () => {
57 pools.navigateTo();
58 pools.delete(poolname);
59 logs.checkAuditForPoolFunction(poolname, 'delete', hour, minute);
60 });
61 });
62 });