1 import { PoolPageHelper } from '../pools/pools.po';
2 import { NotificationSidebarPageHelper } from './notification.po';
4 describe('Notification page', () => {
5 const notification = new NotificationSidebarPageHelper();
6 const pools = new PoolPageHelper();
7 const poolName = 'e2e_notification_pool';
11 Cypress.Cookies.preserveOnce('token');
12 pools.navigateTo('create');
13 pools.create(poolName, 8);
14 pools.edit_pool_pg(poolName, 4, false);
19 Cypress.Cookies.preserveOnce('token');
21 pools.delete(poolName);
26 Cypress.Cookies.preserveOnce('token');
30 it('should open notification sidebar', () => {
31 notification.getSidebar().should('not.be.visible');
33 notification.getSidebar().should('be.visible');
36 it('should display a running task', () => {
37 notification.getToast().should('not.exist');
39 // Check that running task is shown.
41 notification.getTasks().contains(poolName).should('exist');
43 // Delete pool after task is complete (otherwise we get an error).
44 notification.getTasks().contains(poolName, { timeout: 300000 }).should('not.exist');
47 it('should have notifications', () => {
49 notification.getNotifications().should('have.length.gt', 0);
52 it('should clear notifications', () => {
53 notification.getToast().should('not.exist');
55 notification.getNotifications().should('have.length.gt', 0);
56 notification.getClearNotficationsBtn().should('be.visible');
57 notification.clearNotifications();