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

Introduce some Jest tests for the user interface #24

Open
jrgriffiniii opened this issue Feb 3, 2020 · 5 comments
Open

Introduce some Jest tests for the user interface #24

jrgriffiniii opened this issue Feb 3, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@jrgriffiniii
Copy link
Collaborator

Currently there are no functional tests which address JavaScript behavior for the application. Perhaps using the Jest framework for the application could ensure that the UI behaves properly in the browser.

Some behavior worth testing might be:

Dropdowns on the search results interface

image

Modal dialogues on the item show page

image

@jrgriffiniii jrgriffiniii added the enhancement New feature or request label Feb 3, 2020
@jrgriffiniii
Copy link
Collaborator Author

This is my shameless way of using the workshop to advance geoblacklight/geoblacklight#680. I am not certain exactly how to best integrate Jest, so this will be a spike.

@jrgriffiniii
Copy link
Collaborator Author

jrgriffiniii commented Feb 3, 2020

I'm now seeing that one needs to use https://github.com/puppeteer/puppeteer/ in order to run headless Chrome tests with Jest. I can look at trying to get something up and running for this.

https://jestjs.io/docs/en/puppeteer also looks like a good resource.

@mejackreed
Copy link
Member

So in geoblacklight/geoblacklight#680 I think we only need to run Jest for the JavaScript unit tests not the integration tests.

Recommended setup for Rails/GeoBlacklight/Blacklight integration tests are using rspec / capybara / webdrivers

@jrgriffiniii
Copy link
Collaborator Author

@irv I've been able to get things running locally with https://github.com/geoblacklight/workshop-app-2020/compare/jest-spike-jrgriffiniii - I can continue with looking to get GeoBlacklight running and seeded.

@mejackreed
Copy link
Member

👏 Cool... looks like GeoBlacklight might be even simpler as we wouldn't need puppeteer just to support the JS unit tests

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

No branches or pull requests

3 participants