-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11508 from aalves08/11482-extensions-compatibilit…
…y-tests Extensions compatibility tests 2.10
- Loading branch information
Showing
14 changed files
with
484 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Extensions Compatibility Tests | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # runs at midnight every day | ||
|
||
env: | ||
TEST_USERNAME: admin | ||
TEST_PASSWORD: password | ||
CATTLE_BOOTSTRAP_PASSWORD: password | ||
TEST_BASE_URL: https://127.0.0.1:8005 | ||
API: https://127.0.0.1 | ||
TEST_PROJECT_ID: rancher-dashboard | ||
CYPRESS_API_URL: http://139.59.134.103:1234/ | ||
TEST_RUN_ID: ${{github.run_number}}-${{github.run_attempt}}-extensions-compatibility-tests | ||
|
||
jobs: | ||
e2e-test-extensions-compatibility: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
role: [ | ||
{ username: 'admin', tag: '@adminUser' } | ||
] | ||
features: [ | ||
['@elemental', 'elemental'] | ||
] | ||
rancherEnv: [ | ||
['2.10', 'v2.9-head'], | ||
# ['2.9', 'v2.9-head'] | ||
] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup env | ||
uses: ./.github/actions/setup | ||
|
||
# this is where docker is set up with the enviroment | ||
- name: Run Rancher system ${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} | ||
run: export RANCHER_VERSION_E2E=${{ matrix.rancherEnv[1] }} && yarn e2e:docker | ||
|
||
## this is just setting up rancher and user | ||
- name: Setup Rancher and user | ||
run: | | ||
yarn e2e:prod | ||
env: | ||
GREP_TAGS: ${{ matrix.role.tag }}Setup+${{ matrix.features[0] }} --@jenkins ${{ matrix.role.tag }}Setup+${{ matrix.features[0] }} --@jenkins | ||
TEST_USERNAME: ${{ matrix.role.username }} | ||
TEST_ONLY: setup | ||
|
||
# This is the actual triggering of the e2e test specs | ||
- name: Run user tests | ||
run: | | ||
export SPEC_FILE="cypress/e2e/tests/extensions/${{ matrix.features[1] }}/${{ matrix.features[1] }}.spec.ts" && yarn e2e:prod | ||
env: | ||
TEST_SKIP: setup | ||
GREP_TAGS: ${{ matrix.role.tag }}+${{ matrix.features[0] }} --@jenkins ${{ matrix.role.tag }}+${{ matrix.features[0] }} --@jenkins | ||
TEST_USERNAME: ${{ matrix.role.username }} | ||
|
||
- name: Upload screenshots | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ failure() }} | ||
with: | ||
name: ${{github.run_number}}-${{github.run_attempt}}-extensions-compatibility-tests-screenshots-${{ matrix.role.tag }}+${{ matrix.features[0] }} | ||
path: cypress/screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import ExtensionsCompatibilityUtils from '~/cypress/e2e/po/extensions/extensions-compatibility.utils'; | ||
import BannersPo from '@/cypress/e2e/po/components/banners.po'; | ||
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po'; | ||
import RadioGroupInputPo from '@/cypress/e2e/po/components/radio-group-input.po'; | ||
import PagePo from '@/cypress/e2e/po/pages/page.po'; | ||
|
||
class DashboardPagePo extends PagePo { | ||
private static url = '/elemental/c/_/dashboard'; | ||
|
||
constructor() { | ||
super(DashboardPagePo.url); | ||
} | ||
|
||
waitForTitle(): Cypress.Chainable { | ||
return this.self().find('h1').should('contain', 'OS Management'); | ||
} | ||
|
||
installOperator(): Cypress.Chainable { | ||
return this.self().getId('charts-install-button').click(); | ||
} | ||
|
||
createElementalCluster() { | ||
return this.self().getId('button-create-elemental-cluster').click(); | ||
} | ||
|
||
createUpdateGroupClick() { | ||
return this.self().getId('create-update-group-btn').click(); | ||
} | ||
} | ||
|
||
export default class ElementalPo extends ExtensionsCompatibilityUtils { | ||
dashboard() { | ||
return new DashboardPagePo(); | ||
} | ||
|
||
elementalClusterSelectorTemplateBanner() { | ||
return new BannersPo('[provider="machineinventoryselectortemplate"] .banner.warning'); | ||
} | ||
|
||
updateGroupTargetClustersSelect() { | ||
return new LabeledSelectPo('[data-testid="cluster-target"]'); | ||
} | ||
|
||
updateGroupImageOption() { | ||
return new RadioGroupInputPo('[data-testid="upgrade-choice-selector"]'); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
cypress/e2e/po/extensions/extensions-compatibility.utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import PagePo from '@/cypress/e2e/po/pages/page.po'; | ||
import { InstallChartPage } from '@/cypress/e2e/po/pages/explorer/charts/install-charts.po'; | ||
import ChartInstalledAppsPagePo from '@/cypress/e2e/po/pages/chart-installed-apps.po'; | ||
import BaseResourceList from '@/cypress/e2e/po/lists/base-resource-list.po'; | ||
import NameNsDescriptionPo from '@/cypress/e2e/po/components/name-ns-description.po'; | ||
import ResourceDetailPo from '@/cypress/e2e/po/edit/resource-detail.po'; | ||
import CodeMirrorPo from '~/cypress/e2e/po/components/code-mirror.po'; | ||
|
||
const installChartPage = new InstallChartPage(); | ||
const appsPage = new ChartInstalledAppsPagePo('local', 'apps'); | ||
const root = '.dashboard-root'; | ||
|
||
export default class ExtensionsCompatibilityUtils { | ||
appsPage() { | ||
return appsPage; | ||
} | ||
|
||
chartInstallPage() { | ||
return installChartPage; | ||
} | ||
|
||
genericPage(path: string) { | ||
return new PagePo(path); | ||
} | ||
|
||
genericResourceList(): BaseResourceList { | ||
return new BaseResourceList(cy.get(root)); | ||
} | ||
|
||
genericNameNsDescription(): NameNsDescriptionPo { | ||
return new NameNsDescriptionPo(cy.get(root)); | ||
} | ||
|
||
genericResourceDetail() { | ||
return new ResourceDetailPo(cy.get(root)); | ||
} | ||
|
||
genericCodeMirror() { | ||
return CodeMirrorPo.bySelector(cy.get(root), '[data-testid="yaml-editor-code-mirror"]'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.