Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/dhis2/cypress-plug…
Browse files Browse the repository at this point in the history
…ins-10.0.6
  • Loading branch information
jenniferarnesen authored Jan 13, 2025
2 parents f54c599 + f62ba36 commit 6e192d7
Show file tree
Hide file tree
Showing 18 changed files with 566 additions and 755 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dhis2-preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -34,7 +34,7 @@ jobs:

- name: Deploy
id: netlify-deploy
uses: nwtgck/actions-netlify@v1.2.2
uses: nwtgck/actions-netlify@v3
timeout-minutes: 1
with:
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: c-hive/gha-yarn-cache@v2
- run: yarn install --frozen-lockfile
- id: commitlint
Expand All @@ -20,13 +20,15 @@ jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: c-hive/gha-yarn-cache@v2
- run: yarn install --frozen-lockfile
- id: commitlint
# This will return a config file with a .js extensions for @dhis2/cli-style ^10.4.3
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v4
# commitlint-github-action@v6+ requires a .mjs extension for the config file, so the highest version we can use is 5
- uses: wagoid/commitlint-github-action@v5
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
4 changes: 2 additions & 2 deletions .github/workflows/e2e-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- name: Send failure message to analytics-internal-kfmt slack channel
id: slack
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ':x: Line-listing-app e2e nightly build <https://cloud.cypress.io/projects/m5qvjx/runs?branches=[{"label":"master","suggested":false,"value":"master"}]|failed>'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-d2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
- name: Print GitHub ref
run: echo "GITHUB_REF is $GITHUB_REF"

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -56,7 +56,7 @@ jobs:
steps:
- name: Send failure message to analytics-internal-bot slack channel
id: slack_publish_failure
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ jobs:
runs-on: ubuntu-latest
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip release]') &&
!startsWith(github.event.head_commit.message, 'chore') }}
github.actor != 'dependabot[bot]' }}
outputs:
build_exists: ${{ steps.check_build.outputs.build_exists }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -40,35 +39,41 @@ jobs:
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
DEBUG: '@semantic-release/commit-analyzer'

- name: Set build_exists output
id: check_build
run: |
if ls build/bundle/line-listing-*.zip 1> /dev/null 2>&1; then
echo "build_exists=yes" >> $GITHUB_OUTPUT
else
echo "build_exists=no" >> $GITHUB_OUTPUT
fi
- name: Publish to AppHub
if: ${{ steps.check_build.outputs.build_exists == 'yes' }}
run: yarn run d2-app-scripts publish

report-release-result:
runs-on: ubuntu-latest
needs: release
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip release]') }}
if: ${{ always() }}
steps:
- name: Checkout code
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Extract version
if: success()
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: extract_version
uses: Saionaro/extract-package-version@v1.2.1
uses: Saionaro/extract-package-version@v1.3.0

- name: Send success message to analytics-internal-bot slack channel
if: success()
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: slack_success
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
Expand Down Expand Up @@ -118,7 +123,7 @@ jobs:
- name: Send failure message to analytics-internal-bot slack channel
if: ${{ failure() && !cancelled() }}
id: slack_failure
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/verify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.specs }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Generate Test matrix
id: set-matrix
run: echo "::set-output name=specs::$(node src/generateTestMatrix.js)"

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -41,7 +41,7 @@ jobs:
- name: Build
run: yarn d2-app-scripts build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: app-build
path: |
Expand All @@ -52,8 +52,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -69,8 +69,8 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -79,13 +79,6 @@ 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 }}
CI_BUILD_ID: ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
PR_TITLE: ${{ github.event_name == 'pull_request' && github.event.pull_request.title || format('Direct push to {0}', github.ref_name) }}

