diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 5188277e5..7b5a646b8 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -14,13 +14,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest , windows-latest ] + os: [ubuntu-latest] # Removed windows-latest runs-on: ${{ matrix.os }} steps: - name: Checkout Branch uses: actions/checkout@v3 - + - name: Set up JDK uses: actions/setup-java@v1 with: @@ -34,7 +34,25 @@ jobs: echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV shell: bash - - name: Download security plugin and create setup scripts for remote cluster + - uses: browser-actions/setup-geckodriver@v0.0.0 + - run: geckodriver --version + + - name: Set up Firefox browser + if: ${{ runner.os == 'Linux' }} + uses: browser-actions/setup-firefox@v1 + + - run: firefox --version + if: ${{ runner.os == 'Linux' }} + + # Browser-action version does not work on Windows + # - name: Set up Firefox browser for Windows + # if: ${{ runner.os == 'Windows' }} + # uses: RyanL1997/setup-browser@main + # with: + # browser: firefox + # version: latest + + - name: Download security plugin and create setup scripts uses: ./.github/actions/download-plugin with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} @@ -69,7 +87,7 @@ jobs: uses: derek-ho/start-opensearch@v2 with: opensearch-version: ${{ env.OPENSEARCH_VERSION }} - plugins: "file:$(pwd)/${{ env.PLUGIN_NAME }}.zip" + plugins: 'file:$(pwd)/${{ env.PLUGIN_NAME }}.zip' security-enabled: true admin-password: ${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} @@ -102,11 +120,10 @@ jobs: shell: bash working-directory: ${{ steps.install-dashboards.outputs.plugin-directory }} - - name: Run integration tests on Windows - if: ${{ runner.os == 'Windows' }} - run: | - echo "check if opensearch is ready" - curl -XGET https://localhost:9200 -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}' -k - export ADMIN_PASSWORD=${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} && node ./test/run_jest_tests.js --runInBand --detectOpenHandles --forceExit --config ./test/jest.config.server.js - shell: bash - working-directory: ${{ steps.install-dashboards.outputs.plugin-directory }} + # - name: Run integration tests on Windows + # if: ${{ runner.os == 'Windows' }} + # run: | + # echo "check if opensearch is ready" + # curl -XGET https://localhost:9200 -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}' -k + # node .\test\run_jest_tests.js --runInBand --detectOpenHandles --forceExit --config .\test\jest.config.server.js + # working-directory: ${{ steps.install-dashboards.outputs.plugin-directory }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index e14abc11c..bd104510c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,6 +1,6 @@ name: Unit Tests -on: [ push, pull_request ] +on: [push, pull_request] jobs: unit-tests: @@ -8,13 +8,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest , windows-latest ] + os: [ubuntu-latest] # Removed windows-latest, macos-latest runs-on: ${{ matrix.os }} steps: - - name: Enable longer filenames - if: ${{ matrix.os == 'windows-latest' }} - run: git config --system core.longpaths true + # - name: Enable longer filenames + # if: ${{ matrix.os == 'windows-latest' }} + # run: git config --system core.longpaths true - name: Checkout Branch uses: actions/checkout@v2 diff --git a/package.json b/package.json index 72c0aff5d..d6e10a5f9 100644 --- a/package.json +++ b/package.json @@ -60,4 +60,4 @@ "express": "^4.19.2", "braces": "^3.0.3" } -} +} \ No newline at end of file diff --git a/test/cypress/e2e/oidc/oidc_auth_test.spec.js b/test/cypress/e2e/oidc/oidc_auth_test.spec.js index 2228d2fbf..6481a4e92 100644 --- a/test/cypress/e2e/oidc/oidc_auth_test.spec.js +++ b/test/cypress/e2e/oidc/oidc_auth_test.spec.js @@ -105,6 +105,9 @@ describe('Log in via OIDC', () => { }); localStorage.setItem('home:newThemeModal:show', 'false'); + cy.get('#user-icon-btn').should('be.visible'); + cy.get('#user-icon-btn').click(); + cy.get('button[data-test-subj^="switch-tenants"]').click(); cy.get('#private').should('be.enabled'); cy.get('#private').click({ force: true }); diff --git a/test/cypress/e2e/saml/saml_auth_test.spec.js b/test/cypress/e2e/saml/saml_auth_test.spec.js index 34f58da2b..052330c35 100644 --- a/test/cypress/e2e/saml/saml_auth_test.spec.js +++ b/test/cypress/e2e/saml/saml_auth_test.spec.js @@ -102,6 +102,9 @@ describe('Log in via SAML', () => { }); samlLogin(); + cy.get('#user-icon-btn').should('be.visible'); + cy.get('#user-icon-btn').click(); + cy.get('button[data-test-subj^="switch-tenants"]').click(); cy.get('#private').should('be.enabled'); cy.get('#private').click({ force: true });