Conversation
…ckdown into query-string
* loading Map style -> done * loading ui visibility statut -> WIP
* when we reload the page the style will gone , which needs to be fixed
* add lodash lib to manipulate the object * add query string param
* make overlay independet Component
|
Kudos, SonarCloud Quality Gate passed!
|
|
✔️ Deploy Preview for dazzling-visvesvaraya-f47271 ready! 🔨 Explore the source changes: 92e66b2 🔍 Inspect the deploy log: https://app.netlify.com/sites/dazzling-visvesvaraya-f47271/deploys/60c316c27c7b2e0007aa2b13 😎 Browse the preview: https://deploy-preview-388--dazzling-visvesvaraya-f47271.netlify.app |
| }); | ||
|
|
||
| it('render Correctly with context data' , async () => { | ||
| it('>>>render Correctly with context data' , async () => { |
There was a problem hiding this comment.
what do the >>> mean? does it do something?
There was a problem hiding this comment.
noo it doesn't have any meaning :) lol
| // query for element | ||
| const element = tree.findByType("div"); | ||
|
|
||
| expect(element.props.children.length).toEqual(4); |
There was a problem hiding this comment.
this is good start, can we also check if the text or color of the item is "expected"
| it('render Correctly with context data' , async () => { | ||
| it('>>>render Correctly with context data' , async () => { | ||
| const tree = renderer.create( | ||
| <AppContext.Provider value={envMock}> |
There was a problem hiding this comment.
I'm thinking it might make sense for someone debugging this test in the future, if you edit the envMock right before creating the const tree so that when viewing the test code, it's easy to see what the expected content will be. for example:
let usedEnv = envMock
usedMock.components[1] = {
"name":"Legend",
"is_visible": true,
"data": [
{
"title": "mapLegend.no",
"worldStyle": "2"
},
}
then you also don't need to keep changing the mock for each test case
Manage this branch in SquashTest this branch here: https://unit-test-8zp3j.squash.io |
add test case for Legend component to include data from context
