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

E2e tests #116

Merged
merged 45 commits into from
Sep 13, 2023
Merged

E2e tests #116

merged 45 commits into from
Sep 13, 2023

Conversation

federiva
Copy link
Contributor

@federiva federiva commented Jul 24, 2023

Have you read the Contributing Guidelines?

Closes #104
Closes #68

What this PR is about

  • Only saving screenshots when running them from the cli cypress run... as commented in this issue
  • Snapshot, visual tests using cypress-plugin-snapshots
  • Added yarn scripts for every example app
  • Added a wrapper script to run them all at once
  • Added R scripts to run the Shiny apps

Added new issue

  • Remove TODOs from cypress tests - We need to find on-render'ish events for the SVG paths to use them when writing the snapshot tests. Right now we are using explicit wait statements which is not ideal as rendering it is not deterministic/depending on many factors affecting the time of render

How to test

  1. Read the README on adding new tests
  2. Ensure that you have your yarn dependencies updated (go to tests/ and run yarn install)
  3. Go to the tests/ folder in the terminal and run run_cypress_tests -> Ensure that all of the tests have passed
  4. Optional. You can inspect the package.json file and run some tests individually: for example via yarn e2e-areaChart

tests/package.json Outdated Show resolved Hide resolved
Copy link
Member

@vedhav vedhav left a comment

Choose a reason for hiding this comment

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

The snapshots failed for me as you mentioned earlier, It Looks like we need to specify some tolerance.

Screenshot 2023-07-28 at 10 50 12 PM

@federiva federiva marked this pull request as ready for review July 31, 2023 03:50
@federiva federiva requested a review from vedhav July 31, 2023 03:54
federiva and others added 2 commits August 23, 2023 16:37
* feat: Simplifying script for running tests

* chore: Adding optparse

* Update tests/run_cypress_tests.sh

Co-authored-by: Vedha Viyash <[email protected]>

* fix: Adding folders

* style: lintr

* fix: Adding run_example_app helper script

* fix: Moving e2e folder

---------

Co-authored-by: Vedha Viyash <[email protected]>
Copy link
Contributor

@anirbanshaw24 anirbanshaw24 left a comment

Choose a reason for hiding this comment

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

Great job. Thanks for getting this to work. 🎉
LGTM. Approved ✅

@anirbanshaw24 anirbanshaw24 merged commit 73b96dd into dev Sep 13, 2023
5 checks passed
@anirbanshaw24 anirbanshaw24 deleted the e2e-tests branch September 13, 2023 08:26
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