Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add cypress test for report page direct link issue #20099

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const ALERT_LIST = '/alert/list/';
rusackas marked this conversation as resolved.
Show resolved Hide resolved
export const REPORT_LIST = '/report/list/';
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { ALERT_LIST } from './alert_report.helper';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.


describe('alert list view', () => {
beforeEach(() => {
cy.login();
});

afterEach(() => {
cy.eyesClose();
});

it('should load alert lists', () => {
cy.visit(ALERT_LIST);

cy.get('[data-test="listview-table"]').should('be.visible');
// check alert list view header
cy.get('[data-test="sort-header"]').eq(1).contains('Last run');
cy.get('[data-test="sort-header"]').eq(2).contains('Name');
cy.get('[data-test="sort-header"]').eq(3).contains('Schedule');
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Active');
cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { REPORT_LIST } from './alert_report.helper';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.


describe('report list view', () => {
beforeEach(() => {
cy.login();
});

afterEach(() => {
cy.eyesClose();
});

it('should load report lists', () => {
cy.visit(REPORT_LIST);

cy.get('[data-test="listview-table"]').should('be.visible');
// check report list view header
cy.get('[data-test="sort-header"]').eq(1).contains('Last run');
cy.get('[data-test="sort-header"]').eq(2).contains('Name');
cy.get('[data-test="sort-header"]').eq(3).contains('Schedule');
cy.get('[data-test="sort-header"]').eq(4).contains('Notification method');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Active');
cy.get('[data-test="sort-header"]').eq(8).contains('Actions');
});
});