Skip to content

Commit

Permalink
Merge pull request #2887 from dhis2/dev
Browse files Browse the repository at this point in the history
feat: 100.3.0
  • Loading branch information
janhenrikoverland authored Oct 20, 2023
2 parents 41d8557 + f56fd15 commit 2c913cd
Show file tree
Hide file tree
Showing 51 changed files with 2,281 additions and 661 deletions.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ _text_

### TODO

- [ ] Cypress tests
- [ ] Update docs
- [ ] Manual testing
- [ ] _task_

---
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,22 @@ 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:
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
119 changes: 0 additions & 119 deletions .github/workflows/e2e-prod.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = fa_AF: prs, uz@Cyrl: uz, uz@Latn: uz_Latn
lang_map = fa_AF: prs, uz@Cyrl: uz_UZ_Cyrl, uz@Latn: uz_UZ_Latn

[o:hisp-uio:p:app-data-visualizer:r:en-pot]
file_filter = i18n/<lang>.po
Expand Down
28 changes: 28 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ async function setupNodeEvents(on, config) {

module.exports = defineConfig({
projectId: 'sojh88',
reporter: '@reportportal/agent-js-cypress',
reporterOptions: {
endpoint: process.env.REPORTPORTAL_ENDPOINT,
apiKey: process.env.REPORTPORTAL_API_KEY,
launch: 'data_visualizer_app_master',
project: process.env.REPORTPORTAL_PROJECT,
description: '',
autoMerge: true,
parallel: true,
debug: false,
restClientConfig: {
timeout: 360000,
},
attributes: [
{
key: 'version',
value: 'master',
},
{
key: 'app_name',
value: 'data_visualizer_app',
},
{
key: 'test_level',
value: 'e2e',
},
],
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
Expand Down
1 change: 1 addition & 0 deletions cypress/elements/dimensionModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const expectSourceToNotBeLoading = () =>
.findBySelLike(transferLoadingEl)
.should('not.exist')

// FIXME: unused, remove?
export const expectSourceToBeLoading = () =>
cy
.getBySelLike(transferLeftContainerEl)
Expand Down
12 changes: 12 additions & 0 deletions cypress/elements/optionsModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const OPTIONS_TAB_AXES = 'Axes'
export const OPTIONS_TAB_OUTLIERS = 'Outliers'
export const OPTIONS_TAB_SERIES = 'Series'
export const OPTIONS_TAB_LEGEND = 'Legend'
export const OPTIONS_TAB_LIMIT_VALUES = 'Limit values'

export const clickOptionsTab = (name) =>
cy.getBySel(tabBarEl).contains(name).click()
Expand Down Expand Up @@ -89,3 +90,14 @@ export {
expectLegendKeyToBeVisible,
expectLegedKeyItemAmountToBe,
} from './legend.js'

export {
setMinValue,
setMaxValue,
changeMinOperator,
changeMaxOperator,
expectMinValueToBeValue,
expectMaxValueToBeValue,
expectMinOperatorToBeOption,
expectMaxOperatorToBeOption,
} from './limitValues.js'
7 changes: 2 additions & 5 deletions cypress/elements/optionsModal/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ export const toggleLegend = () =>
.click()

export const changeDisplayStrategyToFixed = () =>
cy
.getBySel(optionsModalContentEl)
.contains('Select a single legend for the entire visualization')
.click()
cy.getBySel(optionsModalContentEl).contains('Select a legend').click()

export const changeDisplayStrategyToByDataItem = () =>
cy
.getBySel(optionsModalContentEl)
.contains('Use pre-defined legend per data item')
.contains('Use pre-defined legend by data item')
.click()

export const changeDisplayStyleToText = () =>
Expand Down
34 changes: 34 additions & 0 deletions cypress/elements/optionsModal/limitValues.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { typeInput } from '../common.js'

const minValueInput = 'measure-critiera-min-value'
const maxValueInput = 'measure-critiera-max-value'
const minOperatorSelect = 'measure-critiera-min-operator'
const minOperatorSelectOption = 'measure-critiera-min-operator-option'
const maxOperatorSelect = 'measure-critiera-max-operator'
const maxOperatorSelectOption = 'measure-critiera-max-operator-option'

export const setMinValue = (text) => typeInput(minValueInput, text)

export const setMaxValue = (text) => typeInput(maxValueInput, text)

export const changeMinOperator = (optionName) => {
cy.getBySel(minOperatorSelect).click()
cy.getBySelLike(minOperatorSelectOption).contains(optionName).click()
}

export const changeMaxOperator = (optionName) => {
cy.getBySel(maxOperatorSelect).click()
cy.getBySelLike(maxOperatorSelectOption).contains(optionName).click()
}

export const expectMinValueToBeValue = (value) =>
cy.getBySel(minValueInput).find('input').should('have.value', value)

export const expectMaxValueToBeValue = (value) =>
cy.getBySel(maxValueInput).find('input').should('have.value', value)

export const expectMinOperatorToBeOption = (optionName) =>
cy.getBySel(minOperatorSelect).containsExact(optionName)

export const expectMaxOperatorToBeOption = (optionName) =>
cy.getBySel(maxOperatorSelect).containsExact(optionName)
2 changes: 0 additions & 2 deletions cypress/integration/dimensions/data.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
expectSubGroupSelectToBeVisible,
expectSubGroupSelectToBe,
switchSubGroupTo,
expectSourceToBeLoading,
expectSourceToNotBeLoading,
unselectAllItemsByButton,
selectAllItemsByButton,
Expand Down Expand Up @@ -439,7 +438,6 @@ describe('Data dimension', () => {
cy.intercept('GET', DATA_ITEMS_URL).as('**/dataItems*')
}
switchDataTypeToAll()
expectSourceToBeLoading()
cy.wait('@**/dataItems*').then(({ request, response }) => {
expect(request.url).to.contain('page=1')
expect(response.statusCode).to.eq(200)
Expand Down
Loading

0 comments on commit 2c913cd

Please sign in to comment.