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

test: E2E test flows + new app harness #256

Merged
merged 2 commits into from
Oct 24, 2019
Merged

Conversation

aarongranick-okta
Copy link
Contributor

@aarongranick-okta aarongranick-okta commented Oct 17, 2019

E2E tests with coverage on:

  • signin
  • getWithRedirect
  • getWithPopup
  • renewToken
  • getTokenWithoutPrompt
  • getUserInfo
  • okta hosted flows, both PKCE and implicit
  • direct login, using sessionToken

Adds an improved test harness app
auth-e2e

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@haishengwu-okta haishengwu-okta left a comment

Choose a reason for hiding this comment

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

LGTM.
but curious how we made decision to use wdio.js instead of testcafe which has been used in many products today.

@pradeepdewda-okta
Copy link

Why the testcafe is not used?

@aarongranick-okta
Copy link
Contributor Author

@haishengwu-okta @pradeepdewda-okta I was not aware there was a decision/direction to use testcafe. I'm sure the tests could be rewritten to use testcafe, I'm curious what would be the advantage?

@richardheng-okta
Copy link

We are using TestCafe for the sign-in-widget, my-okta, Azuqua and for Courage e2e. I strongly recommend using it over Selenium because of its several automatic anti-flakiness features.
Here is a document that outlines some of the reasoning:
https://oktawiki.atlassian.net/wiki/spaces/eng/pages/641499764/TestCafe+in+okta-ui

The biggest advantage I see personally is that you don't have to write any more 'waitFor' code before interacting with elements like this:
https://github.com/okta/okta-auth-js/pull/256/files#diff-669f14e7b65486de90052f44e8a2a2a0R86

If you have any questions, feel free to reach out.

@aarongranick-okta
Copy link
Contributor Author

aarongranick-okta commented Oct 23, 2019

@richardheng-okta FYI: I have started working on converting the tests to testcafe. I think I have hit a blocker, which is support for popup windows. Apparently testcafe can only run in a single window so all popups and links are opened in the same window. This will not allow us to properly test our login flow which uses a popup and message communication between the windows. DevExpress/testcafe#912

@robertjd I think it may be best to merge this PR, with webdriver IO tests. We can add an item on backlog to convert to testcafe when/if support for multiple windows is added. (Although the issue is 3 years old, it appears they ARE working on it)

@richardheng-okta
Copy link

@aarongranick-okta That seems reasonable to me. Thanks for looking into it!

@aarongranick-okta aarongranick-okta merged commit 2a6a631 into master Oct 24, 2019
@aarongranick-okta aarongranick-okta deleted the ag-e2e-OKTA-252542 branch October 24, 2019 17:25
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.

5 participants