Skip to content

Commit

Permalink
feat: freeze browser version to 112 (#1408)
Browse files Browse the repository at this point in the history
* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: freeze browser version

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe authored Jun 18, 2024
1 parent ab42426 commit 03548a6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: "osd:ciGroup${{ matrix.ciGroup }}"
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec '${{ matrix.specs }}'
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec '${{ matrix.specs }}'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true

tests-without-security:
Expand All @@ -82,7 +82,7 @@ jobs:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: "osd:ciGroup${{ matrix.ciGroup }}"
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec '${{ matrix.specs }}'
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec '${{ matrix.specs }}'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
security-enabled: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ on:
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/release-e2e-workflow-template-windows.yml'
push:
branches: [ '**' ]
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/release-e2e-workflow-template-windows.yml'

jobs:
tests-with-security:
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
# not useful now as the windows e2e template currently do not allow serving parameters
#osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true

tests-without-security:
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
test-command: env CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
# not useful now as the windows e2e template currently do not allow serving parameters
#osd-serve-args: --data_source.enabled=true --vis_builder.enabled=true
security-enabled: false
6 changes: 4 additions & 2 deletions .github/workflows/cypress-workflow-bundle-snapshot-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ on:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/cypress-workflow-bundle-snapshot-based.yml'
- '.github/workflows/release-e2e-workflow-template.yml'
push:
branches: ['**']
paths:
- 'cypress/**/core-opensearch-dashboards/**'
- 'cypress/utils/dashboards/**'
- '.github/workflows/cypress-workflow-bundle-snapshot-based.yml'
- '.github/workflows/release-e2e-workflow-template.yml'

jobs:
tests-with-security:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true --usageCollection.uiMetric.enabled=true

tests-without-security:
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
test-command: env CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_UIMETRIC_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js'
osd-serve-args: --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true --usageCollection.uiMetric.enabled=true
security-enabled: false
13 changes: 13 additions & 0 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ jobs:
with:
repository: ${{github.repository}}
path: cypress-test
- name: Remove Github built-in Chromium
run: |
sudo rm /usr/bin/chromium
sudo rm /usr/bin/chromium-browser
- name: Download Chromium 112
working-directory: cypress-test
run: |
## using Chromium 112 for stable test env, for more detail: https://github.com/opensearch-project/opensearch-build/issues/4241
source ./browser_downloader.sh
download_chromium
sudo ln -s $chromium_path /usr/bin/chromium
sudo ln -s $chromium_path /usr/bin/chromium-browser
- name: Get package version
working-directory: cypress-test
run: |
Expand Down Expand Up @@ -127,6 +139,7 @@ jobs:
- run: npx cypress cache path
- name: Cypress tests
uses: cypress-io/github-action@v2
timeout-minutes: 120
with:
working-directory: cypress-test
command: ${{ inputs.test-command }}
Expand Down
2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"defaultCommandTimeout": 60000,
"defaultCommandTimeout": 10000,
"requestTimeout": 60000,
"responseTimeout": 60000,
"baseUrl": "http://localhost:5601",
Expand Down
3 changes: 1 addition & 2 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import '../utils/commands';
import { currentBackendEndpoint } from '../utils/commands';
import '../utils/dashboards/commands';
import '../utils/dashboards/datasource-management-dashboards-plugin/commands';
import '../utils/plugins/index-management-dashboards-plugin/commands';
Expand All @@ -33,7 +33,6 @@ import '../utils/plugins/notifications-dashboards/commands';
import '../utils/plugins/dashboards-assistant/commands';
import '../utils/dashboards/console/commands';
import '../utils/dashboards/workspace-plugin/commands';
import { currentBackendEndpoint } from '../utils/commands';

import 'cypress-real-events';

Expand Down

0 comments on commit 03548a6

Please sign in to comment.