Skip to content

Commit eb56675

Browse files
committed
Initial commit
0 parents  commit eb56675

File tree

218 files changed

+67242
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+67242
-0
lines changed

.circleci/config.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
version: 2.1
2+
3+
orbs:
4+
allure: ayte/[email protected]
5+
browser-tools: circleci/[email protected]
6+
webex-orb: cxepi/[email protected]
7+
8+
jobs:
9+
run_tests:
10+
circleci_ip_ranges: true
11+
docker:
12+
- image: cimg/node:16.16.0-browsers
13+
environment:
14+
TERM: xterm
15+
parameters:
16+
specPath:
17+
type: string
18+
userType:
19+
type: string
20+
environment:
21+
type: string
22+
default: "Test"
23+
browser:
24+
type: string
25+
base_url:
26+
type: string
27+
default: ${BASE_URL_TEST}
28+
working_directory: ~/repo
29+
steps:
30+
- checkout
31+
- browser-tools/install-chrome
32+
- browser-tools/install-chromedriver
33+
- browser-tools/install-firefox
34+
- browser-tools/install-geckodriver
35+
- allure/install
36+
- restore_cache:
37+
name: Restore `package.json` cache
38+
keys:
39+
- deps-{{ .Branch }}-{{ checksum "package.json" }}
40+
- deps-{{ .Branch }}
41+
- deps
42+
- run:
43+
name: Install Dependencies
44+
command: |
45+
npm ci
46+
- save_cache:
47+
name: Save Cache - NPM and Cypress!
48+
key: v3-deps-{{ .Branch }}-{{ checksum "package.json" }}
49+
paths:
50+
- ~/.npm
51+
- ~/.cache/Cypress
52+
- run:
53+
name: Install Edge Browser
54+
command: |
55+
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
56+
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
57+
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
58+
sudo rm microsoft.gpg
59+
sudo apt update
60+
sudo apt install microsoft-edge-dev
61+
wget https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver/104.0.1271.2/edgedriver_linux64.zip -P ~/
62+
unzip ~/edgedriver_linux64.zip -d ~/
63+
rm ~/edgedriver_linux64.zip
64+
sudo mv -f ~/msedgedriver /usr/local/share/
65+
sudo chmod 777 /usr/local/share/msedgedriver
66+
sudo ln -s /usr/local/share/msedgedriver /usr/local/bin/msedgedriver
67+
- run:
68+
name: Run Cypress Tests on << parameters.browser >>
69+
command: |
70+
export CYPRESS_BASE_URL=<< parameters.base_url >>
71+
export CYPRESS_PA_ST_ONLY_USER=${PA_ST_ONLY_USER}
72+
export CYPRESS_PA_ST_HCAAS_USER=${PA_ST_HCAAS_USER}
73+
export CYPRESS_PA_HCAAS_ONLY_USER=${PA_HCAAS_ONLY_USER}
74+
export CYPRESS_PA_LCA_USER=${PA_LCA_USER}
75+
export CYPRESS_PORTAL_PASSWORD=${PORTAL_PASSWORD}
76+
npm run cy:exec -- -b "<< parameters.browser >>" -s "<< parameters.specPath >>"
77+
- store_test_results:
78+
name: Store Test Results
79+
path: results/junit
80+
- run:
81+
name: Generate Allure Report
82+
when: always
83+
command: npm run report:generate
84+
- store_artifacts:
85+
name: Store Allure Report
86+
path: results/allure-report
87+
- webex-orb/notify:
88+
message: >-
89+
Hi Team, Below is the Cypress UI Automation Report on << parameters.environment >> Environment for << parameters.userType >> in "<< parameters.browser >>" browser. Circle CI Build URL - ${CIRCLE_BUILD_URL} Allure Report - https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/results/allure-report/index.html
90+
91+
workflows:
92+
run_tests_all_roles:
93+
jobs:
94+
- run_tests:
95+
name: "Admin (ST Only) - chrome"
96+
userType: "Admin - ST Only User"
97+
specPath: "cypress/e2e/admin_st_only/**/*.feature"
98+
browser: chrome
99+
filters:
100+
branches:
101+
only:
102+
- main
103+
- run_tests:
104+
name: "Admin (HCAAS Only) - chrome"
105+
userType: "Admin - HCAAS Only User"
106+
specPath: "cypress/e2e/admin_hcaas_only/**/*.feature"
107+
browser: chrome
108+
filters:
109+
branches:
110+
only:
111+
- main
112+
- run_tests:
113+
name: "Admin (HCAAS + ST) - chrome"
114+
userType: "Admin - HCAAS + ST User"
115+
specPath: "cypress/e2e/admin_hcaas_st/**/*.feature"
116+
browser: chrome
117+
filters:
118+
branches:
119+
only:
120+
- main
121+
- run_tests:
122+
name: "Admin (LCA) - chrome"
123+
userType: "Admin - LCA User"
124+
specPath: "cypress/e2e/admin_lca/**/*.feature"
125+
browser: chrome
126+
filters:
127+
branches:
128+
only:
129+
- main

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.git
2+
.gitignore
3+
Dockerfile
4+
node_modules

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = tab
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/*.js
2+
CODEOWNERS
3+
node_modules
4+
.circleci
5+
.husky
6+
.vscode
7+
package-lock.json
8+
cypress/support/stepDefinitions/hooks.ts

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": [
3+
"plugin:cypress/recommended",
4+
"plugin:@typescript-eslint/eslint-recommended",
5+
"plugin:@typescript-eslint/recommended"
6+
],
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": ["@typescript-eslint"],
9+
"ignorePatterns": ["!**/*"],
10+
"overrides": [
11+
{
12+
"files": ["*.ts", "*.tsx"],
13+
"parserOptions": {
14+
"project": "tsconfig.json"
15+
},
16+
"extends": ["plugin:diff/diff"],
17+
"rules": {
18+
"@typescript-eslint/no-var-requires": "warn",
19+
"cypress/no-assigning-return-values": "error",
20+
"cypress/no-unnecessary-waiting": "error",
21+
"cypress/assertion-before-screenshot": "warn",
22+
"cypress/no-force": "warn",
23+
"cypress/no-async-tests": "error",
24+
"cypress/no-pause": "error"
25+
}
26+
}
27+
]
28+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
# System Files
3+
.DS_Store
4+
Thumbs.db
5+
6+
# Node Modules & Results
7+
node_modules/
8+
results/

.husky/.gitignore

Whitespace-only changes.

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx pretty-quick --staged
5+
npx eslint .

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/*.js
2+
CODEOWNERS
3+
node_modules
4+
.circleci
5+
.husky
6+
.vscode
7+
package-lock.json
8+
*.md
9+
Dockerfile
10+
.dockerignore
11+
**/*.yml

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"proseWrap": "always",
4+
"trailingComma": "all"
5+
}

0 commit comments

Comments
 (0)