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

feat: Onboard cypress with component test runner #34

Merged
merged 6 commits into from
Jan 19, 2022
Merged

Conversation

NorbertNader
Copy link
Contributor

@NorbertNader NorbertNader commented Jan 14, 2022

Overview

  • Onboard cypress with component test runner

  • Backfill on missing gestures tests. Was not able to get panning to work since triggering mousedown and mousemove are not propagating the event to the gesture handler.

Another gotcha I ran into is that cypress run-ct freezes with multiple tests in one file hence why I run zoom in and zoom out in one tests.

Created a branch to test failures. As expected, the workflow failed https://github.com/awslabs/iot-app-kit/runs/4821245292?check_suite_focus=true

Tests

Added integration tests

Legal

This project is available under the Apache 2.0 License.

* Backfill on missing gestures tests. Was not able to get panning to work since triggering mousedown and mousemove are not propagating the event to the gesture handler.
@NorbertNader NorbertNader self-assigned this Jan 14, 2022
@NorbertNader NorbertNader added the enhancement New feature or request label Jan 14, 2022
@@ -16,7 +16,31 @@ jobs:
run: |
yarn install
yarn build
./packages/components/node_modules/cypress/bin/cypress install
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@diehbria diehbria left a comment

Choose a reason for hiding this comment

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

awesome! Glad to see it works. Is there an open issue on CT about the multi test in a file?

One thing I noticed is it looks like the style sheets aren't being picked up in the snapshots

@NorbertNader
Copy link
Contributor Author

awesome! Glad to see it works. Is there an open issue on CT about the multi test in a file?

One thing I noticed is it looks like the style sheets aren't being picked up in the snapshots

The tests are not picking up the styles because I am not importing the synchro-charts css anywhere like we are in testing-ground @import "~@synchro-charts/core/dist/synchro-charts/synchro-charts.css"

As for the freezing tests, I could not find an open issue for this. I might have to open one myself but before I do that I will have to figure out what is causing this. The chart axis actually loads but the chart visualization does not.

@diehbria
Copy link
Contributor

awesome! Glad to see it works. Is there an open issue on CT about the multi test in a file?
One thing I noticed is it looks like the style sheets aren't being picked up in the snapshots

The tests are not picking up the styles because I am not importing the synchro-charts css anywhere like we are in testing-ground @import "~@synchro-charts/core/dist/synchro-charts/synchro-charts.css"

is there any solution to adding the styles so the tests reflect what the app kit would look like for users?

@NorbertNader
Copy link
Contributor Author

NorbertNader commented Jan 18, 2022

import "@synchro-charts/core/dist/synchro-charts/synchro-charts.css"

Ofc we can! This assumes though that the customer will import the styles. I guess it is up to us if we want to test it raw or with the styles we recommend.

@NorbertNader NorbertNader merged commit 82479eb into main Jan 19, 2022
@NorbertNader NorbertNader deleted the cypress branch February 22, 2022 17:58
sheilaXu added a commit that referenced this pull request Sep 23, 2022
* Add SceneComposerInternal and move root level files to sub folders

* update coverage

Co-authored-by: Xinyi Xu <xinyxu@amazon.com>
TheEvilDev pushed a commit that referenced this pull request Nov 2, 2022
* feat: Onboard cypress with component test runner

* Backfill on missing gestures tests. Was not able to get panning to work since triggering mousedown and mousemove are not propagating the event to the gesture handler.

* Add styles to rendered charts

Co-authored-by: Norbert Nader <nnader@amazon.com>
This was referenced Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants