Skip to content

Commit

Permalink
Merge branch 'master' into DHIS2-7630
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen authored Feb 3, 2021
2 parents d0c3110 + 46cb8d4 commit 7f35907
Show file tree
Hide file tree
Showing 129 changed files with 4,658 additions and 2,811 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: 'dhis2: verify (app)'

on:
push:
branches:
on: push

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
Expand All @@ -11,6 +9,7 @@ env:
GIT_COMMITTER_EMAIL: 'apps@dhis2.org'
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
CI: true
D2_VERBOSE: true

jobs:
install:
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
## [31.10.2](https://github.com/dhis2/dashboard-app/compare/v31.10.1...v31.10.2) (2021-02-03)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([#1420](https://github.com/dhis2/dashboard-app/issues/1420)) ([03c4697](https://github.com/dhis2/dashboard-app/commit/03c469780eb486dc5108132bcbe6c3fb9f86fbe9))

## [31.10.1](https://github.com/dhis2/dashboard-app/compare/v31.10.0...v31.10.1) (2021-01-29)


### Bug Fixes

* fullscreen param to map plugin resize ([#1484](https://github.com/dhis2/dashboard-app/issues/1484)) ([9da5b0c](https://github.com/dhis2/dashboard-app/commit/9da5b0c97fa94c736f8c738953906465c3c08fe8))

# [31.10.0](https://github.com/dhis2/dashboard-app/compare/v31.9.0...v31.10.0) (2021-01-29)


### Features

* responsive item grid in view and edit mode [DHIS2-10138] ([#1431](https://github.com/dhis2/dashboard-app/issues/1431)) ([0e0c93f](https://github.com/dhis2/dashboard-app/commit/0e0c93f5399117ee91ee99f899374fc68f2b355a))

# [31.9.0](https://github.com/dhis2/dashboard-app/compare/v31.8.0...v31.9.0) (2021-01-29)


### Features

* set expanded control bar height for small screens ([#1459](https://github.com/dhis2/dashboard-app/issues/1459)) ([0d009ae](https://github.com/dhis2/dashboard-app/commit/0d009ae96d5e86511f97ccf1211aaa9fd2896e66))

# [31.8.0](https://github.com/dhis2/dashboard-app/compare/v31.7.1...v31.8.0) (2021-01-28)


### Features

* responsive - redirect to view when url of /edit or /new manually entered [DHIS2-10138] ([#1473](https://github.com/dhis2/dashboard-app/issues/1473)) ([de3e1a6](https://github.com/dhis2/dashboard-app/commit/de3e1a6e32260d60f5caaf4b8114c1b1b7a9d34a))

## [31.7.1](https://github.com/dhis2/dashboard-app/compare/v31.7.0...v31.7.1) (2021-01-25)


### Bug Fixes

* trigger event to hide tooltip when click wasnt on button ([#1461](https://github.com/dhis2/dashboard-app/issues/1461)) ([b87604c](https://github.com/dhis2/dashboard-app/commit/b87604ca442539e15e80651a5dbb628420376181))

# [31.7.0](https://github.com/dhis2/dashboard-app/compare/v31.6.2...v31.7.0) (2021-01-25)


### Features

* print layout padding and grid width ([#1460](https://github.com/dhis2/dashboard-app/issues/1460)) ([b06b427](https://github.com/dhis2/dashboard-app/commit/b06b427855285feecc056e0a42d56269614bbd32))

## [31.6.2](https://github.com/dhis2/dashboard-app/compare/v31.6.1...v31.6.2) (2021-01-19)


### Bug Fixes

* Adjust position of the title to be in line with action buttons in small screen mode ([#1449](https://github.com/dhis2/dashboard-app/issues/1449)) ([844a12f](https://github.com/dhis2/dashboard-app/commit/844a12f7ba10e3f18865e8c0c5cd550f5689de7d))

## [31.6.1](https://github.com/dhis2/dashboard-app/compare/v31.6.0...v31.6.1) (2021-01-14)


### Bug Fixes

* add margin on all sides of notice box ([#1445](https://github.com/dhis2/dashboard-app/issues/1445)) ([ce8b5e5](https://github.com/dhis2/dashboard-app/commit/ce8b5e5eb42a59e027e723a8de0b02e20481027b))

# [31.6.0](https://github.com/dhis2/dashboard-app/compare/v31.5.0...v31.6.0) (2021-01-12)


Expand Down
6 changes: 4 additions & 2 deletions cypress/integration/ui/edit_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ Feature: Creating, editing and deleting dashboard
Given I open existing dashboard
When I choose to edit dashboard
And I choose to delete dashboard
And I cancel delete
Then the confirm delete dialog is displayed
When I cancel delete
Then the dashboard displays in edit mode

@mutating
Scenario: I delete a dashboard
Given I open existing dashboard
When I choose to edit dashboard
And I choose to delete dashboard
And I confirm delete
Then the confirm delete dialog is displayed
When I confirm delete
Then dashboard displays in view mode
And the dashboard is deleted and first starred dashboard displayed
13 changes: 11 additions & 2 deletions cypress/integration/ui/edit_dashboard/edit_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { EXTENDED_TIMEOUT } from '../../../support/utils'
import {
gridItemSel,
chartSel,
Expand Down Expand Up @@ -88,6 +89,12 @@ When('I cancel delete', () => {
cy.get('[data-test="cancel-delete-dashboard"]').click()
})

Then('the confirm delete dialog is displayed', () => {
cy.contains(
`Deleting dashboard "${TEST_DASHBOARD_TITLE}" will remove it for all users`
).should('be.visible')
})

Then('the dashboard displays in edit mode', () => {
cy.get('[data-test="dashboard-title-input"]').should('exist')

Expand Down Expand Up @@ -118,7 +125,7 @@ Scenario: I move an item on a dashboard
*/

Then('the chart item is displayed', () => {
cy.get(chartSel).should('exist')
cy.get(chartSel, EXTENDED_TIMEOUT).should('exist')
})

Then('no analytics requests are made when item is moved', () => {
Expand All @@ -138,5 +145,7 @@ Then('no analytics requests are made when item is moved', () => {
.trigger('mousemove', { clientX: 400 })
.trigger('mouseup')

cy.get(chartSubtitleSel).contains(WRONG_SUBTITLE).should('not.exist')
cy.get(chartSubtitleSel, EXTENDED_TIMEOUT)
.contains(WRONG_SUBTITLE)
.should('not.exist')
})
15 changes: 15 additions & 0 deletions cypress/integration/ui/responsive_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ Feature: Small screen dashboard
When I restore the wide screen
Then the wide screen edit view is shown
And my changes are still there

@nonutating
Scenario: I change the url to new while in small screen
Given I open the "Delivery" dashboard
When I go to small screen
And I change url to new
Then the "Delivery" dashboard displays in default view mode


@nonutating
Scenario: I change the url to edit while in small screen
Given I open the "Delivery" dashboard
When I go to small screen
And I change url to edit
Then the "Delivery" dashboard displays in view mode
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
import { EXTENDED_TIMEOUT } from '../../../support/utils'
import { chartSel } from '../../../selectors/dashboardItem'
import { dashboardTitleSel } from '../../../selectors/titleBar'

const TEST_DASHBOARD_TITLE = 'TEST_DASHBOARD_TITLE'

Expand Down Expand Up @@ -70,3 +73,32 @@ Then('my changes are still there', () => {
expect(val).to.match(re)
})
})

// Scenario: I change the url to new while in small screen
When('I change url to new', () => {
const url = `${Cypress.config().baseUrl}/#/new`
cy.window().then(win => {
win.location.assign(url)
cy.wait(2000) // eslint-disable-line cypress/no-unnecessary-waiting
})
})

Then('the {string} dashboard displays in default view mode', title => {
cy.location().should(loc => {
expect(loc.hash).to.equal('#/')
})

cy.get(dashboardTitleSel).should('be.visible').and('contain', title)
cy.get(chartSel, EXTENDED_TIMEOUT).should('exist')
})

// Scenario: I change the url to 'edit' while in small screen
When('I change url to edit', () => {
cy.location().then(loc => {
const url = `${loc.href}/edit`
cy.window().then(win => {
win.location.assign(url)
cy.wait(2000) // eslint-disable-line cypress/no-unnecessary-waiting
})
})
})
22 changes: 11 additions & 11 deletions cypress/integration/ui/view_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ Feature: Viewing dashboards

@nonmutating
Scenario: I switch between dashboards
Given I open the "Antenatal Care" dashboard
Then the "Antenatal Care" dashboard displays in view mode
Given I open the "Delivery" dashboard
Then the "Delivery" dashboard displays in view mode
When I select the Immunization dashboard
Then the "Immunization" dashboard displays in view mode

@nonmutating
Scenario: I search for a dashboard
Given I open the "Antenatal Care" dashboard
Given I open the "Delivery" dashboard
When I search for dashboards containing Immunization
Then Immunization and Immunization data dashboards are choices
When I press enter in the search dashboard field
Then the "Immunization" dashboard displays in view mode

@nonmutating
Scenario: I search for a dashboard with nonmatching search text
Given I open the "Antenatal Care" dashboard
Given I open the "Delivery" dashboard
When I search for dashboards containing Noexist
Then no dashboards are choices
When I press enter in the search dashboard field
Then dashboards list restored and dashboard doesn't change
Then dashboards list restored and dashboard is still "Delivery"

@nonmutating
Scenario: I view the print layout preview
Given I open the "Antenatal Care" dashboard
Given I open the "Delivery" dashboard
When I click to preview the print layout
Then the print layout displays
Then the print layout displays for "Delivery" dashboard
When I click to exit print preview
Then the "Antenatal Care" dashboard displays in view mode
Then the "Delivery" dashboard displays in view mode

@nonmutating
Scenario: I view the print one-item-per-page preview
Given I open the "Antenatal Care" dashboard
Given I open the "Delivery" dashboard
When I click to preview the print one-item-per-page
Then the print one-item-per-page displays
Then the print one-item-per-page displays for "Delivery" dashboard
When I click to exit print preview
Then the "Antenatal Care" dashboard displays in view mode
Then the "Delivery" dashboard displays in view mode
19 changes: 9 additions & 10 deletions cypress/integration/ui/view_dashboard/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps'

const antenatalCareDashboardRoute = '#/nghVC4wtyzi'
import { dashboards } from '../../../assets/backends/sierraLeone_236'

When('I select the Immunization dashboard', () => {
cy.get('[data-test="dhis2-uicore-chip"]').contains('Immun').click()
Expand All @@ -26,18 +25,18 @@ When('I click to preview the print layout', () => {
cy.get('[data-test="print-layout-menu-item"]').click()
})

Then('the print layout displays', () => {
Then('the print layout displays for {string} dashboard', title => {
//check the url
cy.location().should(loc => {
expect(loc.hash).to.equal(`${antenatalCareDashboardRoute}/printlayout`)
expect(loc.hash).to.equal(`${dashboards[title].route}/printlayout`)
})

//check for some elements
cy.get('[data-test="print-layout-page"]').should('be.visible')
})

When('I click to exit print preview', () => {
cy.get('[data-test="exit-print-preview"]').click()
cy.contains('Exit print preview').click()
})

When('I click to preview the print one-item-per-page', () => {
Expand All @@ -46,10 +45,10 @@ When('I click to preview the print one-item-per-page', () => {
cy.get('[data-test="print-oipp-menu-item"]').click()
})

Then('the print one-item-per-page displays', () => {
Then('the print one-item-per-page displays for {string} dashboard', title => {
//check the url
cy.location().should(loc => {
expect(loc.hash).to.equal(`${antenatalCareDashboardRoute}/printoipp`)
expect(loc.hash).to.equal(`${dashboards[title].route}/printoipp`)
})

//check for some elements
Expand All @@ -63,17 +62,17 @@ Then('no dashboards are choices', () => {
cy.get('[data-test="dhis2-uicore-chip"]').should('not.exist')
})

Then("dashboards list restored and dashboard doesn't change", () => {
Then('dashboards list restored and dashboard is still {string}', title => {
cy.get('[data-test="dhis2-uicore-chip"]')
.should('be.visible')
.and('have.lengthOf.above', 0)

cy.location().should(loc => {
expect(loc.hash).to.equal(antenatalCareDashboardRoute)
expect(loc.hash).to.equal(dashboards[title].route)
})

cy.get('[data-test="view-dashboard-title"]')
.should('be.visible')
.and('contain', 'Antenatal Care')
.and('contain', title)
cy.get('.highcharts-background').should('exist')
})
31 changes: 23 additions & 8 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: 2020-12-09T13:38:15.043Z\n"
"POT-Creation-Date: 2021-01-14T08:02:55.217Z\n"
"PO-Revision-Date: 2019-06-25 12:37+0000\n"
"Last-Translator: Hamza Assada <7amza.it@gmail.com>, 2020\n"
"Language-Team: Arabic (https://www.transifex.com/hisp-uio/teams/100509/ar/)\n"
Expand Down Expand Up @@ -41,15 +41,15 @@ msgstr ""
"المستخدمين. لا يمكن التراجع عن هذا الإجراء. هل تريد بالتأكيد حذف لوحة "
"المعلومات هذه نهائياً؟"

msgid "Save changes"
msgstr "احفظ التغييرات"

msgid "Exit Print preview"
msgstr "الخروج من معاينة الطباعة"

msgid "Print preview"
msgstr "معاينة قبل الطباعة"

msgid "Save changes"
msgstr "احفظ التغييرات"

msgid "Translate"
msgstr "ترجمة"

Expand All @@ -62,11 +62,11 @@ msgstr "الذهاب إلى لوحة المعلومات"
msgid "Search for a dashboard"
msgstr "البحث عن لوحة معلومات"

msgid "Show more"
msgstr "إظهار المزيد"
msgid "Show fewer dashboards"
msgstr ""

msgid "Show less"
msgstr "إظهار الأقل"
msgid "Show more dashboards"
msgstr ""

msgid "No dashboards found. Use the + button to create a new dashboard."
msgstr ""
Expand All @@ -78,6 +78,15 @@ msgstr "لم يتم العثور على لوحة المعلومات التي ط
msgid "No access"
msgstr "الوصول غير ممكن"

msgid "Editing dashboards on small screens is not supported."
msgstr ""

msgid "Creating dashboards on small screens is not supported."
msgstr ""

msgid "Not supported"
msgstr ""

msgid "Exit print preview"
msgstr "الخروج من معاينة الطباعة"

Expand Down Expand Up @@ -172,6 +181,9 @@ msgstr "عرض كخريطة"
msgid "Open in {{appName}} app"
msgstr "إفتح في تطبيق {{appName}}"

msgid "View fullscreen"
msgstr ""

msgid "Unable to load the plugin for this item"
msgstr "تعذر تحميل المكوّن الإضافي لهذا العنصر"

Expand All @@ -190,6 +202,9 @@ msgstr "لايوجد عناصر في لوحة المعلومات هذه"
msgid "Show fewer"
msgstr "عرض أقل"

msgid "Show more"
msgstr "إظهار المزيد"

msgid "Insert"
msgstr "إدراج"

Expand Down
Loading

0 comments on commit 7f35907

Please sign in to comment.