Comments (3)
@thejoefriel @othman-shamla @susanX @wright1 @mr-bagglesworth
This is the demo repo for cypress if you all happy with how cypress works then we can add it to this repo
https://github.com/MohammedYehia/cypress-e2e-example
from curenetics.
@MohammedYehia I think a bit more info might be required here. Assuming, this is a full testing suite that can do unit tests, as well as integration tests...
More render test examples (such as the one render test in app.test.js) might be useful to see. In the context of our app, if a user gets a certain search result, what text, and what correlating colours do we expect the ui to display?
Also, is the main bulk of the testing performed in app.spec.js? I can see you are hitting a route in the app, then testing a classname (i.e. .App
). Do you know how this might work with styled components? Given our stack choice, class names won't be as semantic. Might be worth looking into this a bit.
Lastly, a couple more examples of unit tests with plain javascript functions tests might be useful to see, especially as we are going to have a variety of filter functions to process search results.
It feels like smaller unit tests should be the bread and butter, though integration testing is definitely something cool to learn, for me at least!
from curenetics.
@mr-bagglesworth for the file app.test.js
this is from React testing library and I guess we won't be using it
with the styled component, the cypress best practice is to add a custom data attribute like this data-*
<S.comp data-cy="123" />
and then we can use
cy.get("[data-cy=123]").click()
also, you should go with this pattern even if you have classes or ids
with this link, you will find a list full of cypress examples
https://docs.cypress.io/examples/examples/recipes.html
and you can split the tests into multiple files but this is just a demo
from curenetics.
Related Issues (20)
- Warning modal not working HOT 2
- Scroll to top HOT 2
- Link up the actual custom Loading component
- Add spacing between Export Results and the icon
- Put filename at top of exports
- Clinical Trials design issues HOT 1
- Warning modal doesnโt appear when you click any button that might take you away from the results
- Header on mobile looks odd
- Location always shows 5 miles HOT 2
- Limit nearest locations to 5
- Add postcode input to enter details manually
- Bug fixing HOT 4
- More sorting options for matched trials HOT 1
- To remove old version from online searches
- New bugs for fixing HOT 4
- Validation on patient's age
- Remove irrelevant eligible criteria for cancer types other than prostate
- Loading page is rendering text outside of screen
- Spacing issues on clinical results
- Show 'N/A' rather than 'No data' on clinical results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curenetics.