Skip to content

Commit

Permalink
Merge branch 'dev' into feat/geojson
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Nov 6, 2023
2 parents ad33f7e + 6e8b82b commit 2beede7
Show file tree
Hide file tree
Showing 39 changed files with 680 additions and 611 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,23 @@ jobs:

- name: Test
run: yarn d2-app-scripts test
env:
REPORTPORTAL_API_KEY: ${{ secrets.REPORTPORTAL_API_KEY }}
REPORTPORTAL_ENDPOINT: ${{ vars.REPORTPORTAL_ENDPOINT }}
REPORTPORTAL_PROJECT: ${{ vars.REPORTPORTAL_PROJECT }}

call-workflow-e2e-prod:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: [build, lint, test]
uses: dhis2/line-listing-app/.github/workflows/e2e-prod.yml@master
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests.yml@master
secrets:
baseurl: ${{ secrets.CYPRESS_DHIS2_BASE_URL_DEV }}
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
recordkey: ${{ secrets.CYPRESS_RECORD_KEY }}
reportportal_api_key: ${{ secrets.REPORTPORTAL_API_KEY }}
reportportal_endpoint: ${{ vars.REPORTPORTAL_ENDPOINT }}
reportportal_project: ${{ vars.REPORTPORTAL_PROJECT }}

release:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## [100.2.2](https://github.com/dhis2/maps-app/compare/v100.2.1...v100.2.2) (2023-11-03)


### Bug Fixes

