-
Notifications
You must be signed in to change notification settings - Fork 317
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
base: master
Are you sure you want to change the base?
OKTA-798570 : Enable samedevice enrollment page polling test #3718
Conversation
// expect polling for same device page | ||
if (!userVariables.gen3) { | ||
await t.wait(4000); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
f27f438
to
48b54e3
Compare
const POLLING_INTERVAL = 4000; | ||
const RESEND_REMINDER_PROMPT_INTERVAL = 30000 |
There was a problem hiding this comment.
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?
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: