forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cypress-cucumber-automation-framework
updated Read-Me document, package.json and Report file name updated test attributes in add page.ts and added data test atttibutes in dev code for monitoring page commented a11y vaidations and raised the defects for the same Updated .git-ignore with package-lock.json because it is not listed in our dependencies
- Loading branch information
makambalaji
committed
Nov 3, 2020
1 parent
242d2f4
commit b0858af
Showing
28 changed files
with
2,349 additions
and
227 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"env": { | ||
"cypress/globals": true, | ||
"node": true | ||
}, | ||
"extends": ["../../.eslintrc", "plugin:cypress/recommended", "plugin:prettier/recommended"], | ||
"plugins": ["cypress"], | ||
"rules": { | ||
"no-console": "off", | ||
"no-namespace": "off", | ||
"no-redeclare": "off", | ||
"promise/catch-or-return": "off", | ||
"promise/no-nesting": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
frontend/packages/dev-console/integration-tests/cypress.json
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,32 @@ | ||
{ | ||
"integrationFolder": "features", | ||
"testFiles": "**/*.{feature,features}", | ||
"defaultCommandTimeout": 30000, | ||
"viewportWidth": 1920, | ||
"viewportHeight": 1080, | ||
"watchForFileChanges": true, | ||
"chromeWebSecurity": true, | ||
"waitForAnimation": true, | ||
"animationDistanceThreshold": 20, | ||
"execTimeout": 90000, | ||
"pageLoadTimeout": 90000, | ||
"requestTimeout": 15000, | ||
"responseTimeout": 15000, | ||
"supportFile": "support/commands/index.ts", | ||
"pluginsFile": "plugins/index.js", | ||
"fixturesFolder": "testData", | ||
"video": true, | ||
"reporter": "../../../node_modules/cypress-multi-reporters", | ||
"reporterOptions": { | ||
"configFile": "reporter-config.json" | ||
}, | ||
"screenshotsFolder": "../../../gui_test_screenshots/cypress/screenshots", | ||
"videosFolder": "../../../gui_test_screenshots/cypress/videos", | ||
"env": { | ||
"TAGS": "@smoke and not @manual" | ||
}, | ||
"retries": { | ||
"runMode": 1, | ||
"openMode": 0 | ||
} | ||
} |
14 changes: 5 additions & 9 deletions
14
frontend/packages/dev-console/integration-tests/features/project-creation.feature
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
Feature: OpenShift Namespaces | ||
As a user, I want to create the namespace to group and isolate related objects | ||
|
||
@e2e, @4.5 | ||
Scenario Outline: Create the namespace | ||
Given user is at developer perspecitve | ||
@smoke | ||
Scenario: Create the namespace | ||
Given user is at developer perspective | ||
When user selects the Create Project option from Projects dropdown on top navigation bar | ||
And user enters project name as "<project_name>" in Create Project modal | ||
And user enters project name as "aut-project" in Create Project modal | ||
And user clicks Create button present in Create Project modal | ||
Then modal will get closed | ||
And topology page displays with message "No workloads found" | ||
And topology page displays with message "No resources found" | ||
And topology page have cards from Add page | ||
|
||
Examples: | ||
| project_name | | ||
| aut-mb-project | |
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,9 @@ | ||
{ | ||
"name": "@dev-console/integration-tests", | ||
"version": "0.0.1", | ||
"description": "OpenShift Developer Perspective Cypress tests", | ||
"private": true, | ||
"cypress-cucumber-preprocessor": { | ||
"step_definitions": "support/step-definitions/*/" | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
frontend/packages/dev-console/integration-tests/plugins/index.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,78 @@ | ||
const webpack = require('@cypress/webpack-preprocessor'); | ||
const fs = require('fs'); | ||
|
||
module.exports = (on, config) => { | ||
const options = { | ||
webpackOptions: { | ||
resolve: { | ||
extensions: ['.ts', '.tsx', '.js'], | ||
}, | ||
node: { fs: 'empty', child_process: 'empty', readline: 'empty' }, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
options: { transpileOnly: true }, | ||
}, | ||
{ | ||
test: /\.feature$/, | ||
use: [ | ||
{ | ||
loader: 'cypress-cucumber-preprocessor/loader', | ||
}, | ||
], | ||
}, | ||
{ | ||
test: /\.features$/, | ||
use: [ | ||
{ | ||
loader: 'cypress-cucumber-preprocessor/lib/featuresLoader', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
}; | ||
// `on` is used to hook into various events Cypress emits | ||
on('task', { | ||
log(message) { | ||
console.log(message); | ||
return null; | ||
}, | ||
logError(message) { | ||
console.error(message); | ||
return null; | ||
}, | ||
logTable(data) { | ||
console.table(data); | ||
return null; | ||
}, | ||
readFileIfExists(filename) { | ||
if (fs.existsSync(filename)) { | ||
return fs.readFileSync(filename, 'utf8'); | ||
} | ||
return null; | ||
}, | ||
}); | ||
on('file:preprocessor', webpack(options)); | ||
/* In a Docker container, the default size of the /dev/shm shared memory space is 64MB. This is not typically enough | ||
to run Chrome and can cause the browser to crash. You can fix this by passing the --disable-dev-shm-usage flag to | ||
Chrome with the following workaround: */ | ||
on('before:browser:launch', (browser = {}, launchOptions) => { | ||
if (browser.family === 'chromium' && browser.name !== 'electron') { | ||
launchOptions.args.push('--disable-dev-shm-usage'); | ||
} | ||
return launchOptions; | ||
}); | ||
// `config` is the resolved Cypress config | ||
config.baseUrl = `${process.env.BRIDGE_BASE_ADDRESS || 'http://localhost:9000'}${( | ||
process.env.BRIDGE_BASE_PATH || '/' | ||
).replace(/\/$/, '')}`; | ||
config.env.BRIDGE_HTPASSWD_IDP = process.env.BRIDGE_HTPASSWD_IDP; | ||
config.env.BRIDGE_HTPASSWD_USERNAME = process.env.BRIDGE_HTPASSWD_USERNAME; | ||
config.env.BRIDGE_HTPASSWD_PASSWORD = process.env.BRIDGE_HTPASSWD_PASSWORD; | ||
config.env.BRIDGE_KUBEADMIN_PASSWORD = process.env.BRIDGE_KUBEADMIN_PASSWORD; | ||
return config; | ||
}; |
14 changes: 14 additions & 0 deletions
14
frontend/packages/dev-console/integration-tests/reporter-config.json
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,14 @@ | ||
{ | ||
"reporterEnabled": "mocha-junit-reporter, mochawesome", | ||
"mochaJunitReporterReporterOptions": { | ||
"mochaFile": "../../../gui_test_screenshots/junit_cypress-[hash].xml", | ||
"toConsole": false | ||
}, | ||
"mochawesomeReporterOptions": { | ||
"reportDir": "../../../gui_test_screenshots/", | ||
"reportFilename": "cypress_report_devconsole", | ||
"overwrite": false, | ||
"html": false, | ||
"json": true | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend/packages/dev-console/integration-tests/support/commands/app.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,14 @@ | ||
import { checkErrors } from '../../../../integration-tests-cypress/support'; | ||
|
||
before(() => { | ||
cy.login(); | ||
cy.visit(''); | ||
}); | ||
|
||
after(() => { | ||
cy.logout(); | ||
}); | ||
|
||
afterEach(() => { | ||
checkErrors(); | ||
}); |
7 changes: 7 additions & 0 deletions
7
frontend/packages/dev-console/integration-tests/support/commands/index.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,7 @@ | ||
// Include the cypress customized commands related files | ||
import '../../../../integration-tests-cypress/support/selectors'; | ||
import '../../../../integration-tests-cypress/support/a11y'; | ||
import './app'; | ||
import '../../../../integration-tests-cypress/support/login'; | ||
import '../../../../integration-tests-cypress/support/project'; | ||
import '../../../../integration-tests-cypress/support/index'; |
49 changes: 49 additions & 0 deletions
49
frontend/packages/dev-console/integration-tests/support/constants/add.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,49 @@ | ||
export enum addOptions { | ||
Git = 'From Git', | ||
ContainerImage = 'Container Image', | ||
DockerFile = 'From Dockerfile', | ||
YAML = 'YAML', | ||
DeveloperCatalog = 'From Catalog', | ||
Database = 'Database', | ||
OperatorBacked = 'Operator Backed', | ||
HelmChart = 'Helm Chart', | ||
Pipeline = 'Pipeline', | ||
EventSource = 'Event Source', | ||
} | ||
|
||
export enum buildConfigOptions { | ||
webhookBuildTrigger = 'Configure a webhook build trigger', | ||
automaticBuildImage = 'Automatically build a new image when the builder image changes', | ||
launchBuildOnCreatingBuildConfig = 'Launch the first build when the build configuration is created', | ||
} | ||
|
||
export enum resourceTypes { | ||
Deployment = 'Deployment', | ||
DeploymentConfig = 'Deployment Config', | ||
knativeService = 'knative', | ||
} | ||
|
||
export enum gitAdvancedOptions { | ||
Routing = 'Developer Perspective', | ||
BuildConfig = ' Administrator Perspective', | ||
Deployment = 'Deployment', | ||
Scaling = 'Scaling', | ||
ResourceLimits = 'Resource Limits', | ||
Labels = 'Labels', | ||
HealthChecks = 'Health Checks', | ||
} | ||
|
||
export enum caatalogCards { | ||
mariaDB = 'MariaDB', | ||
dotnetCoreExample = '.NET Core Example', | ||
cakePhp = 'CakePHP + MySQL', | ||
nodeJs = 'Node.js', | ||
} | ||
|
||
export enum catalogTypes { | ||
OperatorBacked = 'Operator Backed', | ||
HelmCharts = 'Helm Charts', | ||
BuilderImage = 'Builder Image', | ||
Template = 'Template', | ||
ServiceClass = 'Service Class', | ||
} |
27 changes: 27 additions & 0 deletions
27
frontend/packages/dev-console/integration-tests/support/constants/global.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,27 @@ | ||
export enum devNavigationMenu { | ||
Add = '+Add', | ||
Topology = ' Topology', | ||
Monitoring = 'Monitoring', | ||
Builds = 'Builds', | ||
Search = 'Search', | ||
Helm = 'Helm', | ||
Project = 'Project', | ||
ProjectAccess = 'Project Access', | ||
Pipelines = 'Pipelines', | ||
ConfigMaps = 'Config Maps', | ||
Secrets = 'Secrets', | ||
GitOps = 'GitOps', | ||
} | ||
|
||
export enum switchPerspective { | ||
Developer = 'Developer Perspective', | ||
Administrator = ' Administrator Perspective', | ||
} | ||
|
||
export enum operators { | ||
pipelineOperator = 'Pipeline Operator', | ||
serverlessOperator = 'Serverless Operator', | ||
virtualizationOperator = 'Virtualization Operator', | ||
knativeCamelOperator = 'knative Apache Camel Operator', | ||
eclipseCheOperator = 'Eclipse Che', | ||
} |
Oops, something went wrong.