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

[2.15] Cypress Fix for few flaky tests in index-management dashboard plugin during Jenkins executions #1419

Merged
merged 2 commits into from
Jun 19, 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 @@ -167,7 +167,7 @@ describe('Aliases', () => {
);
let num =
response_obj['_all']['total']['translog']['uncommitted_operations'];
expect(num).to.equal(1);
expect(num).not.equal(0);
});

cy.get('[data-test-subj="moreAction"]').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('Data stream', () => {
);
let num =
response_obj['_all']['total']['translog']['uncommitted_operations'];
expect(num).to.equal(1);
expect(num).not.equal(0);
});

cy.get('[data-test-subj="moreAction"]').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ describe('Indices', () => {
);
let num =
response_obj['_all']['total']['translog']['uncommitted_operations'];
expect(num).to.equal(1);
expect(num).not.equal(0);
});

// Select an index
Expand Down Expand Up @@ -688,7 +688,7 @@ describe('Indices', () => {
);
let num =
response_obj['_all']['total']['translog']['uncommitted_operations'];
expect(num).to.equal(1);
expect(num).not.equal(0);
});

cy.get('[data-test-subj="moreAction"]').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Rollups', () => {
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory/sampleData`);

// Click on "Sample data" tab
cy.contains('Sample data').click({ force: true });
cy.contains('Sample data', { timeout: 60000 }).click({ force: true });
Copy link
Member

Choose a reason for hiding this comment

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

You don't need this line.
There's not en element contains text "Sample data" on that page ${BASE_PATH}/app/home#/tutorial_directory/sampleData. No matter how long you wait, it will fail because it won't find any element.
image

Copy link
Author

Choose a reason for hiding this comment

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

@zhongnansu Am I missing something here? Isn't Sample data there(highlighted)?
image

// Load sample eCommerce data
cy.get(`button[data-test-subj="addSampleDataSetecommerce"]`).click({
force: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ describe('Transforms', () => {
.should('not.be.disabled')
.click();

// Extra wait to reduce the possibility of version conflict exception
cy.wait(2000);

cy.wait('@stopTransform');
cy.wait('@getTransform');

Expand Down
Loading