@zohodesk/testinglibrary 0.1.8-cbdd-26.4 → 0.1.8-eslint-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +18 -18
- package/.eslintrc.js +31 -31
- package/.prettierrc +5 -5
- package/README.md +17 -17
- package/bin/cli.js +2 -2
- package/build/bdd-poc/config/pathConfig.js +7 -3
- package/build/bdd-poc/core-runner/createCallbacksMap.js +4 -3
- package/build/bdd-poc/core-runner/exportMethods.js +9 -7
- package/build/bdd-poc/core-runner/intialize.js +3 -1
- package/build/bdd-poc/core-runner/main.js +14 -8
- package/build/bdd-poc/core-runner/stepRunner.js +52 -22
- package/build/bdd-poc/errors/throwError.js +4 -1
- package/build/bdd-poc/{test/stepsDefinition/createTestCode.js → gherkin-parser/createTestTemplate.js} +14 -14
- package/build/bdd-poc/{test → gherkin-parser}/cucumber/cucumberSynatxParser.js +3 -2
- package/build/bdd-poc/{test → gherkin-parser}/cucumber/data-driven/dataSourceMap.js +3 -17
- package/build/bdd-poc/{test → gherkin-parser}/stepsDefinition/extractTestInputs.js +3 -0
- package/build/bdd-poc/{test → gherkin-parser/stepsDefinition}/generateStep.js +10 -10
- package/build/bdd-poc/{test/stepsDefinition/parserSteps.js → gherkin-parser/stepsDefinition/parserStepsArguments.js} +12 -12
- package/build/bdd-poc/index.js +4 -4
- package/build/bdd-poc/snippets/stepsnippets.js +12 -9
- package/build/core/playwright/readConfigFile.js +30 -30
- package/build/core/playwright/setup/config-creator.js +13 -6
- package/build/core/playwright/setup/config-utils.js +7 -7
- package/build/core/playwright/test-runner.js +3 -3
- package/build/index.d.ts +13 -15
- package/build/index.js +6 -4
- package/build/integrate-dependencies/reportConfigSonarQube.js +68 -0
- package/build/lib/cli.js +7 -0
- package/build/parser/sample.feature +34 -34
- package/build/parser/sample.spec.js +18 -18
- package/build/setup-folder-structure/reportEnhancement/addonScript.html +24 -24
- package/build/setup-folder-structure/samples/auth-setup-sample.js +72 -72
- package/build/setup-folder-structure/samples/authUsers-sample.json +8 -8
- package/build/setup-folder-structure/samples/env-config-sample.json +20 -20
- package/build/setup-folder-structure/samples/git-ignore.sample.js +36 -36
- package/build/setup-folder-structure/samples/uat-config-sample.js +44 -44
- package/build/utils/cliArgsToObject.js +25 -25
- package/changelog.md +131 -131
- package/jest.config.js +63 -63
- package/npm-shrinkwrap.json +6098 -5994
- package/package.json +57 -56
- package/playwright.config.js +112 -112
- /package/build/bdd-poc/{test → gherkin-parser}/cucumber/cucumber.js +0 -0
- /package/build/bdd-poc/{test → gherkin-parser}/tagsHandle.js +0 -0
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.testSuite = testSuite;
|
|
6
|
+
exports.createStepFormat = createStepFormat;
|
|
7
|
+
exports.createTestFormat = createTestFormat;
|
|
8
|
+
exports.describeTest = describeTest;
|
|
10
9
|
const TESTING_LIBRARY = '@zohodesk/testinglibrary';
|
|
11
10
|
function stepReportHandle(Steps, Example) {
|
|
12
11
|
var _steps = [...Steps];
|
|
@@ -19,7 +18,7 @@ function stepReportHandle(Steps, Example) {
|
|
|
19
18
|
});
|
|
20
19
|
return [...resultSteps.split(medium)];
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function createStepFormat(keyword, description, pageFixtureUsed_Step, testData, stepDescription, options) {
|
|
23
22
|
return `await test.step('${keyword.trim()}:${stepDescription.replace(new RegExp(`'`, 'g'), ' ')}',async() => {
|
|
24
23
|
await $${keyword}("${description}")(${pageFixtureUsed_Step},${testData})
|
|
25
24
|
})`;
|
|
@@ -29,7 +28,7 @@ function testSuite(description, scenariotestBlock, tags, options = null) {
|
|
|
29
28
|
${scenariotestBlock}
|
|
30
29
|
})`;
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function describeTest(steps, examples, description, pageFixtures, tags, option) {
|
|
33
32
|
if (examples.length >= 1) {
|
|
34
33
|
const exmapleScenario = examples.map(($ele, index) => {
|
|
35
34
|
var exampleDescription = Object.values($ele).map(val => {
|
|
@@ -47,7 +46,7 @@ function testBlock(description, steps, pageFixtures) {
|
|
|
47
46
|
${steps.join(`\n\t`)}
|
|
48
47
|
})`;
|
|
49
48
|
}
|
|
50
|
-
function
|
|
49
|
+
function createTestFormat(testCases, relativeFilePath, $tags = ' ', options = null) {
|
|
51
50
|
return ` // ${relativeFilePath}
|
|
52
51
|
import { test, createNativeBDD } from "${TESTING_LIBRARY}";
|
|
53
52
|
const {$Given,$When,$Then,$And} = createNativeBDD()
|
|
@@ -56,6 +55,10 @@ function testFile(testCase, relativeFilePath, $tags = ' ', options = null) {
|
|
|
56
55
|
$tags: ({}, use, testInfo) => use(${JSON.stringify($tags)}
|
|
57
56
|
[testInfo.titlePath.slice(2).join("|")] || [])
|
|
58
57
|
})
|
|
59
|
-
${
|
|
58
|
+
${testCases.join('')}
|
|
60
59
|
`;
|
|
61
|
-
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* test templete else snippet
|
|
64
|
+
*/
|
|
@@ -57,40 +57,40 @@ function combineDefaultConfigWithUserConfig(userConfiguration) {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* @typedef {Object|null} viewportConfig
|
|
62
|
-
* @property {number} width - width of the viewport
|
|
63
|
-
* @property {number} height - height of the viewport
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object|null} viewportConfig
|
|
62
|
+
* @property {number} width - width of the viewport
|
|
63
|
+
* @property {number} height - height of the viewport
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* Represents the user configuration object.
|
|
68
|
-
* @typedef {Object} UserConfig
|
|
69
|
-
* @property {string} headless - Headless Browsers mode.
|
|
70
|
-
* @property {number} trace - trace for test cases.
|
|
71
|
-
* @property {boolean} video - video for test cases,
|
|
72
|
-
* @property {boolean} debug - debug mode
|
|
73
|
-
* @property {string} mode: mode in which the test cases needs to run
|
|
74
|
-
* @property {boolean} isAuthMode - Auth Mode. config whether authentication step needed before running test cases
|
|
75
|
-
* @property {string} authFilePath - File Path where the cookies stored
|
|
76
|
-
* @property {any} browsers: List of browsers
|
|
77
|
-
* @property {string} openReportOn: default Option value (never, on-failure and always)
|
|
78
|
-
* @property {any} reportPath : directory where report is generate
|
|
79
|
-
* @property {boolean} bddMode: Feature files needs to be processed
|
|
80
|
-
* @property {number} expectTimeout: time in milliseconds which the expect condition should fail
|
|
81
|
-
* @property {number} testTimeout: time in milliseconds which the test should fail
|
|
82
|
-
* @property {Object} additionalPages: custom pages configuration
|
|
83
|
-
* @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
|
|
84
|
-
* @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
|
|
85
|
-
* @property {viewportConfig} viewport: viewport configuration for the browser. Default is { width: 1280, height: 720 }
|
|
86
|
-
* @property {string} testIdAttribute: Change the default data-testid attribute. configure what attribute to search while calling getByTestId
|
|
87
|
-
* @property {Array} editionOrder: Order in the form of larger editions in the back. Edition with the most privelages should be last
|
|
66
|
+
/**
|
|
67
|
+
* Represents the user configuration object.
|
|
68
|
+
* @typedef {Object} UserConfig
|
|
69
|
+
* @property {string} headless - Headless Browsers mode.
|
|
70
|
+
* @property {number} trace - trace for test cases.
|
|
71
|
+
* @property {boolean} video - video for test cases,
|
|
72
|
+
* @property {boolean} debug - debug mode
|
|
73
|
+
* @property {string} mode: mode in which the test cases needs to run
|
|
74
|
+
* @property {boolean} isAuthMode - Auth Mode. config whether authentication step needed before running test cases
|
|
75
|
+
* @property {string} authFilePath - File Path where the cookies stored
|
|
76
|
+
* @property {any} browsers: List of browsers
|
|
77
|
+
* @property {string} openReportOn: default Option value (never, on-failure and always)
|
|
78
|
+
* @property {any} reportPath : directory where report is generate
|
|
79
|
+
* @property {boolean} bddMode: Feature files needs to be processed
|
|
80
|
+
* @property {number} expectTimeout: time in milliseconds which the expect condition should fail
|
|
81
|
+
* @property {number} testTimeout: time in milliseconds which the test should fail
|
|
82
|
+
* @property {Object} additionalPages: custom pages configuration
|
|
83
|
+
* @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
|
|
84
|
+
* @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
|
|
85
|
+
* @property {viewportConfig} viewport: viewport configuration for the browser. Default is { width: 1280, height: 720 }
|
|
86
|
+
* @property {string} testIdAttribute: Change the default data-testid attribute. configure what attribute to search while calling getByTestId
|
|
87
|
+
* @property {Array} editionOrder: Order in the form of larger editions in the back. Edition with the most privelages should be last
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
/**
|
|
91
|
-
* Generates a configuration object from a file, if it exists.
|
|
92
|
-
*
|
|
93
|
-
* @returns {UserConfig}
|
|
90
|
+
/**
|
|
91
|
+
* Generates a configuration object from a file, if it exists.
|
|
92
|
+
*
|
|
93
|
+
* @returns {UserConfig}
|
|
94
94
|
*/
|
|
95
95
|
function generateConfigFromFile() {
|
|
96
96
|
const filePath = _path.default.resolve(process.cwd(), fileName);
|
|
@@ -9,8 +9,10 @@ var _test = require("@playwright/test");
|
|
|
9
9
|
var _path = _interopRequireDefault(require("path"));
|
|
10
10
|
var _readConfigFile = require("../readConfigFile");
|
|
11
11
|
var _configUtils = require("./config-utils");
|
|
12
|
-
var
|
|
13
|
-
|
|
12
|
+
var _intialize = require("../../../bdd-poc/core-runner/intialize");
|
|
13
|
+
// import { createTestDataMap } from '../../../bdd-poc/test/cucumber/data-driven/dataSourceMap';
|
|
14
|
+
// import { createStepsCallBack } from '../../../bdd-poc/core-runner/createCallbacksMap';
|
|
15
|
+
|
|
14
16
|
const {
|
|
15
17
|
browsers,
|
|
16
18
|
trace,
|
|
@@ -45,12 +47,17 @@ const testOptions = (0, _configUtils.getTestUseOptions)({
|
|
|
45
47
|
testIdAttribute
|
|
46
48
|
});
|
|
47
49
|
|
|
48
|
-
/**
|
|
49
|
-
* Playwright configuration object
|
|
50
|
-
*
|
|
51
|
-
* @returns {import('@playwright/test').PlaywrightTestConfig}
|
|
50
|
+
/**
|
|
51
|
+
* Playwright configuration object
|
|
52
|
+
*
|
|
53
|
+
* @returns {import('@playwright/test').PlaywrightTestConfig}
|
|
52
54
|
*/
|
|
53
55
|
async function getPlaywrightConfig() {
|
|
56
|
+
(0, _intialize.createGlobalMaps)();
|
|
57
|
+
/**
|
|
58
|
+
* createglobal Map = make it loose coupled
|
|
59
|
+
* expose from bdd parser (From module to core module)
|
|
60
|
+
*/
|
|
54
61
|
// globalThis.globalStepMap = new Map();
|
|
55
62
|
// createStepsCallBack();
|
|
56
63
|
// globalThis.globalTestDataMap = await createTestDataMap();
|
|
@@ -11,9 +11,9 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
11
11
|
var _readConfigFile = require("../readConfigFile");
|
|
12
12
|
// import { defineBddConfig } from '../../../bdd-framework';
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
** Playwright project configuration
|
|
16
|
-
* @returns {import('@playwright/test').Project}
|
|
14
|
+
/**
|
|
15
|
+
** Playwright project configuration
|
|
16
|
+
* @returns {import('@playwright/test').Project}
|
|
17
17
|
*/
|
|
18
18
|
function getBrowserConfig({
|
|
19
19
|
browserName,
|
|
@@ -87,10 +87,10 @@ function getBrowserConfig({
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* @param {*} param0
|
|
93
|
-
* @returns {import('@playwright/test').Project[]}
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param {*} param0
|
|
93
|
+
* @returns {import('@playwright/test').Project[]}
|
|
94
94
|
*/
|
|
95
95
|
function getProjects({
|
|
96
96
|
browsers,
|
|
@@ -15,7 +15,7 @@ var _readConfigFile = require("./readConfigFile");
|
|
|
15
15
|
var _rootPath = require("../../utils/rootPath");
|
|
16
16
|
var _tagProcessor = require("./tag-processor");
|
|
17
17
|
var _bddPoc = require("../../bdd-poc");
|
|
18
|
-
|
|
18
|
+
// import { createGlobalMaps } from '../../bdd-poc/core-runner/intialize';
|
|
19
19
|
// import { allowedTags } from '../../bdd-poc/test/tagsHandle';
|
|
20
20
|
|
|
21
21
|
function parseUserArgs() {
|
|
@@ -128,8 +128,8 @@ function main() {
|
|
|
128
128
|
const configPath = (0, _readConfigFile.isUserConfigFileAvailable)() ? require.resolve('./setup/config-creator.js') : require.resolve('../../../playwright.config.js');
|
|
129
129
|
let promises = [];
|
|
130
130
|
if (bddMode) {
|
|
131
|
-
promises.push((0, _bddPoc.
|
|
132
|
-
promises.push(
|
|
131
|
+
promises.push((0, _bddPoc.preProcessGherkin)());
|
|
132
|
+
// promises.push(createGlobalMaps());
|
|
133
133
|
}
|
|
134
134
|
const args = ['test', '--config', configPath].concat(playwrightArgs);
|
|
135
135
|
Promise.all(promises).then(() => runPlaywright(command, args)).catch(err => {
|
package/build/index.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { expect, test } from './core/playwright/index';
|
|
2
|
-
// import { fireEvent, render } from '@testing-library/react';
|
|
3
|
-
import {
|
|
4
|
-
PlaywrightTestArgs,
|
|
5
|
-
PlaywrightTestOptions,
|
|
6
|
-
PlaywrightWorkerArgs,
|
|
7
|
-
PlaywrightWorkerOptions,
|
|
8
|
-
TestType,
|
|
9
|
-
Page
|
|
10
|
-
} from '@playwright/test';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { Given, When, Then, Step, And, createBdd, createNativeBDD };
|
|
15
|
-
export * from '@playwright/test/types/test';
|
|
1
|
+
import { expect, test } from './core/playwright/index';
|
|
2
|
+
// import { fireEvent, render } from '@testing-library/react';
|
|
3
|
+
import {
|
|
4
|
+
PlaywrightTestArgs,
|
|
5
|
+
PlaywrightTestOptions,
|
|
6
|
+
PlaywrightWorkerArgs,
|
|
7
|
+
PlaywrightWorkerOptions,
|
|
8
|
+
TestType,
|
|
9
|
+
Page
|
|
10
|
+
} from '@playwright/test';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export * from '@playwright/test/types/test';
|
package/build/index.js
CHANGED
|
@@ -35,11 +35,13 @@ const {
|
|
|
35
35
|
Given,
|
|
36
36
|
Then,
|
|
37
37
|
When,
|
|
38
|
-
And
|
|
38
|
+
And,
|
|
39
|
+
Step,
|
|
40
|
+
But
|
|
39
41
|
} = (0, _bddPoc.createBdd)();
|
|
42
|
+
exports.But = But;
|
|
43
|
+
exports.Step = Step;
|
|
40
44
|
exports.And = And;
|
|
41
45
|
exports.When = When;
|
|
42
46
|
exports.Then = Then;
|
|
43
|
-
exports.Given = Given;
|
|
44
|
-
const Step = exports.Step = Then;
|
|
45
|
-
const But = exports.But = Then;
|
|
47
|
+
exports.Given = Given;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.sonarQubeIntegrateAnalysis = sonarQubeIntegrateAnalysis;
|
|
8
|
+
var _sonarqubeScanner = _interopRequireDefault(require("sonarqube-scanner"));
|
|
9
|
+
var _readConfigFile = require("../core/playwright/readConfigFile");
|
|
10
|
+
var _path = _interopRequireDefault(require("path"));
|
|
11
|
+
const postCallBack = () => process.exit();
|
|
12
|
+
const serverHostUrl = 'https://serverlinter-np.zohodesk.csez.zohocorpin.com';
|
|
13
|
+
const options = {
|
|
14
|
+
'sonar.projectName': 'UAT_Testing',
|
|
15
|
+
'sonar.login': "developer",
|
|
16
|
+
'sonar.password': "developer",
|
|
17
|
+
'sonar.sources': '',
|
|
18
|
+
'sonar.tests': `${_path.default.resolve(process.cwd(), 'uat', 'modules')}`,
|
|
19
|
+
'sonar.language': 'js',
|
|
20
|
+
'sonar.eslint.reportPaths': `${_path.default.resolve(process.cwd(), 'uat', 'eslint-report', 'lintReport.json')}`
|
|
21
|
+
};
|
|
22
|
+
function sonarQubeIntegrateAnalysis() {
|
|
23
|
+
(0, _sonarqubeScanner.default)({
|
|
24
|
+
serverHostUrl,
|
|
25
|
+
options
|
|
26
|
+
}, postCallBack);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// "use strict";
|
|
30
|
+
|
|
31
|
+
// Object.defineProperty(exports, "__esModule", {
|
|
32
|
+
// value: true
|
|
33
|
+
// });
|
|
34
|
+
// exports.sonarScannerAnalysis = sonarScannerAnalysis;
|
|
35
|
+
// const scanner = require('sonarqube-scanner');
|
|
36
|
+
// const {
|
|
37
|
+
// generateConfigFromFile
|
|
38
|
+
// } = require('..');
|
|
39
|
+
// const postCallBack = () => process.exit();
|
|
40
|
+
// const serverHostUrl = 'https://serverlinter-np.zohodesk.csez.zohocorpin.com';
|
|
41
|
+
// const options = {
|
|
42
|
+
// 'sonar.projectName': 'UAT_Testing',
|
|
43
|
+
// 'sonar.login': "developer",
|
|
44
|
+
// 'sonar.password': "developer",
|
|
45
|
+
// 'sonar.sources': '',
|
|
46
|
+
// 'sonar.tests': `${path.resolve(process.cwd(), 'uat', 'modules')}`,
|
|
47
|
+
// 'sonar.language': 'js',
|
|
48
|
+
// 'sonar.eslint.reportPaths': `${path.resolve(process.cwd(), 'uat', 'eslint-report', 'lintReport.json')}`
|
|
49
|
+
// };
|
|
50
|
+
// function sonarScannerAnalysis() {
|
|
51
|
+
// scanner({
|
|
52
|
+
// serverHostUrl,
|
|
53
|
+
// options
|
|
54
|
+
// }, postCallBack);
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// scanner({
|
|
58
|
+
// serverUrl:'https://serverlinter-np.zohodesk.csez.zohocorpin.com/',
|
|
59
|
+
// options: {
|
|
60
|
+
// 'sonar.projectName': 'UAT_Testing',
|
|
61
|
+
// 'sonar.login':"developer",
|
|
62
|
+
// 'sonar.password':"developer",
|
|
63
|
+
// 'sonar.sources':'',
|
|
64
|
+
// 'sonar.tests':`${path.resolve(process.cwd(),'uat','modules')}`,
|
|
65
|
+
// 'sonar.language':'js',
|
|
66
|
+
// 'sonar.eslint.reportPaths':`${path.resolve(process.cwd(),'result.json')}`
|
|
67
|
+
// }
|
|
68
|
+
// },() => process.exit())
|
package/build/lib/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ var _setupProject = _interopRequireDefault(require("../setup-folder-structure/se
|
|
|
9
9
|
var _parser = require("../parser/parser");
|
|
10
10
|
var _clearCaches = _interopRequireDefault(require("../core/playwright/clear-caches"));
|
|
11
11
|
var _helper = _interopRequireDefault(require("../setup-folder-structure/helper"));
|
|
12
|
+
var _reportConfigSonarQube = require("../integrate-dependencies/reportConfigSonarQube");
|
|
12
13
|
// import createJestRunner from '../core/jest/runner/jest-runner';
|
|
13
14
|
|
|
14
15
|
const [,, option, ...otherOptions] = process.argv;
|
|
@@ -54,6 +55,12 @@ switch (option) {
|
|
|
54
55
|
(0, _clearCaches.default)();
|
|
55
56
|
break;
|
|
56
57
|
}
|
|
58
|
+
case 'eslint':
|
|
59
|
+
{
|
|
60
|
+
_logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Eslint Report Intergrate To SonarQube ....');
|
|
61
|
+
(0, _reportConfigSonarQube.sonarQubeIntegrateAnalysis)();
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
57
64
|
case 'help':
|
|
58
65
|
default:
|
|
59
66
|
{
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
Feature: Home Page
|
|
2
|
-
|
|
3
|
-
Scenario: Home Page Default content
|
|
4
|
-
Given user is on "<App>" home page
|
|
5
|
-
Then user gets a "<App>" bootcamp section
|
|
6
|
-
And username is also displayed on right corner
|
|
7
|
-
|
|
8
|
-
Examples:
|
|
9
|
-
| App |
|
|
10
|
-
| GitHub |
|
|
11
|
-
|
|
12
|
-
Scenario: GitHub Bootcamp Section
|
|
13
|
-
Given user is on "<Site>" home page
|
|
14
|
-
When user focuses on "<Site>" Bootcamp Section
|
|
15
|
-
Then user gets an option to setup git
|
|
16
|
-
And user gets an option to create repository
|
|
17
|
-
And user gets an option to Fork Repository
|
|
18
|
-
And user gets an option to work together
|
|
19
|
-
|
|
20
|
-
Examples:
|
|
21
|
-
| Site |
|
|
22
|
-
| GitHub |
|
|
23
|
-
|
|
24
|
-
Scenario: Top Banner content
|
|
25
|
-
Given user is on "<Product>" home page
|
|
26
|
-
When user focuses on Top Banner
|
|
27
|
-
Then user gets an option of home page
|
|
28
|
-
And user gets an option to search
|
|
29
|
-
And user gets settings options
|
|
30
|
-
And user gets an option to logout
|
|
31
|
-
|
|
32
|
-
Examples:
|
|
33
|
-
| Product |
|
|
34
|
-
| GitHub |
|
|
1
|
+
Feature: Home Page
|
|
2
|
+
|
|
3
|
+
Scenario: Home Page Default content
|
|
4
|
+
Given user is on "<App>" home page
|
|
5
|
+
Then user gets a "<App>" bootcamp section
|
|
6
|
+
And username is also displayed on right corner
|
|
7
|
+
|
|
8
|
+
Examples:
|
|
9
|
+
| App |
|
|
10
|
+
| GitHub |
|
|
11
|
+
|
|
12
|
+
Scenario: GitHub Bootcamp Section
|
|
13
|
+
Given user is on "<Site>" home page
|
|
14
|
+
When user focuses on "<Site>" Bootcamp Section
|
|
15
|
+
Then user gets an option to setup git
|
|
16
|
+
And user gets an option to create repository
|
|
17
|
+
And user gets an option to Fork Repository
|
|
18
|
+
And user gets an option to work together
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
| Site |
|
|
22
|
+
| GitHub |
|
|
23
|
+
|
|
24
|
+
Scenario: Top Banner content
|
|
25
|
+
Given user is on "<Product>" home page
|
|
26
|
+
When user focuses on Top Banner
|
|
27
|
+
Then user gets an option of home page
|
|
28
|
+
And user gets an option to search
|
|
29
|
+
And user gets settings options
|
|
30
|
+
And user gets an option to logout
|
|
31
|
+
|
|
32
|
+
Examples:
|
|
33
|
+
| Product |
|
|
34
|
+
| GitHub |
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
var _testinglibrary = require("@zohodesk/testinglibrary");
|
|
4
4
|
_testinglibrary.test.describe('Home Page', () => {
|
|
5
|
-
/*
|
|
6
|
-
** Given user is on "<App>" home page
|
|
7
|
-
** Then user gets a "<App>" bootcamp section
|
|
8
|
-
** And username is also displayed on right corner
|
|
5
|
+
/*
|
|
6
|
+
** Given user is on "<App>" home page
|
|
7
|
+
** Then user gets a "<App>" bootcamp section
|
|
8
|
+
** And username is also displayed on right corner
|
|
9
9
|
*/
|
|
10
10
|
(0, _testinglibrary.test)('Home Page Default content', () => {
|
|
11
11
|
// Your implementation here
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
/*
|
|
15
|
-
** Given user is on "<Site>" home page
|
|
16
|
-
** When user focuses on "<Site>" Bootcamp Section
|
|
17
|
-
** Then user gets an option to setup git
|
|
18
|
-
** And user gets an option to create repository
|
|
19
|
-
** And user gets an option to Fork Repository
|
|
20
|
-
** And user gets an option to work together
|
|
14
|
+
/*
|
|
15
|
+
** Given user is on "<Site>" home page
|
|
16
|
+
** When user focuses on "<Site>" Bootcamp Section
|
|
17
|
+
** Then user gets an option to setup git
|
|
18
|
+
** And user gets an option to create repository
|
|
19
|
+
** And user gets an option to Fork Repository
|
|
20
|
+
** And user gets an option to work together
|
|
21
21
|
*/
|
|
22
22
|
(0, _testinglibrary.test)('GitHub Bootcamp Section', () => {
|
|
23
23
|
// Your implementation here
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
/*
|
|
27
|
-
** Given user is on "<Product>" home page
|
|
28
|
-
** When user focuses on Top Banner
|
|
29
|
-
** Then user gets an option of home page
|
|
30
|
-
** And user gets an option to search
|
|
31
|
-
** And user gets settings options
|
|
32
|
-
** And user gets an option to logout
|
|
26
|
+
/*
|
|
27
|
+
** Given user is on "<Product>" home page
|
|
28
|
+
** When user focuses on Top Banner
|
|
29
|
+
** Then user gets an option of home page
|
|
30
|
+
** And user gets an option to search
|
|
31
|
+
** And user gets settings options
|
|
32
|
+
** And user gets an option to logout
|
|
33
33
|
*/
|
|
34
34
|
(0, _testinglibrary.test)('Top Banner content', () => {
|
|
35
35
|
// Your implementation here
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
function sortEdition(event) {
|
|
3
|
-
var currentURL = window.location.href;
|
|
4
|
-
const endPointCount = window.location.href.indexOf('#');
|
|
5
|
-
if (!(endPointCount == -1)) {
|
|
6
|
-
window.history.pushState({}, '', currentURL.slice(0, endPointCount));
|
|
7
|
-
currentURL = currentURL.slice(0, endPointCount);
|
|
8
|
-
}
|
|
9
|
-
console.log(currentURL);
|
|
10
|
-
window.open(`${currentURL}#?q=@edition_${event.target.value}`, '_self');
|
|
11
|
-
}
|
|
12
|
-
</script>
|
|
13
|
-
<div class="mainContainer" style="margin-left: 20px; display: flex;">
|
|
14
|
-
<div class="selectEditionContainer" style="padding: 20px;">
|
|
15
|
-
<select class="selectEdition" style="padding: 5px; width: 100px; border-radius: 6px; border: 1px solid var(--color-border-default);" onchange="sortEdition(event)">
|
|
16
|
-
<option value="EnterPrise">EnterPrise</option>
|
|
17
|
-
<option value="Professional">Professional</option>
|
|
18
|
-
<option value="Express">Express</option>
|
|
19
|
-
<option value="Standard">Standard</option>
|
|
20
|
-
<option value="Free">Free</option>
|
|
21
|
-
</select>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
1
|
+
<script>
|
|
2
|
+
function sortEdition(event) {
|
|
3
|
+
var currentURL = window.location.href;
|
|
4
|
+
const endPointCount = window.location.href.indexOf('#');
|
|
5
|
+
if (!(endPointCount == -1)) {
|
|
6
|
+
window.history.pushState({}, '', currentURL.slice(0, endPointCount));
|
|
7
|
+
currentURL = currentURL.slice(0, endPointCount);
|
|
8
|
+
}
|
|
9
|
+
console.log(currentURL);
|
|
10
|
+
window.open(`${currentURL}#?q=@edition_${event.target.value}`, '_self');
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
<div class="mainContainer" style="margin-left: 20px; display: flex;">
|
|
14
|
+
<div class="selectEditionContainer" style="padding: 20px;">
|
|
15
|
+
<select class="selectEdition" style="padding: 5px; width: 100px; border-radius: 6px; border: 1px solid var(--color-border-default);" onchange="sortEdition(event)">
|
|
16
|
+
<option value="EnterPrise">EnterPrise</option>
|
|
17
|
+
<option value="Professional">Professional</option>
|
|
18
|
+
<option value="Express">Express</option>
|
|
19
|
+
<option value="Standard">Standard</option>
|
|
20
|
+
<option value="Free">Free</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
25
|
|