Skip to content

Commit

Permalink
Test: wait for loading before data picker (#160267)
Browse files Browse the repository at this point in the history
Closes [#156511](#156511),
[#156437](#156437)

## Summary

I was trying to find an actual cause of failure and I saw that the data
picker is not selected based on the [build
image](https://buildkiteartifacts.com/e0f3970e-3a75-4621-919f-e6c773e2bb12/b1106efc-ba5e-4e90-a857-11c4a899c05d/0187e138-69a5-4b5d-a640-eae612999ae8/0187e13a-2435-4efd-8429-149ed3dcbedd/target/test_failures/0187e13a-2435-4efd-8429-149ed3dcbedd_2955d90e677602496425cb872d4a9e51.html?response-content-type=text%2Fhtml&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQPCP3C7LX5FO4CXF%2F20230622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230622T124331Z&X-Amz-Expires=600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHkaCXVzLWVhc3QtMSJIMEYCIQDKbsVnKrx7Ub4fsYBLLFZpZqvgAiW8y1RKmhajEvq2BwIhAPZOGWn7ndW1dRgkf76JINXUp03plhbdqkwc%2B881RJfhKvoDCNH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMDMyMzc5NzA1MzAzIgxuCGd7wiO45qOdS2kqzgO6AuKMLFqIhOfRfkOvCWi%2BnVPNnEs5sl4ZkoVremR2I%2BXnPenXBiETXThI0FLSigmAtbB3K6mxaUZvyVMEMiLUDUkOgM61LIBkGwizJV1dqxeOwc2q34QjAnSc2Fm48SbSlJaJrh%2FsRnefChRSd%2Fa%2F2eA8jPOu97fahxw7OwN9Gd5MLuCCOKxdv%2F6%2FBwXxsMysRUvX3rPn65S3Ag3LzsjuLm88jdqxIOmbhiQx4CeNqzPmuawQf4WjbDe6%2B9cCcByiPDhEou5eqhvZRH6bc%2FaZnt8uidPIDTDbrn1sJ%2FypxOz0pGkqT6cI3fKQMFTTpzMocqer12jjqHrh1XEABMN%2FE%2FYg%2BwNvIRR4YDZAqdngEinW65A46%2B8SzS9xnFSmOgF0leDIJfQLt8cvbN%2BQnL4zQGwlm9l7ueKoNDyRHzpeIDm6w%2FoYjVeTnGY7GSOJRc%2FfF59M2dGoN%2Fq%2FP5OX98p6Lgr7zOqfshsJm32z9h55g7QqT71Gk59Z08WKAKkoUnKd4ZB1CZHmyYT6aSfwIXulW5ovFe8AU915R%2F1%2BqyYfWA5jFREgiExLgut9oXQuEQ5TEr9HFqWUNUAJyEpfSS57e5V6HBMp0A1ivPOa8B0wgYPQpAY6pAEQ24aPxAFAVAGGL5%2BVhlTboIFkgRsL8fYBLblJc7qyfGnLAryVcENCmZYGk9Dd7vd2RacvVRDNn%2B2ujyWuq7XW0om3CDfID0MY3czFs3LhiM8YwNzQL5M%2BdnI09Qy54zs45oKwehAIpH%2FIHZYMzoHjDqYT%2FgbA8Ohb9kPzexnaVydHs5fnGaa8qf8pKz2txleVWNyQSRQL%2Fpzs5F%2Bra9j7dfInDQ%3D%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=9da80138cd7ccf9f3e44540818f9d4ba3c122a5f298351fd325e2df57d454587)
~~What I also find there is this warning `warn browser[SEVERE]
http://localhost:5620/api/saved_objects_tagging/tags - Failed to load
resource: the server responded with a status of 403 (Forbidden)` which
can be another reason to not get the data.~~ This is related to a case
with a user with no rights to access it so it shouldn't be related.
I hope this fix will help to make sure that the date picker is selected
but after running the test many times locally it didn't fail with it. I
will also try it without the fix and see if there are other issues that
make it fail.

So I used retry to make sure they won't be flaky
  • Loading branch information
jennypavlova authored Jun 26, 2023
1 parent b30f8a6 commit 968c09a
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const appsMenu = getService('appsMenu');
const globalNav = getService('globalNav');
const retry = getService('retry');

// Failing: See https://github.com/elastic/kibana/issues/156511
describe.skip('infrastructure security', () => {
describe('infrastructure security', () => {
describe('global infrastructure all privileges', () => {
before(async () => {
await security.role.create('global_infrastructure_all_role', {
Expand Down Expand Up @@ -95,8 +95,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
ensureCurrentUrl: true,
shouldLoginIfPrompted: false,
});
await PageObjects.infraHome.goToTime(DATE_WITH_DATA);
await testSubjects.existOrFail('~waffleMap');
await retry.try(async () => {
await PageObjects.infraHome.goToTime(DATE_WITH_DATA);
await testSubjects.existOrFail('~waffleMap');
});
});

it(`doesn't show read-only badge`, async () => {
Expand Down Expand Up @@ -179,8 +181,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/156437
describe.skip('infrastructure landing page with data', () => {
describe('infrastructure landing page with data', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs');
});
Expand All @@ -194,8 +195,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
ensureCurrentUrl: true,
shouldLoginIfPrompted: false,
});
await PageObjects.infraHome.goToTime(DATE_WITH_DATA);
await testSubjects.existOrFail('~waffleMap');
await retry.try(async () => {
await PageObjects.infraHome.goToTime(DATE_WITH_DATA);
await testSubjects.existOrFail('~waffleMap');
});
});

it(`shows read-only badge`, async () => {
Expand Down

0 comments on commit 968c09a

Please sign in to comment.