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

Acceptance tests fail for prod builds of pass-ui #521

Closed
jabrah opened this issue Apr 17, 2023 · 3 comments
Closed

Acceptance tests fail for prod builds of pass-ui #521

jabrah opened this issue Apr 17, 2023 · 3 comments
Assignees

Comments

@jabrah
Copy link
Contributor

jabrah commented Apr 17, 2023

Parts of the current acceptance tests use data-test-* attributes to select certain elements for inspection, but these data attributes are stripped from the HTML for production builds. This is by design in the Ember build process, as these attributes are intended to be used for Ember tests.

We'll need to rewrite those parts of the acceptance tests that utilize these selectors to use other selectors. This may involve adding new element IDs where necessary

@jabrah jabrah self-assigned this Apr 17, 2023
@jabrah
Copy link
Contributor Author

jabrah commented Apr 17, 2023

As a temporary hold over, we can configure the Ember builds to not strip the selectors for prod builds: https://github.com/mainmatter/ember-test-selectors#configuration

@jabrah
Copy link
Contributor Author

jabrah commented Jun 21, 2023

Currently rewriting the selectors to not use the data-test-* attributes. This will work in the short term, but is not readable and will make updating and/or adding tests a bit painful. A better solution will be to add IDs to important UI elements and make sure the UI templates make sense semantically.

We should also look into making the authoring of tests easier. We could look at setting up Page Models in Testcafe, basically creating a page level API for interacting with the UI in tests

@jabrah
Copy link
Contributor Author

jabrah commented Jun 23, 2023

eclipse-pass/pass-acceptance-testing#8
eclipse-pass/pass-ui#1191

Decided to keep the data-test-* attributes in prod builds after all. The don't add extra information and only increase bundle size a small amount.

Ran into issues running the acceptance tests in my Windows environment, even though they ran without issue in other environments (Linux, Mac)

@jabrah jabrah closed this as completed Jun 23, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Ready for JHU Release in Eclipse PASS Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants