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

ckanext-datagovtheme has UI tests #3521

Closed
3 of 4 tasks
jbrown-xentity opened this issue Nov 4, 2021 · 6 comments
Closed
3 of 4 tasks

ckanext-datagovtheme has UI tests #3521

jbrown-xentity opened this issue Nov 4, 2021 · 6 comments
Assignees

Comments

@jbrown-xentity
Copy link
Contributor

jbrown-xentity commented Nov 4, 2021

User Story

In order to have confidence in UI changes in datagovtheme, data.gov sysadmins want Cypress tests (or other UI tests) implemented in datagovtheme.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN a change is made to an html page in datagovtheme
    WHEN tests are run on datagovtheme
    THEN the tests evaluate the UI as a user would
    AND errors are reported if the UI is not as expected

Background

We have a lot of UI bugs that have slipped through to production recently. We want to catch these bugs at the source, and not have to create tests at the catalog level that may be incomplete. We already do this for ckanext-dcat_usmetadata.

Security Considerations (required)

None, all code is already public

Sketch

Use cypress examples from catalog, inventory, and ckanext-dcat_usmetadata. Create test cases for key items:

@jbrown-xentity
Copy link
Contributor Author

Should consider using https://playwright.dev/python/docs/test-runners instead of cypress here, to keep everything in python.

@hkdctol hkdctol moved this to Product Backlog in data.gov team board Aug 2, 2022
@hkdctol hkdctol moved this from 📔 Product Backlog to 📟 Sprint Backlog [7] in data.gov team board Nov 10, 2022
@hkdctol
Copy link
Contributor

hkdctol commented Nov 10, 2022

Sentiment leans toward Cypress

@Jin-Sun-tts Jin-Sun-tts self-assigned this Nov 14, 2022
@Jin-Sun-tts Jin-Sun-tts moved this from 📟 Sprint Backlog [7] to 🏗 In Progress [8] in data.gov team board Nov 14, 2022
@hkdctol
Copy link
Contributor

hkdctol commented Nov 17, 2022

@Jin-Sun-tts will create an additional related ticket

@Jin-Sun-tts
Copy link
Contributor

created issue #4066 to fix the broken CKAN functions in datagovtheme.

@Jin-Sun-tts
Copy link
Contributor

Because datagovtheme does not have all dependencies for creating new harvest source from UI function, we just created test datasets from code, the do the cypress UI tests. This may have limits for some tests, but this make datagovtheme only keeps necessary components.

@nickumia-reisys nickumia-reisys moved this from 🏗 In Progress [8] to 👀 Needs Review [2] in data.gov team board Nov 29, 2022
@nickumia-reisys nickumia-reisys moved this from 👀 Needs Review [2] to ✔ Done in data.gov team board Nov 29, 2022
@nickumia-reisys
Copy link
Contributor

Looking back at tickets we never closed properly is fun because you can see the struggle it took to figure out how to design a solution and then how it was fixed. @Jin-Sun-tts implemented cypress tests for datagovtheme in the above PR.

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

4 participants