Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.prettierPath": "./node_modules/prettier",
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"editor.formatOnSave": true,
"editor.rulers": [80, 120],
Expand Down
3 changes: 3 additions & 0 deletions functional-tests/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
allure-report
global-nav.sln
27 changes: 27 additions & 0 deletions functional-tests/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_style = space
indent_size = 2

[*.sh]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 2

[*.feature]
indent_style = space
indent_size = 2
35 changes: 35 additions & 0 deletions functional-tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
plugins: ["@typescript-eslint", "prettier"],
extends: [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": 2,
},
overrides: [
{
files: ["*.js"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
],
};
69 changes: 69 additions & 0 deletions functional-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
errorShots/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# Captured screenshot errors from webdriver.io
errorShots

# Screenshots copied from inside a docker container
errorShots_docker

allure-results
allure-report
global-nav.sln
1 change: 1 addition & 0 deletions functional-tests/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
25 changes: 25 additions & 0 deletions functional-tests/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"useTabs": true,
"printWidth": 80,
"endOfLine": "lf",
"overrides": [
{
"files": ["**/*.{scss,md,yml,sh}"],
"options": {
"useTabs": false,
"tabWidth": 2,
"singleQuote": true
}
},
{
"files": ["../**/*.json", "*.json"],
"options": {
"useTabs": false,
"tabWidth": 2
}
}
]
}
10 changes: 10 additions & 0 deletions functional-tests/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"christian-kohler.npm-intellisense",
"eg2.vscode-npm-script",
"alexkrechik.cucumberautocomplete",
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
]
}
47 changes: 47 additions & 0 deletions functional-tests/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run current feature",
"type": "node",
"request": "launch",
"args": ["wdio.conf.js", "--spec", "${relativeFile}"],
"runtimeArgs": ["--nolazy"],
"cwd": "${workspaceFolder}",
// "localRoot": "${workspaceFolder}",
// "remoteRoot": "${workspaceFolder}",
"autoAttachChildProcesses": true,
"program": "${workspaceRoot}/node_modules/@wdio/cli/bin/wdio.js",
"console": "integratedTerminal",
"presentation": {
"hidden": false,
"group": "Tests",
"order": 1
},
"sourceMaps": true,
"smartStep": true
},
{
"type": "node",
"request": "launch",
"name": "WebdriverIO",
"runtimeExecutable": "${workspaceRoot}/functional-tests/node_modules/.bin/wdio",
"port": 9299,
"args": ["--spec", "features/***.feature"],
"env": {
"DEBUG": "true"
},
//"windows": {
// "runtimeExecutable": "${workspaceRoot}/functional-tests/node_modules/.bin/wdio.cmd"
//},
"cwd": "${workspaceRoot}/functional-tests",
"console": "integratedTerminal"
// This args config runs only the file that's open and displayed
// (e.g., a file in test/spec/):
//"args":[
// "test"
// ]
///"runtimeArgs": [""],
}
]
}
26 changes: 26 additions & 0 deletions functional-tests/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.rulers": [80, 120],
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"[feature]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "alexkrechik.cucumberautocomplete"
},
"files.eol": "\n",
"cucumberautocomplete.steps": [
"node_modules/@nice-digital/wdio-cucumber-steps/lib/given/definitions.js",
"node_modules/@nice-digital/wdio-cucumber-steps/lib/when/definitions.js",
"node_modules/@nice-digital/wdio-cucumber-steps/lib/then/definitions.js",
"./steps/**/*.ts"
],
"cucumberautocomplete.customParameters": [
{
"parameter": "(window|tab)",
"value": "window/tab"
}
]
}
29 changes: 29 additions & 0 deletions functional-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:14

ENV IN_DOCKER=true

# Install Java (for Allure) see https://stackoverflow.com/a/44154721/486434
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
#apt-get install -y software-properties-common && \
apt-get install -y default-jre-headless

# Install Allure for generating a report
RUN curl -o allure-2.13.2.tgz -Ls https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.13.2/allure-commandline-2.13.2.tgz \
&& tar -zxf allure-2.13.2.tgz -C /usr/local --strip-components=1 \
&& rm allure-2.13.2.tgz

RUN mkdir -p /tests

RUN echo "{}" > /tests/tsconfig.json

WORKDIR /tests

COPY package.json /tests
COPY package-lock.json /tests

RUN npm ci --quiet

COPY . /tests

CMD tail -f /dev/null
Loading