call-workflow-e2e-prod:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
Expand All @@ -98,6 +91,3 @@ jobs:
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 }}
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [101.1.13](https://github.com/dhis2/line-listing-app/compare/v101.1.12...v101.1.13) (2025-01-06)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([#634](https://github.com/dhis2/line-listing-app/issues/634)) ([6cd1bec](https://github.com/dhis2/line-listing-app/commit/6cd1becf230f4d182c5884e9bab72f41872a789c))

## [101.1.12](https://github.com/dhis2/line-listing-app/compare/v101.1.11...v101.1.12) (2024-12-10)


### Bug Fixes

* enable ou tree and levels/groups with user orgunits (DHIS2-18066) ([#626](https://github.com/dhis2/line-listing-app/issues/626)) ([57b8b45](https://github.com/dhis2/line-listing-app/commit/57b8b45dd7aedf9d360648c2c2786c605e5c790a)), closes [dhis2/analytics#1702](https://github.com/dhis2/analytics/issues/1702)

## [101.1.11](https://github.com/dhis2/line-listing-app/compare/v101.1.10...v101.1.11) (2024-12-08)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([240f280](https://github.com/dhis2/line-listing-app/commit/240f2808153e772e0360396b83ddc09a188d9b2c))

## [101.1.10](https://github.com/dhis2/line-listing-app/compare/v101.1.9...v101.1.10) (2024-12-04)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([0705c70](https://github.com/dhis2/line-listing-app/commit/0705c70d3f60d548c0136164633b92aa0335267b))

## [101.1.9](https://github.com/dhis2/line-listing-app/compare/v101.1.8...v101.1.9) (2024-10-27)


### Bug Fixes

* **translations:** sync translations from transifex (master) ([883368a](https://github.com/dhis2/line-listing-app/commit/883368a0ead1903a12454c87c4e5bf605db524a1))

## [101.1.8](https://github.com/dhis2/line-listing-app/compare/v101.1.7...v101.1.8) (2024-08-26)


Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ When reviewing, please don't approve until all the required checks have passed.

PRs should be squash merged unless there is a good reason to preserve the individual commit history. Make sure the PR commit summary has the correct semantic release keyword (fix, feat, chore, etc). Keep line lengths in the description to <100 in order to avoid lint-commit errors in future PRs that have "merge from master" commits. The summaries and descriptions go into the release notes so make it good!

### Deploy previews

For each PR, a deploy preview is automatically generated and available at the following URL: https://pr-###.line-listing.netlify.dhis2.org This is useful for reviewing changes to the app before merging them into master. Because this is on a dhis2.org domain, the deploy preview can be tested against any DHIS2 Core backend deployed on the dhis2.org domain without encountering CORS issues.

## Learn More

This project was bootstrapped with [DHIS2 Application Platform](https://github.com/dhis2/app-platform).
30 changes: 0 additions & 30 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,6 @@ async function setupNodeEvents(on, config) {

module.exports = defineConfig({
projectId: 'm5qvjx',
reporter: '@reportportal/agent-js-cypress',
reporterOptions: {
endpoint: process.env.REPORTPORTAL_ENDPOINT,
apiKey: process.env.REPORTPORTAL_API_KEY,
launch: 'line_listing_app',
project: process.env.REPORTPORTAL_PROJECT,
description: '',
autoMerge: true,
parallel: true,
debug: false,
restClientConfig: {
timeout: 660000,
},
attributes: [
{
key: 'dhis2_version',
value: process.env.DHIS2_VERSION,
},
{
key: 'app_name',
value: 'line-listing-app',
},
{
key: 'test_level',
value: 'e2e',
},
],
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
Expand All @@ -80,8 +52,6 @@ module.exports = defineConfig({
video: true,
// Enabled to reduce the risk of out-of-memory issues
experimentalMemoryManagement: true,
// Set to a low number to reduce the risk of out-of-memory issues
numTestsKeptInMemory: 5,
/* When allowing 1 retry on CI, the test suite will pass if
* it's flaky. And/but we also get to identify flaky tests on the
* Cypress Dashboard. */
Expand Down
12 changes: 5 additions & 7 deletions cypress/integration/orgUnitDimension.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
expectOrgUnitDimensionModalToBeVisible,
expectOrgUnitDimensionToNotBeLoading,
expectOrgUnitItemToBeSelected,
expectOrgUnitTreeToBeDisabled,
expectOrgUnitTreeToBeEnabled,
openOuDimension,
selectOrgUnitTreeItem,
Expand Down Expand Up @@ -45,7 +44,7 @@ describe(`Org unit dimension`, () => {
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_DEFAULT_ORG_UNIT)
selectOrgUnitTreeItem(TEST_ROOT)
selectOrgUnitTreeItem(TEST_DISTRICT_1)
Expand Down Expand Up @@ -143,20 +142,19 @@ describe(`Org unit dimension`, () => {
expectOrgUnitItemToBeSelected(TEST_ROOT)
expectOrgUnitTreeToBeEnabled()
selectUserOrgUnit(TEST_USER_ORG_UNIT)
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
clickOrgUnitDimensionModalUpdateButton()
expectTableToBeVisible()
assertChipContainsText('Organisation unit', 1)
assertChipContainsText('Organisation unit', 2)
assertTooltipContainsEntries([TEST_USER_ORG_UNIT])

cy.log(`deselects '${TEST_USER_ORG_UNIT}'`)
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_USER_ORG_UNIT)
expectOrgUnitTreeToBeEnabled()
selectOrgUnitTreeItem(TEST_ROOT)
expectOrgUnitItemToBeSelected(TEST_ROOT)
clickOrgUnitDimensionModalUpdateButton()
expectTableToBeVisible()
Expand All @@ -174,7 +172,7 @@ describe(`Org unit dimension`, () => {
openOuDimension(DIMENSION_ID_ORGUNIT)
expectOrgUnitDimensionModalToBeVisible()
expectOrgUnitDimensionToNotBeLoading()
expectOrgUnitTreeToBeDisabled()
expectOrgUnitTreeToBeEnabled()
deselectUserOrgUnit(TEST_DEFAULT_ORG_UNIT)
TEST_DISTRICTS.forEach((district) => selectOrgUnitTreeItem(district))
toggleOrgUnitLevel(TEST_LEVEL)
Expand Down
Loading

0 comments on commit 6e192d7

Please sign in to comment.