data.gov icon indicating copy to clipboard operation
data.gov copied to clipboard

ckanext-datagovtheme has UI tests

Open jbrown-xentity opened this issue 4 years ago • 1 comments

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 avatar Nov 04 '21 20:11 jbrown-xentity

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

jbrown-xentity avatar Jun 17 '22 16:06 jbrown-xentity

Sentiment leans toward Cypress

hkdctol avatar Nov 10 '22 21:11 hkdctol

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

hkdctol avatar Nov 17 '22 21:11 hkdctol

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

Jin-Sun-tts avatar Nov 18 '22 16:11 Jin-Sun-tts

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.

Jin-Sun-tts avatar Nov 25 '22 15:11 Jin-Sun-tts