* do not show geojson or arcgis layers since they are not supported yet ([#3036](https://github.com/dhis2/maps-app/issues/3036)) ([8e4f4cd](https://github.com/dhis2/maps-app/commit/8e4f4cd86c6ab4d55a9a3332ae75dd8e8aa4231f))

## [100.2.1](https://github.com/dhis2/maps-app/compare/v100.2.0...v100.2.1) (2023-11-03)


### Bug Fixes

* ensure layer type is supported and remove the unsupported Google basemaps ([25de9ba](https://github.com/dhis2/maps-app/commit/25de9baeb74c76a3eca03b53031ee1643edfe925))
* external basemaps were not showing [DHIS2-15953] ([#3017](https://github.com/dhis2/maps-app/issues/3017)) ([47ef463](https://github.com/dhis2/maps-app/commit/47ef46356c52415e1b43f755e4302bbd319ce884))
* external layers were getting an endless spinner when being added to map [DHIS2-16078] ([#3023](https://github.com/dhis2/maps-app/issues/3023)) ([9a8f34e](https://github.com/dhis2/maps-app/commit/9a8f34ed4a35bcc31d2b3ddf94c892e1019c97cd))
* sorting of layers by drag and drop was not working [DHIS2-16024] ([#3021](https://github.com/dhis2/maps-app/issues/3021)) ([e006287](https://github.com/dhis2/maps-app/commit/e006287f55ea460b03e8a2636059e27ce3bfd8fc))
* **translations:** sync translations from transifex (dev) ([02b5f73](https://github.com/dhis2/maps-app/commit/02b5f7365916183510c33494873c49962eba602a))

# [100.2.0](https://github.com/dhis2/maps-app/compare/v100.1.7...v100.2.0) (2023-09-27)


Expand Down
28 changes: 28 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ async function setupNodeEvents(on, config) {

module.exports = defineConfig({
projectId: 'r5jduj',
reporter: '@reportportal/agent-js-cypress',
reporterOptions: {
endpoint: process.env.REPORTPORTAL_ENDPOINT,
apiKey: process.env.REPORTPORTAL_API_KEY,
launch: 'maps_app',
project: process.env.REPORTPORTAL_PROJECT,
description: '',
autoMerge: true,
parallel: true,
debug: false,
restClientConfig: {
timeout: 360000,
},
attributes: [
{
key: 'version',
value: 'master',
},
{
key: 'app_name',
value: 'maps_app',
},
{
key: 'test_level',
value: 'e2e',
},
],
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
Expand Down
11 changes: 11 additions & 0 deletions cypress/elements/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ export class Layer {
return this
}

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

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

return this
}

typeStartDate(dateString) {
cy.get('label')
.contains('Start date')
Expand Down
12 changes: 0 additions & 12 deletions cypress/elements/orgunit_layer.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/integration/filemenu.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
saveExistingMap,
deleteMap,
} from '../elements/file_menu.js'
import { OrgUnitLayer } from '../elements/orgunit_layer.js'
import { Layer as OrgUnitLayer } from '../elements/layer.js'
import { ThematicLayer } from '../elements/thematic_layer.js'
import { EXTENDED_TIMEOUT } from '../support/util.js'

Expand Down
21 changes: 21 additions & 0 deletions cypress/integration/layers/externallayer.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const LABELS_OVERLAY_TITLE = 'Labels overlay'

describe('External Layer', () => {
it('adds an external layer', () => {
cy.visit('/')

cy.getByDataTest('add-layer-button').click()

const dataTest = `addlayeritem-${`${LABELS_OVERLAY_TITLE}`
.toLowerCase()
.replace(/\s/g, '_')}`

cy.getByDataTest(dataTest).click()

cy.getByDataTest('map-loading-mask').should('not.exist')

cy.getByDataTest('layercard')
.contains(LABELS_OVERLAY_TITLE)
.should('be.visible')
})
})
59 changes: 59 additions & 0 deletions cypress/integration/layers/multilayers.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Layer as OrgUnitLayer } from '../../elements/layer.js'
import { getMaps } from '../../elements/map_canvas.js'
import { ThematicLayer } from '../../elements/thematic_layer.js'

const INDICATOR_NAME = 'ANC 1 Coverage'

describe('Multiple Layers', () => {
beforeEach(() => {
cy.visit('/')
})

const TLayer = new ThematicLayer()
const OULayer = new OrgUnitLayer()

it('adds a thematic layer and an orgunit layer', () => {
TLayer.openDialog('Thematic')
.selectIndicatorGroup('ANC')
.selectIndicator(INDICATOR_NAME)
.selectTab('Period')
.selectPeriodType('Yearly')
.selectTab('Org Units')
.selectOu('Sierra Leone')
.selectOuLevel('District')
.addToMap()

TLayer.validateDialogClosed(true)

TLayer.validateCardTitle(INDICATOR_NAME)

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

OULayer.openDialog('Org units')
.selectOu('Sierra Leone')
.selectOuLevel('District')
.addToMap()

OULayer.validateDialogClosed(true)

OULayer.validateCardTitle('Organisation units')
OULayer.validateCardItems(['District'])

cy.getByDataTest('sortable-layers-list')
.children()
.should('have.length', 2)

// confirm the order of the cards
cy.getByDataTest('sortable-layers-list')
.children()
.first()
.should('contain', 'Organisation units')

cy.getByDataTest('sortable-layers-list')
.children()
.last()
.should('contain', INDICATOR_NAME)

// TODO - add a test for drag/drop reordering of the layers
})
})
2 changes: 1 addition & 1 deletion cypress/integration/layers/orgunitlayer.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrgUnitLayer } from '../../elements/orgunit_layer.js'
import { Layer as OrgUnitLayer } from '../../elements/layer.js'

context('Org Unit Layers', () => {
beforeEach(() => {
Expand Down
2 changes: 2 additions & 0 deletions cypress/integration/layers/thematiclayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ context('Thematic Layers', () => {
Layer.openDialog('Thematic')
.selectIndicatorGroup('ANC')
.selectIndicator('ANC 1 Coverage')
.selectTab('Org Units')
.selectOu('Sierra Leone')
.selectTab('Period')

cy.getByDataTest('relative-period-select-content').click()
Expand Down
2 changes: 1 addition & 1 deletion cypress/plugins/excludeByVersionTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const getExcludedTags = (v) => {

if (currentInstanceVersion < MIN_DHIS2_VERSION) {
throw new Error(
'Instance version is lower than the minimum supported version'
`Instance version ${v} is lower than the minimum supported version ${MIN_DHIS2_VERSION}`
)
}

Expand Down
47 changes: 13 additions & 34 deletions i18n/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-09-06T13:08:55.205Z\n"
"POT-Creation-Date: 2023-10-23T12:55:26.288Z\n"
"PO-Revision-Date: 2019-06-25 18:35+0000\n"
"Last-Translator: Viktor Varland <[email protected]>, 2023\n"
"Language-Team: Arabic (https://app.transifex.com/hisp-uio/teams/100509/ar/)\n"
Expand All @@ -26,15 +26,6 @@ msgstr ""
msgid "Failed to save map: {{message}}"
msgstr ""

msgid "Calculation"
msgstr ""

msgid "No calculations found"
msgstr ""

msgid "Calculations can be created in the Data Visualizer app."
msgstr ""

msgid "Classification"
msgstr "تصنيف"

Expand Down Expand Up @@ -438,9 +429,6 @@ msgstr "عنصر بيانات الحدث مطلوب"
msgid "Program indicator is required"
msgstr "مؤشر البرنامج مطلوب"

msgid "Calculation is required"
msgstr ""

msgid "Period is required"
msgstr "الفترة مطلوبة"

Expand All @@ -456,9 +444,6 @@ msgstr "عناصر بيانات الحدث"
msgid "Program indicators"
msgstr "مؤشرات البرنامج"

msgid "Calculations"
msgstr ""

msgid "Item type"
msgstr "نوع العنصر"

Expand Down Expand Up @@ -914,12 +899,6 @@ msgstr "OSM Light"
msgid "OSM Detailed"
msgstr "OSM مفصل"

msgid "Google Streets"
msgstr "الشوارع بحسب غوغل"

msgid "Google Hybrid"
msgstr "Google Hybrid"

msgid "Bing Road"
msgstr "Bing طرقات"

Expand Down Expand Up @@ -1327,18 +1306,6 @@ msgstr "لم يتم العثور على الكيانات المتعقبة"
msgid "related"
msgstr "ذات صلة"

msgid "Thematic"
msgstr ""

msgid "Events"
msgstr "الأحداث"

msgid "Tracked entities"
msgstr "الكيانات المتعقبة"

msgid "Org units"
msgstr "الوحدات التنظيمية"

msgid "not one of"
msgstr ""

Expand All @@ -1364,6 +1331,18 @@ msgstr ""
"تتطلب هذه الطبقة حساب Google Earth Engine. تحقق من وثائق DHIS2 لمزيد من "
"المعلومات."

msgid "Thematic"
msgstr ""

msgid "Events"
msgstr "الأحداث"

msgid "Tracked entities"
msgstr "الكيانات المتعقبة"

msgid "Org units"
msgstr "الوحدات التنظيمية"

msgid "Facility"
msgstr "المنشأة"

Expand Down
32 changes: 13 additions & 19 deletions i18n/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2023-09-06T13:08:55.205Z\n"
"POT-Creation-Date: 2023-10-23T12:55:26.288Z\n"
"PO-Revision-Date: 2019-06-25 18:35+0000\n"
"Last-Translator: Jiří Podhorecký, 2023\n"
"Language-Team: Czech (https://app.transifex.com/hisp-uio/teams/100509/cs/)\n"
Expand Down Expand Up @@ -911,12 +911,6 @@ msgstr "OSM Light"
msgid "OSM Detailed"
msgstr "OSM Detailed"

msgid "Google Streets"
msgstr "Google Streets"

msgid "Google Hybrid"
msgstr "Google Hybrid"

msgid "Bing Road"
msgstr "Bing Road"

Expand Down Expand Up @@ -1331,18 +1325,6 @@ msgstr "Nenalezeny žádné trasované entity"
msgid "related"
msgstr "příbuzný"

msgid "Thematic"
msgstr "Tematický"

msgid "Events"
msgstr "Události"

msgid "Tracked entities"
msgstr "Trasované entity"

msgid "Org units"
msgstr "Organizační jednotky"

msgid "not one of"
msgstr "není jeden z"

Expand All @@ -1368,6 +1350,18 @@ msgstr ""
"Tato vrstva vyžaduje účet Google Earth Engine. Další informace najdete v "
"dokumentaci DHIS2."

msgid "Thematic"
msgstr "Tematický"

msgid "Events"
msgstr "Události"

msgid "Tracked entities"
msgstr "Trasované entity"

msgid "Org units"
msgstr "Organizační jednotky"

msgid "Facility"
msgstr "Zařízení"

Expand Down
Loading

0 comments on commit 2beede7

Please sign in to comment.