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 Test Failures #1302

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Expand Up @@ -101,6 +101,7 @@ describe('discover_advanced_setting', () => {
});
cy.reload();
cy.switchDiscoverTable('new');
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('.euiDataGridRowCell--date')
.eq(0)
Expand All @@ -123,6 +124,7 @@ describe('discover_advanced_setting', () => {
});
cy.reload();
cy.switchDiscoverTable('new');
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('.euiDataGridRowCell--date')
.eq(0)
Expand All @@ -144,6 +146,7 @@ describe('discover_advanced_setting', () => {
'discover:sort:defaultOrder': 'desc',
});
cy.reload();
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('[data-test-subj="docTableField"]')
.eq(0)
Expand All @@ -163,6 +166,7 @@ describe('discover_advanced_setting', () => {
'discover:sort:defaultOrder': 'asc',
});
cy.reload();
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('[data-test-subj="docTableField"]')
.eq(0)
Expand Down Expand Up @@ -192,6 +196,7 @@ describe('discover_advanced_setting', () => {
});
cy.reload();
cy.switchDiscoverTable('new');
cy.wait(2000); // Intentional Wait to account for low performant env
});

it('check new table respects Number of rows setting', function () {
Expand All @@ -203,6 +208,7 @@ describe('discover_advanced_setting', () => {

it('check legacy table respects Number of rows setting', function () {
cy.switchDiscoverTable('legacy');
cy.wait(2000); // Intentional Wait to account for low performant env
cy.get('[aria-label="Next"]').should('have.length', 5);
});

Expand Down Expand Up @@ -326,7 +332,8 @@ describe('discover_advanced_setting', () => {
'doc_table:highlight': false,
});
cy.reload();
// cy.switchDiscoverTable("legacy");
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('mark').should('not.exist');

// reset the setting to default value
Expand Down Expand Up @@ -373,6 +380,8 @@ describe('discover_advanced_setting', () => {
defaultColumns: ['host', 'agent'],
});
cy.reload();
cy.wait(2000); // Intentional Wait to account for low performant env

cy.get('[data-test-subj="docTableHeader-agent"]').should('be.visible');
cy.get('[data-test-subj="docTableHeader-host"]').should('be.visible');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ describe('discover_table', () => {
describe('expand multiple documents in legacy table', () => {
before(() => {
cy.switchDiscoverTable('legacy');
cy.wait(2000); // Intentional Wait to account for low performant env
});

it('checks if multiple documents can be expanded in legacy table', function () {
Expand Down
2 changes: 2 additions & 0 deletions cypress/utils/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ Cypress.Commands.add('loadSampleData', (type) => {

Cypress.Commands.add('fleshTenantSettings', () => {
if (Cypress.env('SECURITY_ENABLED')) {
localStorage.setItem('home:newThemeModal:show', 'false');
localStorage.setItem('home:welcome:show', 'false');
// Go to the home page to flesh the tenant settings
cy.visit(`/app/home`);
cy.waitForLoader();
Expand Down
Loading