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(ci): reduce flakiness in add_users, siblings smoke test #6883

Merged
merged 10 commits into from
Dec 29, 2022
4 changes: 2 additions & 2 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ services:
args:
APP_ENV: dev
depends_on:
- broker:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this : at the end was causing error

ERROR: The Compose file './docker-compose.dev.yml' is invalid because:
services.kafka-setup.depends_on contains {"broker": null}, which is an invalid type, it should be a string

- schema-registry:
- broker
- schema-registry

datahub-gms:
image: linkedin/datahub-gms:debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ describe("add_user", () => {

cy.clickOptionWithText("Invite Users")

cy.waitTextVisible('signup?invite_token').then(($elem) => {
cy.waitTextVisible(/signup\?invite_token=\w+/).then(($elem) => {
Copy link
Collaborator Author

@anshbansal anshbansal Dec 29, 2022

Choose a reason for hiding this comment

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

Sometimes the UI was loading signup?invite_token= without any token before the url with token shows up and that got copied which led to invalid link. So adding regex that there should be something at the end of =

const inviteLink = $elem.text();
cy.log(inviteLink);
cy.logout();
cy.visit(inviteLink);
let name = tryToSignUp();
Expand Down
22 changes: 5 additions & 17 deletions smoke-test/tests/cypress/cypress/integration/siblings/siblings.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('siblings', () => {
cy.visit('/dataset/urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.customers,PROD)/?is_lineage_mode=false');

// navigate to the bq entity
cy.get('[data-testid="compact-entity-link-urn:li:dataset:(urn:li:dataPlatform:bigquery,cypress_project.jaffle_shop.customers,PROD)"]').click({ force: true });
cy.clickOptionWithTestId('compact-entity-link-urn:li:dataset:(urn:li:dataPlatform:bigquery,cypress_project.jaffle_shop.customers,PROD)');

// check merged platforms is not shown
cy.get('[data-testid="entity-header-test-id"]').contains('dbt & BigQuery').should('not.exist');
Expand All @@ -62,16 +62,16 @@ describe('siblings', () => {
cy.visit('/dataset/urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.customers,PROD)/?is_lineage_mode=false');

// navigate to the bq entity
cy.get('[data-testid="compact-entity-link-urn:li:dataset:(urn:li:dataPlatform:bigquery,cypress_project.jaffle_shop.customers,PROD)"]').click({ force: true });
cy.clickOptionWithTestId('compact-entity-link-urn:li:dataset:(urn:li:dataPlatform:bigquery,cypress_project.jaffle_shop.customers,PROD)');

cy.contains('Add Term').click();
cy.clickOptionWithText('Add Term');

cy.selectOptionInTagTermModal('CypressTerm');

cy.visit('/dataset/urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.customers,PROD)/?is_lineage_mode=false');

cy.get('a[href="/glossaryTerm/urn:li:glossaryTerm:CypressNode.CypressTerm"]').within(() => cy.get('span[aria-label=close]').click());
cy.contains('Yes').click();
cy.clickOptionWithText('Yes');

cy.contains('CypressTerm').should('not.exist');
});
Expand All @@ -88,18 +88,6 @@ describe('siblings', () => {
cy.get('.test-search-result-sibling-section').get('.test-mini-preview-class:contains(raw_orders)').should('have.length', 2);
});

it('will combine results in search', () => {
Copy link
Collaborator Author

@anshbansal anshbansal Dec 29, 2022

Choose a reason for hiding this comment

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

deleted as this was a duplicate test as the one above it (expand the diff to see the duplicate)

cy.login();
cy.visit('/search?page=1&query=%2522raw_orders%2522');

cy.contains('Showing 1 - 2 of 2 results');

cy.get('.test-search-result').should('have.length', 1);
cy.get('.test-search-result-sibling-section').should('have.length', 1);

cy.get('.test-search-result-sibling-section').get('.test-mini-preview-class:contains(raw_orders)').should('have.length', 2);
});

it('will combine results in lineage', () => {
cy.login();
cy.visit('dataset/urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.stg_orders,PROD)/?is_lineage_mode=true');
Expand All @@ -122,7 +110,7 @@ describe('siblings', () => {
cy.login();
cy.visit('dataset/urn:li:dataset:(urn:li:dataPlatform:dbt,cypress_project.jaffle_shop.stg_orders,PROD)/?is_lineage_mode=true');

cy.get('[data-testid="compress-lineage-toggle"]').click({ force: true });
cy.clickOptionWithTestId('compress-lineage-toggle');

// check the subtypes
cy.get('text:contains(View)').should('have.length', 2);
Expand Down
2 changes: 1 addition & 1 deletion smoke-test/tests/cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Cypress.Commands.add("enterTextInTestId", (id, text) => {
})

Cypress.Commands.add("clickOptionWithTestId", (id) => {
cy.get(selectorWithtestId(id)).click({
cy.get(selectorWithtestId(id)).first().click({
force: true,
});
})
Expand Down