Skip to content

Commit

Permalink
6854 configure cucumber and step definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
ladamesny committed Oct 3, 2023
1 parent d471ba9 commit 8b42482
Show file tree
Hide file tree
Showing 55 changed files with 10,547 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
.vscode
public/app.js
.pre-commit-config.yaml
# E2E tests
!e2e/yarn.lock
e2e/node_modules
e2e/reports
3 changes: 3 additions & 0 deletions e2e/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-typescript", "@babel/preset-env"]
}
3 changes: 3 additions & 0 deletions e2e/config/hosts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"localhost": "http://0.0.0.0:8080/"
}
3 changes: 3 additions & 0 deletions e2e/config/mappings/page-elements/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"header logo": {"role": "heading", "name": "header-logo" }
}
3 changes: 3 additions & 0 deletions e2e/config/mappings/page-elements/contract-simulation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Currency Amount" : { "role": "spinbutton", "name": "Decimal Amount"}
}
44 changes: 44 additions & 0 deletions e2e/config/mappings/page-elements/home.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"Start in Javascript": { "role": "link", "name": "Start in Javascript" },
"Start in Haskell": { "role": "link", "name": "Start in Haskell" },
"Start in Marlowe": { "role": "link", "name": "Start in Marlowe" },
"Start in Blockly": { "role": "link", "name": "Start in Blockly" },
"Open existing project": { "role": "button", "name": "Open existing project" },
"Open an example": { "role": "button", "name": "Open an example" },
"Login with github": { "role": "heading", "name": "Login with github" },
"Escrow header": { "role": "heading", "name": "Escrow" },
"Escrow Haskell": { "role": "button", "name": "Escrow Haskell" },
"Escrow Javascript": { "role": "button", "name": "Escrow Javascript" },
"Escrow Marlowe": { "role": "button", "name": "Escrow Marlowe" },
"Escrow Blockly": { "role": "button", "name": "Escrow Blockly" },
"Escrow with Collateral header": { "role": "heading", "name": "Escrow With Collateral" },
"Escrow with Collateral Haskell": { "role": "button", "name": "Escrow With Collateral Haskell" },
"Escrow with Collateral Javascript": { "role": "button", "name": "Escrow With Collateral Javascript" },
"Escrow with Collateral Marlowe": { "role": "button", "name": "Escrow With Collateral Marlowe" },
"Escrow with Collateral Blockly": { "role": "button", "name": "Escrow With Collateral Blockly" },
"Zero Coupon Bond header": { "role": "heading", "name": "Zero Coupon Bond" },
"Zero Coupon Bond Haskell": { "role": "button", "name": "Zero Coupon Bond Haskell" },
"Zero Coupon Bond Javascript": { "role": "button", "name": "Zero Coupon Bond Javascript" },
"Zero Coupon Bond Marlowe": { "role": "button", "name": "Zero Coupon Bond Marlowe" },
"Zero Coupon Bond Blockly": { "role": "button", "name": "Zero Coupon Bond Blockly" },
"Coupon Bond Guaranteed header": { "role": "heading", "name": "Coupon Bond Guaranteed" },
"Coupon Bond Guaranteed Haskell": { "role": "button", "name": "Coupon Bond Guaranteed Haskell" },
"Coupon Bond Guaranteed Javascript": { "role": "button", "name": "Coupon Bond Guaranteed Javascript" },
"Coupon Bond Guaranteed Marlowe": { "role": "button", "name": "Coupon Bond Guaranteed Marlowe" },
"Coupon Bond Guaranteed Blockly": { "role": "button", "name": "Coupon Bond Guaranteed Blockly" },
"Swap header": { "role": "heading", "name": "Swap" },
"Swap Haskell": { "role": "button", "name": "Swap Haskell" },
"Swap Javascript": { "role": "button", "name": "Swap Javascript" },
"Swap Marlowe": { "role": "button", "name": "Swap Marlowe" },
"Swap Blockly": { "role": "button", "name": "Swap Blockly" },
"Contract For Differences header": { "role": "heading", "name": "Contract For Differences" },
"Contract For Differences Haskell": { "role": "button", "name": "Contract For Differences Haskell" },
"Contract For Differences Javascript": { "role": "button", "name": "Contract For Differences Javascript" },
"Contract For Differences Marlowe": { "role": "button", "name": "Contract For Differences Marlowe" },
"Contract For Differences Blockly": { "role": "button", "name": "Contract For Differences Blockly" },
"Contract For Differences with Oracle header": { "role": "heading", "name": "Contract For Differences with Oracle" },
"Contract For Differences with Oracle Haskell": { "role": "button", "name": "Contract For Differences with Oracle Haskell" },
"Contract For Differences with Oracle Javascript": { "role": "button", "name": "Contract For Differences with Oracle Javascript" },
"Contract For Differences with Oracle Marlowe": { "role": "button", "name": "Contract For Differences with Oracle Marlowe" },
"Contract For Differences with Oracle Blockly": { "role": "button", "name": "Contract For Differences with Oracle Blockly" }
}
3 changes: 3 additions & 0 deletions e2e/config/mappings/page-elements/javascript-editor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"JS Editor": { "role": "textbox", "name": "Editor content;Press Alt+F1 for Accessibility Options."}
}
7 changes: 7 additions & 0 deletions e2e/config/mappings/page-elements/playground.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor header": { "role": "heading", "name": "project-title"},
"playground editor": { "role": "heading", "name": "javascript-editor"},
"Compile": { "role": "button", "name": "Compile"},
"Send To Simulator": { "role": "button", "name": "Send to Simulator"},
"JS Editor": { "role": "textbox", "name": "Editor content;Press Alt+F1 for Accessibility Options."}
}
6 changes: 6 additions & 0 deletions e2e/config/pages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"home": {
"route": "/",
"regex": "^/#/$"
}
}
1 change: 1 addition & 0 deletions e2e/cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("./dist");
1 change: 1 addition & 0 deletions e2e/dist/env/global.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"use strict";
22 changes: 22 additions & 0 deletions e2e/dist/env/parseEnv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getJsonFromFile = exports.envNumber = exports.env = void 0;
var env = function env(key) {
var value = process.env[key];
if (!value) {
throw Error("No environment variable found for ".concat(key));
}
return value;
};
exports.env = env;
var getJsonFromFile = function getJsonFromFile(path) {
return require("".concat(process.cwd()).concat(path));
};
exports.getJsonFromFile = getJsonFromFile;
var envNumber = function envNumber(key) {
return Number(env[key]);
};
exports.envNumber = envNumber;
46 changes: 46 additions & 0 deletions e2e/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions e2e/dist/reporter/cucumber-report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use strict";

var _dotenv = _interopRequireDefault(require("dotenv"));
var _cucumberHtmlReporter = _interopRequireDefault(require("cucumber-html-reporter"));
var _parseEnv = require("../env/parseEnv");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_dotenv["default"].config({
path: (0, _parseEnv.env)('COMMON_CONFIG_FILE')
});
var options = {
theme: 'bootstrap',
jsonFile: (0, _parseEnv.env)('JSON_REPORT_FILE'),
output: (0, _parseEnv.env)('HTML_REPORT_FILE'),
screenshotsDirectory: (0, _parseEnv.env)('SCREENSHOT_PATH'),
storeScreenshots: true,
reportSuiteAsScenarios: true,
launchReport: false
};
_cucumberHtmlReporter["default"].generate(options);
Loading

0 comments on commit 8b42482

Please sign in to comment.