Skip to content

Commit

Permalink
Merge branch 'master' into feat/DHIS2-15796
Browse files Browse the repository at this point in the history
  • Loading branch information
BRaimbault authored Nov 18, 2024
2 parents 0ee3fad + cf9cd47 commit 537c0f7
Show file tree
Hide file tree
Showing 17 changed files with 380 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set build_exists env var
id: check_build
run: |
if ls build/bundle/maps-app-*.zip 1> /dev/null 2>&1; then
if ls build/bundle/maps-*.zip 1> /dev/null 2>&1; then
echo "build_exists=true" >> $GITHUB_ENV
else
echo "build_exists=false" >> $GITHUB_ENV
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [100.7.6](https://github.com/dhis2/maps-app/compare/v100.7.5...v100.7.6) (2024-11-17)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([f5856b9](https://github.com/dhis2/maps-app/commit/f5856b99455f5b1d414ccbe28cc22fd97e60997f))

## [100.7.5](https://github.com/dhis2/maps-app/compare/v100.7.4...v100.7.5) (2024-11-12)


### Bug Fixes

* allow editing invalid layers ([#3396](https://github.com/dhis2/maps-app/issues/3396)) ([13931b0](https://github.com/dhis2/maps-app/commit/13931b0ea4b37ac86b701b97643ea757c2642a0f))

## [100.7.4](https://github.com/dhis2/maps-app/compare/v100.7.3...v100.7.4) (2024-11-04)


Expand Down
33 changes: 32 additions & 1 deletion cypress/elements/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,37 @@ export class Layer {
return this
}

unselectOu(ouName) {
cy.getByDataTest('org-unit-tree').contains(ouName).scrollIntoView()

cy.getByDataTest('org-unit-tree')
.contains(ouName)
.find('input')
.uncheck()

return this
}

selectOuLevel(level) {
cy.getByDataTest('org-unit-level-select').click()

cy.getByDataTest('dhis2-uicore-select-menu-menuwrapper')
.contains(level)
.click()
.find('input')
.check()
cy.get('body').click() // Close the modal menu

return this
}

unselectOuLevel(level) {
cy.getByDataTest('org-unit-level-select').click()

cy.getByDataTest('dhis2-uicore-select-menu-menuwrapper')
.contains(level)
.find('input')
.uncheck()

cy.get('body').click() // Close the modal menu

return this
Expand Down Expand Up @@ -64,6 +89,12 @@ export class Layer {
.click()
}

updateMap() {
cy.getByDataTest('dhis2-uicore-modalactions')
.contains('Update layer')
.click()
}

validateDialogClosed(closed) {
if (closed) {
cy.getByDataTest('layeredit').should('not.exist')
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/layers/geojsonlayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('GeoJSON URL Layer', () => {
cy.getByDataTest('more-menu')
.find('li')
.not('.disabled')
.should('have.length', 2)
.should('have.length', 3) // Edit layer, Remove layer, divider line

cy.getByDataTest('more-menu')
.find('li')
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('GeoJSON URL Layer', () => {
cy.getByDataTest('more-menu')
.find('li')
.not('.disabled')
.should('have.length', 2)
.should('have.length', 3) // Edit layer, Remove layer, divider line

cy.getByDataTest('more-menu')
.find('li')
Expand Down
52 changes: 50 additions & 2 deletions cypress/integration/layers/thematiclayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ context('Thematic Layers', () => {

const Layer = new ThematicLayer()

it('shows error if no indicator group selected', () => {
it('shows error in layer edit modal if no indicator group selected', () => {
Layer.openDialog('Thematic').addToMap()

Layer.validateDialogClosed(false)

cy.contains('Indicator group is required').should('be.visible')
})

it('shows error if no indicator selected', () => {
it('shows error in layer edit modal if no indicator selected', () => {
Layer.openDialog('Thematic').selectIndicatorGroup('HIV').addToMap()

Layer.validateDialogClosed(false)
Expand Down Expand Up @@ -226,4 +226,52 @@ context('Thematic Layers', () => {

getMaps().should('have.length', 1)
})

it('handles an error in the layer configuration', () => {
cy.visit('/')

Layer.openDialog('Thematic')
.selectIndicatorGroup('HIV')
.selectIndicator(INDICATOR_NAME)
.selectTab('Period')
.selectPeriodType('Yearly')
.selectTab('Org Units')
.selectOu('Bo')
.unselectOuLevel('District')
.selectOuLevel('National')
.addToMap()

Layer.validateDialogClosed(true)

Layer.validateCardTitle(INDICATOR_NAME)

// check that loading completes and the layer card is present
cy.getByDataTest('map-loading-mask').should('not.exist')

cy.getByDataTest('layercard')
.contains(INDICATOR_NAME)
.should('be.visible')

// check that an error is displayed in the layer card
cy.getByDataTest('load-error-noticebox').should('be.visible')
cy.getByDataTest('load-error-noticebox')
.find('h6')
.contains('Failed to load layer')
.should('be.visible')
cy.getByDataTest('dhis2-uicore-noticebox-content-message')
.contains(
'Organisation unit or organisation unit level is not valid'
)
.should('be.visible')

// edit the layer to make it valid
cy.getByDataTest('layer-edit-button').click()
Layer.selectTab('Org Units')
.unselectOuLevel('National')
.selectOuLevel('Chiefdom')
.updateMap()

// confirm that the map is valid now
cy.getByDataTest('layerlegend-item').should('have.length', 5)
})
})
37 changes: 20 additions & 17 deletions i18n/lo.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-09-24T14:47:22.063Z\n"
"POT-Creation-Date: 2024-10-23T12:50:51.401Z\n"
"PO-Revision-Date: 2019-06-25 18:35+0000\n"
"Last-Translator: Saysamone Sibounma, 2024\n"
"Language-Team: Lao (https://app.transifex.com/hisp-uio/teams/100509/lo/)\n"
Expand Down Expand Up @@ -280,7 +280,7 @@ msgid "event"
msgstr "ເຫດການ"

msgid "tracked entity"
msgstr ""
msgstr "ຕິດຕາມຕົວຢ່າງ"

msgid "facility"
msgstr "ສະຖານທີ່ບໍລິການ"
Expand Down Expand Up @@ -338,7 +338,7 @@ msgid ""
msgstr ""

msgid "Unit"
msgstr ""
msgstr "ຫົວໜ່ວຍ"

msgid "Spatial resolution"
msgstr ""
Expand Down Expand Up @@ -458,16 +458,16 @@ msgid "Include org units with no data"
msgstr "ລວມຫົວໜ່ວຍການຈັດຕັ້ງທີ່ບໍ່ມີຂໍ້ມູນ"

msgid "Low radius"
msgstr ""
msgstr "ລັດສະໝີຕ່ຳ"

msgid "High radius"
msgstr ""
msgstr "ລັດສະໝີສູງ"

msgid "High radius should be greater than low radius"
msgstr ""
msgstr "ລັດສະໝີທີ່ສູງຄວນຫຼາຍກ່ວາລັດສະໝີຕ່ຳ"

msgid "Radius should be between {{min}} and {{max}}"
msgstr ""
msgstr "ລັດສະໝີຄວນຢູ່ລະຫວ່າງ {{min}}ແລະ {{max}}"

msgid "Indicator group is required"
msgstr "ຕ້ອງຕື່ມກຸ່ມຕົວຊີ້ວັດ"
Expand Down Expand Up @@ -515,10 +515,10 @@ msgid "Item type"
msgstr "ປະເພດລາຍການ"

msgid "Select period when tracked entities were last updated"
msgstr ""
msgstr "ເລືອກຊ່ວງເວລາທີ່ຕິດຕາມຕົວຢ່າງລາຍບຸກຄົນທີ່ມີການອັບເດດຄັ້ງຫຼ້າສຸດ"

msgid "Program/Enrollment date"
msgstr ""
msgstr "ສາຍງານ / ວັນທີ່ລົງທະບຽນ"

msgid "the date a tracked entity was registered or enrolled in a program"
msgstr ""
Expand All @@ -541,13 +541,13 @@ msgid ""
msgstr ""

msgid "Display Tracked Entity relationships"
msgstr ""
msgstr "ສະແດງຄວາມສຳພັນຂອງການຕິດຕາມລາຍບຸກຄົນ"

msgid "Tracked entity style"
msgstr ""
msgstr "ຮູບແບບຕິດຕາມຕົວຕ່າງລາຍບຸກຄົນ"

msgid "Point size"
msgstr ""
msgstr "ຂະໜາດຈຸດ"

msgid "Related entity style"
msgstr ""
Expand Down Expand Up @@ -627,7 +627,7 @@ msgid "Data download failed."
msgstr "ດາວໂຫຼດຂໍ້ມູນບໍ່ສຳເລັດ."

msgid "External layer"
msgstr ""
msgstr "ຊັ້ນພາຍນອກ"

msgid "Split view can not be combined with other layer types."
msgstr ""
Expand All @@ -651,7 +651,7 @@ msgid "Layer is invalid"
msgstr ""

msgid "Set layer opacity"
msgstr ""
msgstr "ຕັ້ງຄ່າຄວາມໜາຂອງຊັ້ນ"

msgid "More actions"
msgstr "ການປະຕິບັດເພີ່ມເຕີມ"
Expand Down Expand Up @@ -740,6 +740,9 @@ msgstr ""
msgid "No data"
msgstr "ບໍ່ມີຂໍ້ມູນ"

msgid "Could not retrieve tracked entity data"
msgstr ""

msgid "Last updated"
msgstr "ປັບປຸງ​ຄັ້ງຫລ້າສຸດ"

Expand Down Expand Up @@ -898,10 +901,10 @@ msgid "Selected only"
msgstr "ເລືອກສະເພາະ"

msgid "Selected and below"
msgstr ""
msgstr "ເລືອກ ແລະ ດ້ານລຸ່ມ"

msgid "Selected and all below"
msgstr ""
msgstr "ເລືອກ ແລະຕ່ຳກ່ວາທັງໝົດ"

msgid "Selection mode"
msgstr "ເລືອກຮູບແບບ"
Expand Down Expand Up @@ -934,7 +937,7 @@ msgid "Timeline"
msgstr ""

msgid "Split map views"
msgstr ""
msgstr "ແຍກມຸມມອງຂອງແຜ່ນທີ່"

msgid "Start date"
msgstr "ວັນທີເລີ່ມຕົ້ນ"
Expand Down
Loading

0 comments on commit 537c0f7

Please sign in to comment.