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

chore: add saml signup test / improve signup e2e test #16849

Merged
merged 31 commits into from
Oct 1, 2024
Merged

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Sep 26, 2024

What does this PR do?

  • Add SAML signup flow test
  • Simplify some code in signup e2e test
  • Add test for cookie consent checkbox

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

@hbjORbj hbjORbj marked this pull request as draft September 26, 2024 23:12
@graphite-app graphite-app bot requested a review from a team September 26, 2024 23:12
@keithwillcode keithwillcode added consumer core area: core, team members only labels Sep 26, 2024
@dosubot dosubot bot added the automated-tests area: unit tests, e2e tests, playwright label Sep 26, 2024
Copy link

graphite-app bot commented Sep 26, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (09/26/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:05pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:05pm

@hbjORbj hbjORbj marked this pull request as ready for review September 26, 2024 23:35
@@ -206,7 +206,7 @@ export default function Signup({
}
}, [redirectUrl]);

const [COOKIE_CONSENT, setCOOKIE_CONSENT] = useState(false);
const [COOKIE_CONSENT, setCOOKIE_CONSENT] = useState(false); // No need to be checked for user to proceed
Copy link
Contributor

@keithwillcode keithwillcode Sep 26, 2024

Choose a reason for hiding this comment

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

I think this is the first time I've ever seen something named with this casing 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh heeeel no 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah lol, let me change it

Copy link
Contributor

github-actions bot commented Sep 26, 2024

E2E results are ready!

Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Nice one thanks for adding tests here - lets consider skiping the SAML tests if they are disabled on the instance

apps/web/playwright/signup.e2e.ts Outdated Show resolved Hide resolved
apps/web/playwright/signup.e2e.ts Outdated Show resolved Hide resolved
apps/web/playwright/signup.e2e.ts Outdated Show resolved Hide resolved
@keithwillcode
Copy link
Contributor

keithwillcode commented Sep 30, 2024

@hbjORbj the following test is being marked as flaky. We should fix before merging.

cc @anikdhabal for any tips since you’ve being working on tests recently

1 flaky
[@***com/web] › apps/web/playwright/saml.e2e.ts:40:9 › SAML tests › SAML Signup Flow Test › Submit button should be disabled without email

@anikdhabal
Copy link
Contributor

anikdhabal commented Sep 30, 2024

cc @anikdhabal for any tips since you’ve being working on tests recently

Yes, this is flaky right now due to a race condition. As we can see in the newly added tests, the form is immediately filled after navigating to the signup page, without waiting for the page to fully load or render. After the page finishes loading, it resets the form.

To fix this, we need to wait for the page to load before filling out the form. In the old test, we wait for the text to be completely translated and visible on the page before filling out the form

@hbjORbj
Copy link
Contributor Author

hbjORbj commented Sep 30, 2024

Wow, thanks @anikdhabal !

Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Happy with this! Thanks for making them changes to the tests!

Ship it!

@hbjORbj hbjORbj merged commit 5ff52e1 into main Oct 1, 2024
38 checks passed
@hbjORbj hbjORbj deleted the tests/auth branch October 1, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright consumer core area: core, team members only ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants