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

OKTA-798570 : Enable samedevice enrollment page polling test #3718

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leemchale-okta
Copy link
Contributor

@leemchale-okta leemchale-okta commented Sep 13, 2024

Description:

This PR updates the EnrollAuthenticatorOktaVerify_spec.js testcafe test to expect polling from the OV samedevice enrollment page.

PR Checklist

Issue:

Reviewers:

Screenshot/Video:

Downstream Monolith Build:

@leemchale-okta leemchale-okta changed the title enable samedevice enroll polling test OKTA-798570 : Enable samedevice enrollment page polling test Sep 13, 2024
@leemchale-okta leemchale-okta marked this pull request as ready for review September 13, 2024 19:05
Comment on lines 988 to 990
// expect polling for same device page
if (!userVariables.gen3) {
await t.wait(4000);
Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't expect polling for gen3? It looks like we were originally gating enrollSameDeviceMocks w/ a request to /challenge/poll behind gen3 variable above, though?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, is the 4 sec wait() an arbitrary number or some standardized interval? Regardless, I'd suggest making this a constant at the top of the spec since I just took a peek and it seems like it's used at least 1 other time

Copy link
Contributor

Choose a reason for hiding this comment

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

I also see wait(30000) used twice, if that is some sort of standardized interval it might make sense to make that a constant as part of this PR as well

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 gen 3 was actually always expecting polling while only gen 2 wasn't, thats why it was gated. But if I recall correctly the polling behavior between gen 2 and gen 3 is different, with gen 3 resulting in different poll counts after 4 seconds thats why only gen 2 polling was being tested here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

4 seconds is the standard interval between polls, so yeah good call ill make that a constant. Yeah the wait(30000) is for the 'send again' reminder prompt ill make that a constant as well.

@leemchale-okta leemchale-okta force-pushed the LM-enable-samedevice-enroll-polling-test-OKTA-798570 branch from f27f438 to 48b54e3 Compare September 17, 2024 19:08
Comment on lines +38 to +39
const POLLING_INTERVAL = 4000;
const RESEND_REMINDER_PROMPT_INTERVAL = 30000
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way we can shorten the polling interval in the mock file without causing issues in this test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants