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(web): fixed the flaky failing e2e tests after the changes we introduced with the async launch darkly #5575

Merged
merged 1 commit into from
May 16, 2024

Conversation

LetItRock
Copy link
Contributor

What changed? Why was the change needed?

Fixed a couple of failing e2e tests in the Web application.

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

@LetItRock LetItRock requested review from antonjoel82 and a team May 15, 2024 12:57
@LetItRock LetItRock self-assigned this May 15, 2024
@LetItRock LetItRock requested a review from a team as a code owner May 15, 2024 12:57
@LetItRock LetItRock requested review from BiswaViraj and removed request for a team May 15, 2024 12:57
Copy link

netlify bot commented May 15, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 9e060b9
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/664530a9fae4de0008a17f3a
😎 Deploy Preview https://deploy-preview-5575--dev-web-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 15, 2024

Deploy Preview for novu-design ready!

Name Link
🔨 Latest commit 9e060b9
🔍 Latest deploy log https://app.netlify.com/sites/novu-design/deploys/664530a9f1824400084973c2
😎 Deploy Preview https://deploy-preview-5575--novu-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

cy.getByTestId('email').type('test-user-1@example.com');
cy.getByTestId('password').type('123qwe!@#');
cy.getByTestId('submit-btn').click();

cy.waitLoadFeatureFlags();

cy.waitForNetworkIdle(500);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like there were some race conditions between the network and logic to mock the launch darkly requests, but not 100% sure.

cy.visit('/subscribers');

cy.waitLoadFeatureFlags();
cy.getByTestId('side-nav-subscribers-link').click();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when using the cy.visit('/subscribers'); it looks like that application is hanging with the loader... @antonjoel82 we have to verify that when the token is expired and the user refreshes the page he will be navigated to the login page...

Copy link
Contributor

Choose a reason for hiding this comment

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

Validated this manually, but as mentioned via slack and the original PR, we deemed it wasn't worthwhile to try to fix and fight with all these tests if we're going to delete them this week anyway.

I elected to skip in this PR (#5570)

Comment on lines +226 to +228
cy.waitLoadFeatureFlags(() => {
cy.visit('/auth/login');
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wait for LD mocked request to finish

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is necessary because we don't block at /auth/login anyway

Copy link
Contributor Author

@LetItRock LetItRock May 15, 2024

Choose a reason for hiding this comment

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

all the routes are wrapped in LD provider... but I'll check it, because I've added all the changes at the same time which helped

@LetItRock LetItRock force-pushed the fix-failing-e2e-after-launch-darkly-changes branch from 3137692 to 4c9a6f5 Compare May 15, 2024 13:32
@LetItRock LetItRock force-pushed the fix-failing-e2e-after-launch-darkly-changes branch 5 times, most recently from 1a77a21 to 67f8a83 Compare May 15, 2024 21:30
@LetItRock LetItRock force-pushed the fix-failing-e2e-after-launch-darkly-changes branch from 67f8a83 to 9e060b9 Compare May 15, 2024 22:01
@LetItRock LetItRock merged commit bd55e05 into next May 16, 2024
37 checks passed
@LetItRock LetItRock deleted the fix-failing-e2e-after-launch-darkly-changes branch May 16, 2024 07:32
github-actions bot pushed a commit that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants