diff --git a/.github/workflows/a11y.yaml b/.github/workflows/a11y.yaml index 1cc6e77155..f81d137336 100644 --- a/.github/workflows/a11y.yaml +++ b/.github/workflows/a11y.yaml @@ -29,7 +29,7 @@ env: jobs: a11y: - runs-on: ubuntu-latest + runs-on: [self-hosted, master] steps: - uses: actions/checkout@v2 with: @@ -48,6 +48,11 @@ jobs: distribution: 'zulu' java-version: '11' + - name: Install google chrome + run: | + wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb + apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.90-1_amd64.deb + - name: 'Update settings.xml with server configuration' run: | echo ' @@ -63,9 +68,5 @@ jobs: - name: Web UI build run: mvn -B -ntp install - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1266 is resolved. - #================================================================================================================== - # - name: A11y checks - # run: mvn -B -ntp -f plugin/a11y install - #================================================================================================================== + - name: A11y checks + run: mvn -B -ntp -f plugin/a11y install diff --git a/.github/workflows/cross-repo.yaml b/.github/workflows/cross-repo.yaml index dfad3aefdc..4b09321b20 100644 --- a/.github/workflows/cross-repo.yaml +++ b/.github/workflows/cross-repo.yaml @@ -168,39 +168,31 @@ jobs: ' > ~/.m2/settings.xml - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1267 is resolved. - #================================================================================================================== - # - name: Nuxeo package build and Ftests - # env: - # RUN_ALL: ${{ github.event.inputs.run_all }} - # BAIL: ${{ github.event.inputs.bail }} - # run: | - # profiles=() - # if [ ${{ github.event.inputs.skip_ftests }} = "false" ] - # then - # profiles+=('ftest') - # fi - # if ${{ github.event.inputs.generate_metrics }} - # then - # profiles+=('metrics') - # fi - # active_profiles="" - # if [ ${#profiles[@]} -gt 0 ] - # then - # active_profiles="-P$(printf -v active_profiles '%s,' "${profiles[@]}" && echo "${active_profiles%,}")" - # fi - # mvn install -ntp $active_profiles -DskipInstall - #================================================================================================================== - - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1266 is resolved. - #================================================================================================================== - # - name: A11y checks - # if: ${{ github.event.inputs.skip_a11y == 'false' }} - # run: | - # mvn -B -nsu -f plugin/a11y -ntp install - #================================================================================================================== + - name: Nuxeo package build and Ftests + env: + RUN_ALL: ${{ github.event.inputs.run_all }} + BAIL: ${{ github.event.inputs.bail }} + run: | + profiles=() + if [ ${{ github.event.inputs.skip_ftests }} = "false" ] + then + profiles+=('ftest') + fi + if ${{ github.event.inputs.generate_metrics }} + then + profiles+=('metrics') + fi + active_profiles="" + if [ ${#profiles[@]} -gt 0 ] + then + active_profiles="-P$(printf -v active_profiles '%s,' "${profiles[@]}" && echo "${active_profiles%,}")" + fi + mvn install -ntp $active_profiles -DskipInstall + + - name: A11y checks + if: ${{ github.event.inputs.skip_a11y == 'false' }} + run: | + mvn -B -nsu -f plugin/a11y -ntp install - name: Archive cucumber reports if: ${{ always() }} diff --git a/.github/workflows/ftest.yaml b/.github/workflows/ftest.yaml index 886e31a487..4e4a2d9fbc 100644 --- a/.github/workflows/ftest.yaml +++ b/.github/workflows/ftest.yaml @@ -45,6 +45,11 @@ jobs: distribution: 'zulu' java-version: '11' + - name: Install google chrome + run: | + wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb + apt install -y --allow-downgrades ./google-chrome-stable_114.0.5735.90-1_amd64.deb + - name: Determine nuxeo-elements branch to link id: pick_nuxeo_elements_branch run: | @@ -113,15 +118,11 @@ jobs: ' > ~/.m2/settings.xml - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1267 is resolved. - #================================================================================================================== - # - name: Functional tests - # env: - # RUN_ALL: false - # BAIL: 0 - # run: mvn -ntp install -Pftest -DskipInstall - #================================================================================================================== + - name: Functional tests + env: + RUN_ALL: false + BAIL: 0 + run: mvn -ntp install -Pftest -DskipInstall - name: Archive cucumber reports if: ${{ always() }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 881527c05c..4ceda98307 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -22,34 +22,26 @@ jobs: with: branch: maintenance-3.0.x - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1266 is resolved. - #================================================================================================================== - # a11y: - # uses: nuxeo/nuxeo-web-ui/.github/workflows/a11y.yaml@maintenance-3.1.x - # secrets: - # NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} - # PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }} - # PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }} - # with: - # branch: maintenance-3.1.x - #================================================================================================================== - - #================================================================================================================== - # this line of code has been commented on due to some driver issues, we will resume it once WEBUI-1267 is resolved. - #================================================================================================================== - # ftest: - # uses: nuxeo/nuxeo-web-ui/.github/workflows/ftest.yaml@maintenance-3.0.x - # secrets: - # NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} - # PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }} - # PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }} - # with: - # branch: maintenance-3.0.x - #================================================================================================================== + a11y: + uses: nuxeo/nuxeo-web-ui/.github/workflows/a11y.yaml@maintenance-3.0.x + secrets: + NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} + PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }} + PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }} + with: + branch: maintenance-3.0.x + + ftest: + uses: nuxeo/nuxeo-web-ui/.github/workflows/ftest.yaml@maintenance-3.0.x + secrets: + NPM_PACKAGES_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} + PACKAGES_AUTH_USER: ${{ secrets.PACKAGES_AUTH_USER }} + PACKAGES_AUTH_TOKEN: ${{ secrets.PACKAGES_AUTH_TOKEN }} + with: + branch: maintenance-3.0.x build: - needs: [ lint, test ] + needs: [ lint, test, a11y, ftest ] runs-on: [ self-hosted, master ] steps: - uses: actions/checkout@v2 diff --git a/packages/nuxeo-web-ui-ftest/scripts/test.js b/packages/nuxeo-web-ui-ftest/scripts/test.js index b1a536aa79..45cda73595 100755 --- a/packages/nuxeo-web-ui-ftest/scripts/test.js +++ b/packages/nuxeo-web-ui-ftest/scripts/test.js @@ -114,7 +114,9 @@ if (process.env.DRIVER_VERSION == null) { console.log(`${version} detected.`); const match = version && version.match(/([0-9]+)\./); if (match) { - const checkVersion = match[1]; + // const checkVersion = match[1]; + // we will revert this once driver issue is resolved. + const checkVersion = 114; try { done = fetch(`https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${checkVersion}`).then((response) => { if (response.ok) { diff --git a/plugin/a11y/getDriverVersion.js b/plugin/a11y/getDriverVersion.js index a57a97209d..047d3fc358 100644 --- a/plugin/a11y/getDriverVersion.js +++ b/plugin/a11y/getDriverVersion.js @@ -13,7 +13,9 @@ try { } const match = version && version.match(/([0-9]+)\./); if (match) { - const checkVersion = match[1]; + // const checkVersion = match[1]; + // we will revert this once driver issue is resolved. + const checkVersion = 114; try { fetch(`https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${checkVersion}`).then((response) => { if (response.ok) { diff --git a/plugin/a11y/package.json b/plugin/a11y/package.json index ded7b397c3..e2a53ce366 100644 --- a/plugin/a11y/package.json +++ b/plugin/a11y/package.json @@ -15,12 +15,12 @@ "@babel/preset-env": "^7.15.0", "@babel/register": "^7.14.5", "@nuxeo/nuxeo-web-ui-ftest": "file:../../packages/nuxeo-web-ui-ftest", - "@wdio/cli": "^8.15.5", - "@wdio/local-runner": "^8.15.4", - "@wdio/mocha-framework": "8.15.4", - "@wdio/selenium-standalone-service": "^8.14.0", - "@wdio/spec-reporter": "^8.14.0", - "@wdio/sync": "^7.27.0", + "@wdio/cli": "7.20.5", + "@wdio/local-runner": "^7.20.5", + "@wdio/mocha-framework": "^7.2.0", + "@wdio/selenium-standalone-service": "7.2.0", + "@wdio/spec-reporter": "^7.2.0", + "@wdio/sync": "^7.2.0", "axe-core": "^4.1.2", "chrome-launcher": "^0.14.0", "node-fetch": "^2.6.1", diff --git a/plugin/a11y/test/specs/browser.js b/plugin/a11y/test/specs/browser.js index dd373011cc..e0cb442b8e 100644 --- a/plugin/a11y/test/specs/browser.js +++ b/plugin/a11y/test/specs/browser.js @@ -8,7 +8,6 @@ const EXPECTED_VIOLATIONS = { 'aria-command-name': 1, 'aria-roles': 3, 'aria-tooltip-name': 1, - 'duplicate-id': 28, 'landmark-one-main': 1, 'meta-viewport': 1, 'page-has-heading-one': 1, @@ -17,7 +16,6 @@ const EXPECTED_VIOLATIONS = { }; const EXPECTED_INCOMPLETE_VIOLATIONS = { - 'aria-allowed-attr': 1, 'aria-allowed-role': 7, 'aria-valid-attr-value': 1, 'color-contrast-enhanced': 2, diff --git a/plugin/a11y/test/specs/home.js b/plugin/a11y/test/specs/home.js index e060538188..34547a3c15 100644 --- a/plugin/a11y/test/specs/home.js +++ b/plugin/a11y/test/specs/home.js @@ -8,7 +8,6 @@ const EXPECTED_VIOLATIONS = { 'aria-command-name': 1, 'aria-allowed-attr': 4, 'aria-tooltip-name': 1, - 'duplicate-id': 28, 'landmark-one-main': 1, 'meta-viewport': 1, 'page-has-heading-one': 1, @@ -18,7 +17,7 @@ const EXPECTED_VIOLATIONS = { const EXPECTED_INCOMPLETE_VIOLATIONS = { 'aria-allowed-role': 5, - 'color-contrast': 8, + 'color-contrast-enhanced': 2, }; describe('Nuxeo Home', () => {