-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add all accessibility test cases (#3405)
* tests: add accessibility test for performance panel * tests: add accessibility test for customr esources * tests: add accessibility test for modules view * chore: remove duplicated run acc tests command * chore: cypress.config.js * chore: fix empty spec for CR * chore: add kyma for accessbility tests * chore: bring back Absa for creating k3d * tests: remove unnecesary comment * tests: add accessibility test for extensions * tests: add accessibility test for pizza orders * tests: add accessibility test for cron jobs * chore: cypress.config.js * tests: fix all of the tests * tests: fix all of the tests * chore: add moduleName instead of pageTitle
- Loading branch information
1 parent
47f0114
commit 604b4bc
Showing
12 changed files
with
581 additions
and
10 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
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
141 changes: 141 additions & 0 deletions
141
tests/integration/tests/accessibility/test-acc-cron-jobs.spec.js
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,141 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import 'cypress-file-upload'; | ||
|
||
const NAMESPACE_NAME = 'acc-cron-jobs'; | ||
const CRON_JOB_NAME = 'acc-test-cron-job'; | ||
|
||
context('Accessibility test Cron Jobs', () => { | ||
Cypress.skipAfterFail(); | ||
|
||
before(() => { | ||
cy.handleExceptions(); | ||
cy.setUpContinuum('continuum/continuum.conf.js'); | ||
cy.loginAndSelectCluster(); | ||
cy.createNamespace(NAMESPACE_NAME); | ||
}); | ||
|
||
it('Acc test Cron Jobs list', () => { | ||
cy.loginAndSelectCluster(); | ||
|
||
cy.getLeftNav() | ||
.contains('Namespaces') | ||
.click(); | ||
|
||
cy.get('ui5-input[placeholder="Search"]:visible') | ||
.find('input') | ||
.wait(1000) | ||
.type(NAMESPACE_NAME); | ||
|
||
cy.clickGenericListLink(NAMESPACE_NAME); | ||
|
||
cy.navigateTo('Workloads', 'Cron Jobs'); | ||
|
||
cy.contains('ui5-title', 'Cron Jobs').should('be.visible'); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Cron Jobs list', | ||
); | ||
}); | ||
|
||
it('Acc test Cron Jobs create', () => { | ||
cy.openCreate(); | ||
|
||
cy.getMidColumn() | ||
.contains('ui5-title', 'Create Cron Job') | ||
.should('be.visible'); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Cron Jobs create', | ||
); | ||
}); | ||
|
||
it('Acc test Cron Jobs details', () => { | ||
cy.get('[accessible-name="CronJob name"]') | ||
.find('input') | ||
.type(CRON_JOB_NAME, { force: true }); | ||
|
||
cy.get('[placeholder="Minute"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type(0, { force: true }); | ||
|
||
cy.get('[placeholder="Hour"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type(0, { force: true }); | ||
|
||
cy.get('[placeholder="Day of Month"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type(1, { force: true }); | ||
|
||
cy.get('[placeholder="Month"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type('*', { force: true }); | ||
|
||
cy.get('[placeholder="Day of Week"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type('*', { force: true }); | ||
|
||
cy.get( | ||
'[aria-label="expand Schedule: At 12:00 AM, on day 1 of the month"]', | ||
).click(); | ||
|
||
cy.contains('Command').click(); | ||
|
||
cy.get('[placeholder="Command to run in a container"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type('ls -la', { force: true }); | ||
|
||
cy.get('[accessible-name="Container name"]') | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type('test-container', { force: true }); | ||
|
||
cy.get( | ||
'[placeholder="Enter the Docker image tag, for example, \'busybox\'"]', | ||
) | ||
.find('input') | ||
.click() | ||
.clear() | ||
.type('busybox', { force: true }); | ||
|
||
cy.get('ui5-combobox[value="IfNotPresent"]') | ||
.find('ui5-icon[accessible-name="Select Options"]') | ||
.click(); | ||
|
||
cy.get('ui5-li:visible') | ||
.contains('Always') | ||
.click(); | ||
|
||
cy.saveChanges('Create'); | ||
|
||
cy.getMidColumn() | ||
.contains('ui5-title', CRON_JOB_NAME) | ||
.should('be.visible'); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Cron Jobs details', | ||
); | ||
}); | ||
}); |
95 changes: 95 additions & 0 deletions
95
tests/integration/tests/accessibility/test-acc-custom-resoureces.spec.js
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,95 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { loadFile } from '../../support/loadFile'; | ||
|
||
const FILE_NAME = 'test-customresourcedefinisions-cluster.yaml'; | ||
const TCLUSTER_FILE_NAME = 'test-Tcluster.yaml'; | ||
|
||
context('Accessibility test Custom Resources', () => { | ||
Cypress.skipAfterFail(); | ||
|
||
before(() => { | ||
cy.setUpContinuum('continuum/continuum.conf.js'); | ||
|
||
cy.loginAndSelectCluster(); | ||
|
||
cy.navigateTo('Configuration', 'Custom Resource Definitions'); | ||
|
||
cy.openCreate().click(); | ||
|
||
cy.wrap(loadFile(FILE_NAME)).then(CRD_CONFIG => { | ||
const CRD = JSON.stringify(CRD_CONFIG); | ||
cy.pasteToMonaco(CRD); | ||
}); | ||
|
||
cy.checkUnsavedDialog(); | ||
|
||
cy.saveChanges('Create'); | ||
}); | ||
|
||
it('Acc test Custom Resources overview', () => { | ||
cy.getLeftNav() | ||
.contains('Custom Resources') | ||
.click(); | ||
|
||
cy.contains('ui5-title', 'Custom Resources').should('be.visible'); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Custom Resources overview', | ||
); | ||
}); | ||
|
||
it('Acc test single Custom Resource list', () => { | ||
cy.get('ui5-table-row') | ||
.contains('Tclusters') | ||
.click(); | ||
|
||
cy.contains('ui5-title', 'Tclusters').should('be.visible'); | ||
|
||
cy.contains('ui5-button', /Create/i).should('be.visible'); | ||
|
||
cy.url().should('match', /customresources/); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Custom Resources single list', | ||
); | ||
}); | ||
|
||
it('Acc test Tcluster Custom Resource details', () => { | ||
cy.getLeftNav() | ||
.contains('Custom Resources') | ||
.click(); | ||
|
||
cy.get('ui5-input[placeholder="Search"]:visible') | ||
.find('input') | ||
.wait(1000) | ||
.type('cypress'); | ||
cy.clickGenericListLink('Tclusters'); | ||
|
||
cy.contains('ui5-button', 'Create').click(); | ||
|
||
cy.wrap(loadFile(TCLUSTER_FILE_NAME)).then(TC_CONFIG => { | ||
const TC = JSON.stringify(TC_CONFIG); | ||
cy.pasteToMonaco(TC); | ||
}); | ||
|
||
cy.checkUnsavedDialog(); | ||
|
||
cy.saveChanges('Create'); | ||
|
||
cy.contains('ui5-title', 'tcluster-test').should('be.visible'); | ||
|
||
cy.runAllAccessibilityTests() | ||
.printAccessibilityTestResults() | ||
.submitAccessibilityConcernsToAMP( | ||
Cypress.env('AMP_REPORT_NAME'), | ||
'Tcluster Custom Resource details', | ||
); | ||
}); | ||
}); |
Oops, something went wrong.