Skip to content

refactor: bump to node 20 #1470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .cypress-cucumber-preprocessorrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"nonGlobalStepDefinitions": true,
"e2e": {
"stepDefinitions": "[filepath]/*.{js,mjs,ts,tsx}"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/dhis2-preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dhis2-verify-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- uses: c-hive/gha-yarn-cache@v1
- run: |
Expand All @@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- uses: actions/download-artifact@v2
with:
Expand All @@ -67,7 +67,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- uses: actions/download-artifact@v2
with:
Expand All @@ -109,7 +109,7 @@ jobs:
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: End-to-End tests
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v6
with:
# This should be a command that starts the server to test against.
start: 'yarn cy:start'
Expand All @@ -136,7 +136,7 @@ jobs:
token: ${{env.GH_TOKEN}}
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 20.x
cache: 'yarn'

- uses: actions/download-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
4 changes: 2 additions & 2 deletions collections/forms/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-02-12T14:58:56.792Z\n"
"PO-Revision-Date: 2024-02-12T14:58:56.792Z\n"
"POT-Creation-Date: 2024-03-21T09:13:47.826Z\n"
"PO-Revision-Date: 2024-03-21T09:13:47.826Z\n"

msgid "Upload file"
msgstr "Upload file"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('an unchecked Checkbox without value is rendered', () => {
cy.visitStory('Testing:Checkbox', 'Unchecked')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('an unchecked Checkbox with a value is rendered', () => {
cy.visitStory('Testing:Checkbox', 'Unchecked with value')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { When } from 'cypress-cucumber-preprocessor/steps'
import { When } from '@badeball/cypress-cucumber-preprocessor'

When('the user clicks on the Checkbox', () => {
cy.get('[data-test="dhis2-uicore-checkbox"]').click()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

Given('an unchecked Checkbox is rendered', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('a multi-file IputField is rendered', () => {
cy.visitStory('Testing:FileInput', 'Standard form')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given } from 'cypress-cucumber-preprocessor/steps'
import { Given } from '@badeball/cypress-cucumber-preprocessor'

Given('a single-file FileInput is rendered', () => {
cy.visitStory('Testing:FileInput', 'Standard form')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'

When('a file with the wrong file type is provided', () => {
cy.get('[name="fileTxt"]').uploadSingleFile('md', 'FileInput/file.md')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('a Input with no text is rendered', () => {
cy.visitStory('Testing:InputFieldFF', 'Default')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

Given('an empty, required Input is rendered', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('the MultiSelect has two options', () => {
const options = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given } from 'cypress-cucumber-preprocessor/steps'
import { Given } from '@badeball/cypress-cucumber-preprocessor'

Given('a required MultiSelect with no selected value', () => {
cy.visitStory('Testing:MultiSelectFieldFF', 'Required')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

When('the user submits the form', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('there are three options', () => {
const options = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given } from 'cypress-cucumber-preprocessor/steps'
import { Given } from '@badeball/cypress-cucumber-preprocessor'

Given(
'a FieldGroupFF with required RadioFieldFFs and no selected value',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

When('the user submits the form', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('the SingleSelect has one option', () => {
const options = [{ value: 'Value', label: 'Label' }]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given } from 'cypress-cucumber-preprocessor/steps'
import { Given } from '@badeball/cypress-cucumber-preprocessor'

Given('a required SingleSelect with no selected value', () => {
cy.visitStory('Testing:SingleSelectFieldFF', 'Required')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

When('the user submits the form', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('an unchecked Switch without value is rendered', () => {
cy.visitStory('Testing:SwitchFieldFF', 'Unchecked')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('an unchecked Switch with a value is rendered', () => {
cy.visitStory('Testing:SwitchFieldFF', 'Unchecked with value')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { When } from 'cypress-cucumber-preprocessor/steps'
import { When } from '@badeball/cypress-cucumber-preprocessor'

When('the user clicks on the Switch', () => {
cy.get('[data-test="dhis2-uicore-switch"]').click()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

Given('an unchecked Switch is rendered', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('a TextArea with no text is rendered', () => {
cy.visitStory('TextArea', 'Default')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { hasValueMessage } from '../../../validators/hasValue.js'

Given('an empty, required TextArea is rendered', () => {
Expand Down
18 changes: 0 additions & 18 deletions components/alert/src/alert-bar/features/api/hidden_callback.js

This file was deleted.

9 changes: 7 additions & 2 deletions components/alert/src/alert-bar/features/api/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../common/index.js'
import { Given, Then } from 'cypress-cucumber-preprocessor/steps'
require('../common/index.js')
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('an AlertBar with onHidden handler is rendered', () => {
cy.visitStory('AlertBar', 'With onHidden')
Expand All @@ -22,6 +22,11 @@ Given('an AlertBar with permanent is rendered', () => {
cy.get('[data-test="dhis2-uicore-alertbar"]').should('be.visible')
})

When('the Alertbar is not rendered', () => {
cy.wait(8000)
cy.get('[data-test="dhis2-uicore-alertbar"]').should('not.exist')
})

Then('the icon will be visible', () => {
cy.get('[data-test="dhis2-uicore-alertbar-icon"]').should('be.visible')
})
Expand Down
47 changes: 0 additions & 47 deletions components/alert/src/alert-bar/features/api/prop_message.js

This file was deleted.

12 changes: 0 additions & 12 deletions components/alert/src/alert-bar/features/api/props_message.js

This file was deleted.

11 changes: 0 additions & 11 deletions components/alert/src/alert-bar/features/api/props_permanent.js

This file was deleted.

2 changes: 1 addition & 1 deletion components/alert/src/alert-bar/features/common/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { When, Given, Then } from 'cypress-cucumber-preprocessor/steps'
import { When, Given, Then } from '@badeball/cypress-cucumber-preprocessor'

Given('a default AlertBar is rendered', () => {
cy.visitStory('AlertBar', 'Default')
Expand Down
15 changes: 0 additions & 15 deletions components/alert/src/alert-bar/features/hide/automatically.js

This file was deleted.

Loading
Loading