@zohodesk/testinglibrary 0.0.5-exp.9 → 0.0.5-n20-experimental
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 +9 -1
- package/.eslintrc.js +31 -0
- package/.gitlab-ci.yml +191 -0
- package/.prettierrc +6 -0
- package/README.md +151 -1
- package/build/common/data-generator/steps/DataGenerator.spec.js +19 -0
- package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +19 -0
- package/build/common/multi-actor/steps/multiActorHandling.spec.js +26 -0
- package/build/common/searchFake/helpers/rpcRequestHelper.js +41 -0
- package/build/common/searchFake/steps/searchFake.spec.js +26 -0
- package/build/core/dataGenerator/DataGenerator.js +108 -0
- package/build/core/dataGenerator/DataGeneratorError.js +50 -0
- package/build/core/dataGenerator/DataGeneratorHelper.js +49 -0
- package/build/core/jest/preprocessor/jsPreprocessor.js +3 -9
- package/build/core/jest/runner/jest-runner.js +1 -0
- package/build/core/jest/setup/index.js +1 -7
- package/build/core/playwright/builtInFixtures/actorContext.js +75 -0
- package/build/core/playwright/builtInFixtures/addTags.js +19 -0
- package/build/core/playwright/builtInFixtures/cacheLayer.js +13 -0
- package/build/core/playwright/builtInFixtures/context.js +32 -0
- package/build/core/playwright/builtInFixtures/executionContext.js +17 -0
- package/build/core/playwright/builtInFixtures/i18N.js +41 -0
- package/build/core/playwright/builtInFixtures/index.js +46 -0
- package/build/core/playwright/builtInFixtures/page.js +38 -0
- package/build/core/playwright/builtInFixtures/unauthenticatedPage.js +18 -0
- package/build/core/playwright/clear-caches.js +49 -0
- package/build/core/playwright/codegen.js +5 -6
- package/build/core/playwright/configuration/Configuration.js +25 -0
- package/build/core/playwright/configuration/ConfigurationHelper.js +43 -0
- package/build/core/playwright/configuration/UserArgs.js +12 -0
- package/build/core/playwright/constants/browserTypes.js +12 -0
- package/build/core/playwright/constants/fileMutexConfig.js +9 -0
- package/build/core/playwright/custom-commands.js +1 -2
- package/build/core/playwright/env-initializer.js +28 -6
- package/build/core/playwright/fixtures.js +24 -0
- package/build/core/playwright/helpers/additionalProfiles.js +25 -0
- package/build/core/playwright/helpers/auth/accountLogin.js +21 -0
- package/build/core/playwright/helpers/auth/checkAuthCookies.js +41 -0
- package/build/core/playwright/helpers/auth/getUrlOrigin.js +13 -0
- package/build/core/playwright/helpers/auth/getUsers.js +118 -0
- package/build/core/playwright/helpers/auth/index.js +76 -0
- package/build/core/playwright/helpers/auth/loginDefaultStepsHelper.js +54 -0
- package/build/core/playwright/helpers/auth/loginSteps.js +50 -0
- package/build/core/playwright/helpers/checkAuthDirectory.js +27 -0
- package/build/core/playwright/helpers/configFileNameProvider.js +31 -0
- package/build/core/playwright/helpers/customFixturesHelper.js +58 -0
- package/build/core/playwright/helpers/fileMutex.js +71 -0
- package/build/core/playwright/helpers/getUserFixtures.js +23 -0
- package/build/core/playwright/helpers/mergeObjects.js +13 -0
- package/build/core/playwright/helpers/parseUserArgs.js +10 -0
- package/build/core/playwright/index.js +10 -89
- package/build/core/playwright/readConfigFile.js +97 -14
- package/build/core/playwright/report-generator.js +9 -10
- package/build/core/playwright/runner/Runner.js +22 -0
- package/build/core/playwright/runner/RunnerHelper.js +43 -0
- package/build/core/playwright/runner/RunnerTypes.js +17 -0
- package/build/core/playwright/runner/SpawnRunner.js +113 -0
- package/build/core/playwright/setup/config-creator.js +101 -90
- package/build/core/playwright/setup/config-utils.js +188 -0
- package/build/core/playwright/setup/custom-reporter.js +136 -0
- package/build/core/playwright/setup/qc-custom-reporter.js +291 -0
- package/build/core/playwright/tagProcessor.js +69 -0
- package/build/core/playwright/test-runner.js +84 -67
- package/build/core/playwright/types.js +44 -0
- package/build/core/playwright/validateFeature.js +28 -0
- package/build/decorators.d.ts +1 -0
- package/build/decorators.js +16 -0
- package/build/index.d.ts +78 -0
- package/build/index.js +73 -5
- package/build/lib/cli.js +38 -5
- package/build/lib/post-install.js +19 -11
- package/build/lint/index.js +3 -6
- package/build/parser/parser.js +205 -0
- package/build/parser/sample.feature +34 -0
- package/build/parser/sample.spec.js +37 -0
- package/build/parser/verifier.js +130 -0
- package/build/setup-folder-structure/helper.js +37 -0
- package/build/setup-folder-structure/reportEnhancement/addonScript.html +25 -0
- package/build/setup-folder-structure/reportEnhancement/reportAlteration.js +25 -0
- package/build/setup-folder-structure/samples/accountLogin-sample.js +19 -0
- package/build/setup-folder-structure/samples/actors-index.js +2 -0
- package/build/setup-folder-structure/samples/auth-setup-sample.js +15 -0
- package/build/setup-folder-structure/samples/editions-index.js +3 -0
- package/build/setup-folder-structure/samples/free-sample.json +25 -0
- package/build/setup-folder-structure/samples/git-ignore.sample.js +37 -0
- package/build/setup-folder-structure/samples/settings.json +7 -0
- package/build/setup-folder-structure/samples/testSetup-sample.js +14 -0
- package/build/setup-folder-structure/samples/uat-config-sample.js +46 -0
- package/build/setup-folder-structure/setupProject.js +36 -18
- package/build/test/core/playwright/__tests__/tagProcessor.test.js +94 -0
- package/build/test/core/playwright/__tests__/validateFeature.test.js +69 -0
- package/build/test/core/playwright/buildInFixtures/__tests__/executionContext.test.js +27 -0
- package/build/test/core/playwright/configuration/__tests__/Configuration.test.js +53 -0
- package/build/test/core/playwright/helpers/__tests__/additionalProfiles.test.js +45 -0
- package/build/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js +34 -0
- package/build/test/core/playwright/helpers/__tests__/customFixturesHelper.test.js +51 -0
- package/build/test/core/playwright/helpers/__tests__/fileMutex.test.js +79 -0
- package/build/test/core/playwright/helpers/__tests__/getUsers_ListOfActors.test.js +80 -0
- package/build/test/core/playwright/runner/__tests__/RunnerHelper.test.js +16 -0
- package/build/test/core/playwright/runner/__tests__/SpawnRunner.test.js +27 -0
- package/build/utils/cliArgsToObject.js +9 -1
- package/build/utils/commonUtils.js +17 -0
- package/build/utils/fileUtils.js +109 -0
- package/build/utils/logger.js +7 -35
- package/build/utils/rootPath.js +16 -9
- package/build/utils/stepDefinitionsFormatter.js +11 -0
- package/changelog.md +136 -10
- package/jest.config.js +29 -11
- package/npm-shrinkwrap.json +10241 -6175
- package/package.json +40 -26
- package/playwright.config.js +5 -55
- package/test-results/.last-run.json +4 -0
- package/unit_reports/unit-report.html +277 -0
- package/build/bdd-framework/cli/commands/env.js +0 -44
- package/build/bdd-framework/cli/commands/export.js +0 -47
- package/build/bdd-framework/cli/commands/test.js +0 -60
- package/build/bdd-framework/cli/index.js +0 -11
- package/build/bdd-framework/cli/options.js +0 -21
- package/build/bdd-framework/cli/worker.js +0 -13
- package/build/bdd-framework/config/dir.js +0 -27
- package/build/bdd-framework/config/env.js +0 -49
- package/build/bdd-framework/config/index.js +0 -92
- package/build/bdd-framework/cucumber/buildStepDefinition.js +0 -45
- package/build/bdd-framework/cucumber/gherkin.d.ts +0 -45
- package/build/bdd-framework/cucumber/loadConfig.js +0 -17
- package/build/bdd-framework/cucumber/loadFeatures.js +0 -39
- package/build/bdd-framework/cucumber/loadSnippetBuilder.js +0 -20
- package/build/bdd-framework/cucumber/loadSources.js +0 -58
- package/build/bdd-framework/cucumber/loadSteps.js +0 -41
- package/build/bdd-framework/decorators.js +0 -21
- package/build/bdd-framework/gen/formatter.js +0 -92
- package/build/bdd-framework/gen/i18n.js +0 -44
- package/build/bdd-framework/gen/index.js +0 -150
- package/build/bdd-framework/gen/poms.js +0 -47
- package/build/bdd-framework/gen/testFile.js +0 -356
- package/build/bdd-framework/gen/testNode.js +0 -50
- package/build/bdd-framework/index.js +0 -33
- package/build/bdd-framework/playwright/fixtureParameterNames.js +0 -103
- package/build/bdd-framework/playwright/getLocationInFile.js +0 -50
- package/build/bdd-framework/playwright/loadConfig.js +0 -42
- package/build/bdd-framework/playwright/testTypeImpl.js +0 -47
- package/build/bdd-framework/playwright/transform.js +0 -85
- package/build/bdd-framework/playwright/utils.js +0 -24
- package/build/bdd-framework/run/bddFixtures.js +0 -109
- package/build/bdd-framework/run/bddWorld.js +0 -91
- package/build/bdd-framework/snippets/index.js +0 -132
- package/build/bdd-framework/snippets/snippetSyntax.js +0 -50
- package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +0 -32
- package/build/bdd-framework/snippets/snippetSyntaxTs.js +0 -18
- package/build/bdd-framework/stepDefinitions/createBdd.js +0 -52
- package/build/bdd-framework/stepDefinitions/createDecorators.js +0 -110
- package/build/bdd-framework/stepDefinitions/defineStep.js +0 -62
- package/build/bdd-framework/utils/index.js +0 -52
- package/build/bdd-framework/utils/jsStringWrap.js +0 -44
- package/build/bdd-framework/utils/logger.js +0 -21
- package/build/setup-folder-structure/env-config-sample.json +0 -17
- package/build/setup-folder-structure/uat-config-sample.js +0 -31
- package/build/setup-folder-structure/user-example.json +0 -3
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _path = _interopRequireDefault(require("path"));
|
|
5
|
+
var _fastGlob = _interopRequireDefault(require("fast-glob"));
|
|
6
|
+
var _parser = require("./parser");
|
|
7
|
+
var _logger = require("../utils/logger");
|
|
8
|
+
var _fileUtils = require("../utils/fileUtils");
|
|
9
|
+
var _readConfigFile = require("../core/playwright/readConfigFile");
|
|
10
|
+
var _stepDefinitionsFormatter = require("../utils/stepDefinitionsFormatter");
|
|
11
|
+
// Specify the directory where you want to search for .feature and .spec.js files
|
|
12
|
+
const directoryPath = './uat';
|
|
13
|
+
|
|
14
|
+
// Use glob to match .feature files in the directory
|
|
15
|
+
const featurePattern = _path.default.join(process.cwd(), directoryPath, '**/*.feature');
|
|
16
|
+
|
|
17
|
+
// function onSpecFileNotFound() { }
|
|
18
|
+
|
|
19
|
+
function verifyIfMultipleStepsExists(steps) {
|
|
20
|
+
let isMultipleStepsFound = false;
|
|
21
|
+
Object.keys(steps).map(step => {
|
|
22
|
+
if (steps[step].length > 1) {
|
|
23
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, `Multiple Steps Found for ${step} \n`);
|
|
24
|
+
steps[step].forEach(fileName => {
|
|
25
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, `Files: \n ${fileName} \n`);
|
|
26
|
+
});
|
|
27
|
+
// multipleSteps.push({ step: steps[step] });
|
|
28
|
+
isMultipleStepsFound = true;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return isMultipleStepsFound;
|
|
32
|
+
}
|
|
33
|
+
function extractExamplesToSeperateFile(examples, scenarioIndex, filePath, featureName) {
|
|
34
|
+
let exampleFileContent = `export const ${featureName.toUpperCase()}_SCENARIO_${scenarioIndex} = ${JSON.stringify(examples, null, 2)};\r\n`;
|
|
35
|
+
const cleanedData = exampleFileContent.replace(/\r\n/g, '\n');
|
|
36
|
+
try {
|
|
37
|
+
(0, _fileUtils.writeFileContents)(filePath, cleanedData, {
|
|
38
|
+
flag: 'a'
|
|
39
|
+
});
|
|
40
|
+
} catch (err) {
|
|
41
|
+
_logger.Logger.error(err);
|
|
42
|
+
throw new Error(`Error appending or creating the test data file: ${filePath}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function verifyFeatureFileWithSpecFile() {
|
|
46
|
+
try {
|
|
47
|
+
let errorCount = 0;
|
|
48
|
+
let allStepsFound = {};
|
|
49
|
+
let {
|
|
50
|
+
featureFilesFolder = 'feature-files',
|
|
51
|
+
stepDefinitionsFolder = 'steps'
|
|
52
|
+
} = (0, _readConfigFile.generateConfigFromFile)();
|
|
53
|
+
const featureFiles = _fastGlob.default.globSync([featurePattern], {
|
|
54
|
+
dot: true
|
|
55
|
+
});
|
|
56
|
+
featureFiles.forEach(featureFile => {
|
|
57
|
+
// Construct the corresponding .spec.js filename
|
|
58
|
+
const specFile = featureFile.replace(/\.feature$/, '.spec.js').replace(`/${featureFilesFolder}/`, `/${stepDefinitionsFolder}/`);
|
|
59
|
+
let featureFileNameExtract = featureFile.split('/').pop();
|
|
60
|
+
let featurePrefixName = featureFileNameExtract.split('.')[0];
|
|
61
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, `parsing feature file ${featureFileNameExtract}...`);
|
|
62
|
+
// Check if the .spec.js file exists
|
|
63
|
+
|
|
64
|
+
if ((0, _fileUtils.checkIfFileExists)(specFile)) {
|
|
65
|
+
let featureContents = (0, _fileUtils.readFileContents)(featureFile);
|
|
66
|
+
let specContents = (0, _fileUtils.readFileContents)(specFile);
|
|
67
|
+
//let [featureContents, specContents] = Promise.all([readFileContents(featureFile), readFileContents(specFile)]);
|
|
68
|
+
if (featureContents !== null && specContents !== null) {
|
|
69
|
+
const featureJSON = (0, _parser.parseFeature)(featureContents);
|
|
70
|
+
if (featureJSON && featureJSON.feature) {
|
|
71
|
+
let featureName = featureJSON.feature.name;
|
|
72
|
+
if (specContents.includes(featureName)) {
|
|
73
|
+
const scenarios = featureJSON.feature.scenarios;
|
|
74
|
+
const specLines = specContents.split('\n'); // Split specContents into lines
|
|
75
|
+
let testDataFilePath = featureFile.replace(`/${featureFilesFolder}/`, '/test-data/').replace(/\.feature$/, '.data.js');
|
|
76
|
+
// Examples to test data conversion. we are deleting the existing test data file and create a new file.
|
|
77
|
+
(0, _fileUtils.deleteFile)(testDataFilePath);
|
|
78
|
+
for (let i = 0; i < scenarios.length; i++) {
|
|
79
|
+
let scenario = scenarios[i];
|
|
80
|
+
const scenarioName = scenario.name;
|
|
81
|
+
const scenarioExamples = scenario.examples;
|
|
82
|
+
extractExamplesToSeperateFile(scenarioExamples, i, testDataFilePath, featurePrefixName);
|
|
83
|
+
|
|
84
|
+
// spec file check
|
|
85
|
+
if (!specLines.some(line => line.includes(scenarioName))) {
|
|
86
|
+
errorCount++;
|
|
87
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Scenario: ${scenarioName} is missing in spec file`);
|
|
88
|
+
}
|
|
89
|
+
for (const step of scenario.steps) {
|
|
90
|
+
if (!allStepsFound[step]) {
|
|
91
|
+
allStepsFound[step] = [specFile];
|
|
92
|
+
} else {
|
|
93
|
+
allStepsFound[step].push(specFile);
|
|
94
|
+
}
|
|
95
|
+
const foundDelimiter = (0, _stepDefinitionsFormatter.findDelimiterFromStep)(step);
|
|
96
|
+
if (foundDelimiter) {
|
|
97
|
+
let splitResult = step.split(foundDelimiter);
|
|
98
|
+
if (!specLines.some(line => line.includes(splitResult[1].trim().replace(/"/g, '\\"')))) {
|
|
99
|
+
errorCount++;
|
|
100
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Scenario: ${scenarioName} \n Step: ${step} is missing in the spec file ${specFile}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
errorCount++;
|
|
107
|
+
_logger.Logger.log(_logger.Logger.SUCCESS_TYPE, `Feature Name ${featureName} does not match/exist in ${specFile}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
errorCount++;
|
|
112
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Error while reading feature file ${featureFile} or spec file ${specFile}`);
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
errorCount++;
|
|
116
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `No corresponding .spec.js file found for ${featureFile}`);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
// Multiple steps found warning
|
|
120
|
+
verifyIfMultipleStepsExists(allStepsFound);
|
|
121
|
+
if (errorCount > 0) {
|
|
122
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Total Number of Errors found - ${errorCount}`);
|
|
123
|
+
throw new Error('Error while parsing feature files. Please fix the above issues before running test cases');
|
|
124
|
+
}
|
|
125
|
+
} catch (err) {
|
|
126
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, err);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
verifyFeatureFileWithSpecFile();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _commander = require("commander");
|
|
9
|
+
var _fs = require("fs");
|
|
10
|
+
var _path = _interopRequireDefault(require("path"));
|
|
11
|
+
var _logger = require("../utils/logger");
|
|
12
|
+
function helpercmd() {
|
|
13
|
+
const packageJsonPath = _path.default.resolve(process.cwd(), './package.json');
|
|
14
|
+
if ((0, _fs.existsSync)(packageJsonPath) && process.argv.includes('--version')) {
|
|
15
|
+
const {
|
|
16
|
+
dependencies
|
|
17
|
+
} = require(packageJsonPath);
|
|
18
|
+
_logger.Logger.log(_logger.Logger.SUCCESS_TYPE, `zohodesk/testinglibrary Version : ${dependencies['@zohodesk/testinglibrary']}`);
|
|
19
|
+
_commander.program.version(dependencies['@zohodesk/testinglibrary'] || '0.0.1');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
_logger.Logger.log(_logger.Logger.SUCCESS_TYPE, 'Supported Commands...');
|
|
23
|
+
_commander.program.name('npx ZDTestingFramework');
|
|
24
|
+
_commander.program.command('test').description('This command is used to execute tests');
|
|
25
|
+
_commander.program.command('init').description('This command will initialize Project');
|
|
26
|
+
_commander.program.command('report').description('This command is used to generate a report summarizing the results of executed tests.');
|
|
27
|
+
_commander.program.command('re-run-failed').description('This command will re-run the failed test cases based on test summary');
|
|
28
|
+
_commander.program.command('codegen').description('This command is used to assist developer to write test case');
|
|
29
|
+
_commander.program.option('--headed', 'Run tests with a headed browser.');
|
|
30
|
+
_commander.program.option('--debug', 'This command is used to initiate a debugging session');
|
|
31
|
+
_commander.program.option('--tags', 'Run specific test case with mentioned tags (Usage: -- --tags="@live")');
|
|
32
|
+
_commander.program.option('--workers', 'Specify number of workers to run the test case parallely (Usage: -- --workers=2)');
|
|
33
|
+
_commander.program.option('--edition', 'Specify edition to run the test cases (Usage: -- --edition="standard". This will run the test cases with either no edition mentioned or edition standard)');
|
|
34
|
+
_commander.program.option('--browsers', 'Specify the browsers on which the test case should run (Usage: -- --browsers="chrome,firefox,safari")');
|
|
35
|
+
_commander.program.parse(process.argv);
|
|
36
|
+
}
|
|
37
|
+
var _default = exports.default = helpercmd;
|
|
@@ -0,0 +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
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.preProcessReport = preProcessReport;
|
|
8
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
+
var _logger = require("./../../utils/logger");
|
|
10
|
+
var _path = _interopRequireDefault(require("path"));
|
|
11
|
+
const htmlFilePath = _path.default.resolve(process.cwd(), 'uat', 'playwright-report', 'index.html');
|
|
12
|
+
const fileHtml = _fs.default.readFileSync(htmlFilePath, 'utf-8');
|
|
13
|
+
const addOnHtml = _fs.default.readFileSync(_path.default.resolve(__filename, '../', 'addonScript.html'), 'utf-8');
|
|
14
|
+
const splitedHTML = fileHtml.split('\n');
|
|
15
|
+
const toAdd = addOnHtml.split('\n');
|
|
16
|
+
function preProcessReport() {
|
|
17
|
+
if (_fs.default.existsSync(htmlFilePath)) {
|
|
18
|
+
const modifiedContent = [...splitedHTML.slice(0, 55), ...toAdd, ...splitedHTML.slice(56)].join('').toString();
|
|
19
|
+
_fs.default.writeFileSync(htmlFilePath, modifiedContent);
|
|
20
|
+
return;
|
|
21
|
+
} else {
|
|
22
|
+
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, 'Report is not generated Properly ...');
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This is the sample file generated by testing framework. You can change as per the respective project login
|
|
2
|
+
|
|
3
|
+
const getUrlOrigin = require('../shared/url-helpers/getUrlOrigin');
|
|
4
|
+
|
|
5
|
+
async function accountLogin( { page, email, password } ) {
|
|
6
|
+
await page.locator('#login_id').fill(email);
|
|
7
|
+
await page.locator('#nextbtn').click();
|
|
8
|
+
await page.locator('#password').fill(password);
|
|
9
|
+
await page.locator('#nextbtn').click();
|
|
10
|
+
|
|
11
|
+
const domainUrlOrigin = getUrlOrigin(process.env.domain);
|
|
12
|
+
await page.waitForNavigation();
|
|
13
|
+
await Promise.race([
|
|
14
|
+
page.waitForURL(`${domainUrlOrigin}/**`),
|
|
15
|
+
page.waitForURL('**/announcement/**')
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = accountLogin;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { test as setup, expect } from '@zohodesk/testinglibrary';
|
|
3
|
+
import {
|
|
4
|
+
performLoginSteps,
|
|
5
|
+
getDefaultActor
|
|
6
|
+
} from '@zohodesk/testinglibrary/helpers';
|
|
7
|
+
|
|
8
|
+
import { loginSteps , validateLogin } from './testSetup';
|
|
9
|
+
|
|
10
|
+
const user = getDefaultActor();
|
|
11
|
+
|
|
12
|
+
setup(`${user.edition} - Authentication`, async ({ page }) => {
|
|
13
|
+
//Implement performLoginSteps here
|
|
14
|
+
await performLoginSteps({page, ...user},validateLogin ,loginSteps);
|
|
15
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"edition": "free",
|
|
5
|
+
"orgName": "orgFree",
|
|
6
|
+
"profiles": [
|
|
7
|
+
{
|
|
8
|
+
"profile": "admin",
|
|
9
|
+
"email": "admin+free@zohotest.com",
|
|
10
|
+
"password": "password@0987"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"profile": "agent",
|
|
14
|
+
"email": "agent@zohotest.com",
|
|
15
|
+
"password": "password@12345"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"profile": "lightagent",
|
|
19
|
+
"email": "lightagent@zohotest.com",
|
|
20
|
+
"password": "password@12345"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { Logger } from '../utils/logger';
|
|
4
|
+
import { generateConfigFromFile } from '../core/playwright/readConfigFile';
|
|
5
|
+
const gitIgnoreAbsolutePath = path.resolve(process.cwd(), '../', '../')
|
|
6
|
+
|
|
7
|
+
const { reportPath = path.resolve(process.cwd(), 'uat', 'playwright-reports') } = generateConfigFromFile();
|
|
8
|
+
const testResultsPath = path.resolve(process.cwd(), 'uat', 'test-results');
|
|
9
|
+
|
|
10
|
+
const testResultsRelativepath = path.relative(gitIgnoreAbsolutePath, testResultsPath)
|
|
11
|
+
const reportRelativepath = path.relative(gitIgnoreAbsolutePath, reportPath)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const absolutePathfeaturegen = path.resolve(process.cwd(), 'uat', '.features-gen');
|
|
15
|
+
const featuregenRelativePath = path.relative(gitIgnoreAbsolutePath,absolutePathfeaturegen)
|
|
16
|
+
|
|
17
|
+
const dirpathtoIgnore = `${testResultsRelativepath}\n${reportRelativepath}\n${featuregenRelativePath}`
|
|
18
|
+
|
|
19
|
+
function updateGitIgnore() {
|
|
20
|
+
if (existsSync(path.resolve(process.cwd(), '../', '../', '.gitignore'))) {
|
|
21
|
+
let gitIgnoreData = readFileSync(path.resolve(process.cwd(), '../', '../', '.gitignore'), 'utf-8', (err) => {
|
|
22
|
+
if (err) {
|
|
23
|
+
Logger.log(Logger.FAILURE_TYPE, 'cannot able to read git ignore ')
|
|
24
|
+
// process.exit()
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
if (gitIgnoreData.includes(dirpathtoIgnore)) {
|
|
28
|
+
return
|
|
29
|
+
} else {
|
|
30
|
+
writeFileSync(path.resolve(process.cwd(), '../', '../', '.gitignore', dirpathtoIgnore, null, 2))
|
|
31
|
+
}
|
|
32
|
+
} else {
|
|
33
|
+
Logger.log(Logger.INFO_TYPE, 'GitIgnore file is No Found ....')
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default updateGitIgnore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable global-require */
|
|
2
|
+
const accountLogin = require('./accountLogin');
|
|
3
|
+
|
|
4
|
+
async function verifyPageIsLoaded({page}) {
|
|
5
|
+
|
|
6
|
+
//Implement your validation logic here
|
|
7
|
+
//Refer deskclientapp testSetup.js
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
loginSteps:accountLogin,
|
|
12
|
+
validateLogin:verifyPageIsLoaded,
|
|
13
|
+
page:()=>{}
|
|
14
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const testSetup = require('../../fixtures/testSetup');
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object|null} viewportConfig
|
|
4
|
+
* @property {number} width - width of the viewport
|
|
5
|
+
* @property {number} height - height of the viewport
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Represents the user configuration object.
|
|
9
|
+
* @typedef {Object} UserConfig
|
|
10
|
+
* @property {string} headless - Headless Browsers mode.
|
|
11
|
+
* @property {number} trace - trace for test cases.
|
|
12
|
+
* @property {boolean} video - video for test cases,
|
|
13
|
+
* @property {boolean} debug - debug mode
|
|
14
|
+
* @property {string} mode: mode in which the test cases needs to run
|
|
15
|
+
* @property {boolean} isAuthMode - Auth Mode. config whether authentication step needed before running test cases
|
|
16
|
+
* @property {string} authFilePath - File Path where the cookies stored
|
|
17
|
+
* @property {any} browsers: List of browsers
|
|
18
|
+
* @property {string} openReportOn: default Option value (never, on-failure and always)
|
|
19
|
+
* @property {any} reportPath : directory where report is generate
|
|
20
|
+
* @property {boolean} bddMode: Feature files needs to be processed
|
|
21
|
+
* @property {number} expectTimeout: time in milliseconds which the expect condition should fail
|
|
22
|
+
* @property {number} testTimeout: time in milliseconds which the test should fail
|
|
23
|
+
* @property {Object} additionalPages: custom pages configuration
|
|
24
|
+
* @property {string} featureFilesFolder: folder name under which feature-files will be placed. Default is feature-files
|
|
25
|
+
* @property {string} stepDefinitionsFolder: folder name under which step implementations will be placed. Default is steps
|
|
26
|
+
* @property {viewportConfig} viewport: viewport configuration for the browser. Default is { width: 1280, height: 720 }
|
|
27
|
+
* @property {string} testIdAttribute: Change the default data-testid attribute. configure what attribute to search while calling getByTestId
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {UserConfig}
|
|
32
|
+
*/
|
|
33
|
+
module.exports = {
|
|
34
|
+
headless: false,
|
|
35
|
+
browsers: ['Chrome', 'Firefox', 'Safari', 'Edge'],
|
|
36
|
+
mode: 'dev',
|
|
37
|
+
isAuthMode: true,
|
|
38
|
+
authFilePath: 'uat/playwright/.auth/user.json',
|
|
39
|
+
trace: true,
|
|
40
|
+
video: true,
|
|
41
|
+
bddMode: true,
|
|
42
|
+
featureFilesFolder: 'feature-files',
|
|
43
|
+
stepDefinitionsFolder: 'steps',
|
|
44
|
+
viewport: { width: 1280, height: 720 },
|
|
45
|
+
testSetup
|
|
46
|
+
}
|
|
@@ -10,9 +10,10 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
10
10
|
var _logger = require("../utils/logger");
|
|
11
11
|
function getScriptsToBeAdded() {
|
|
12
12
|
return {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"uat": "ZDTestingFramework test --mode=dev --headed",
|
|
14
|
+
"uat-debug": "ZDTestingFramework test --mode=dev --debug",
|
|
15
|
+
"uat-validate": "ZDTestingFramework validate",
|
|
16
|
+
"uat-report": "ZDTestingFramework report --port=9009",
|
|
16
17
|
"codegen": "ZDTestingFramework codegen deskclientapp.localzoho.com/agent"
|
|
17
18
|
};
|
|
18
19
|
}
|
|
@@ -35,27 +36,24 @@ function updatePackageJSONScripts() {
|
|
|
35
36
|
(0, _fs.writeFileSync)(packageJsonPath, JSON.stringify(modifiedConfigJSON, null, 2));
|
|
36
37
|
} else {
|
|
37
38
|
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, 'Unable to find package json. Run init command in the root path of the project.');
|
|
38
|
-
process.exit();
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
function createFolderForUAT() {
|
|
42
42
|
const uatFolder = _path.default.resolve(process.cwd(), 'uat');
|
|
43
43
|
if ((0, _fs.existsSync)(uatFolder)) {
|
|
44
44
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Uat Folder already Exists.');
|
|
45
|
-
process.exit();
|
|
46
45
|
} else {
|
|
47
46
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Uat Folder');
|
|
48
47
|
(0, _fs.mkdirSync)(uatFolder);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
function getSetupFileAsString(fileName) {
|
|
52
|
-
return (0, _fs.readFileSync)(_path.default.resolve(__dirname, './', fileName)).toString();
|
|
51
|
+
return (0, _fs.readFileSync)(_path.default.resolve(__dirname, './samples/', fileName)).toString();
|
|
53
52
|
}
|
|
54
53
|
function createUatConfig() {
|
|
55
54
|
const uatConfigPath = _path.default.resolve(process.cwd(), 'uat.config.js');
|
|
56
55
|
if ((0, _fs.existsSync)(uatConfigPath)) {
|
|
57
56
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Uat Config already Exists.');
|
|
58
|
-
process.exit();
|
|
59
57
|
} else {
|
|
60
58
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Uat config file...');
|
|
61
59
|
(0, _fs.writeFileSync)(uatConfigPath, getSetupFileAsString('uat-config-sample.js'), null, 2);
|
|
@@ -64,17 +62,23 @@ function createUatConfig() {
|
|
|
64
62
|
function createAuthenticationFile() {
|
|
65
63
|
const isUATexist = _path.default.resolve(process.cwd(), 'uat');
|
|
66
64
|
if ((0, _fs.existsSync)(isUATexist)) {
|
|
67
|
-
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Authentication File ....');
|
|
68
65
|
try {
|
|
69
|
-
(0, _fs.
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
(0, _fs.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures'))) {
|
|
67
|
+
(0, _fs.mkdirSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures'));
|
|
68
|
+
}
|
|
69
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(process.cwd(), 'uat', 'playwright', '.auth'))) {
|
|
70
|
+
(0, _fs.mkdirSync)(_path.default.resolve(process.cwd(), 'uat', 'playwright', '.auth'), {
|
|
71
|
+
recursive: true
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'auth.setup.js'), getSetupFileAsString('auth-setup-sample.js'), null, 2);
|
|
75
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating Authentication File ....');
|
|
76
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'accountLogin.js'), getSetupFileAsString('accountLogin-sample.js'), null, 2);
|
|
77
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating login script File ....');
|
|
78
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'testSetup.js'), getSetupFileAsString('testSetup-sample.js'), null, 2);
|
|
79
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating testSetup File ....');
|
|
77
80
|
} catch (err) {
|
|
81
|
+
_logger.Logger.error(err);
|
|
78
82
|
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, 'Something went wrong ! Folder not Created. Please re-initialize npm init-uat');
|
|
79
83
|
}
|
|
80
84
|
} else {
|
|
@@ -84,8 +88,21 @@ function createAuthenticationFile() {
|
|
|
84
88
|
function createConfigJson() {
|
|
85
89
|
const uatFolder = _path.default.resolve(process.cwd(), 'uat');
|
|
86
90
|
if ((0, _fs.existsSync)(uatFolder)) {
|
|
87
|
-
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating
|
|
88
|
-
(0, _fs.
|
|
91
|
+
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Creating settings.json file inside UAT Folder');
|
|
92
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(uatFolder, 'conf', 'default'))) {
|
|
93
|
+
(0, _fs.mkdirSync)(_path.default.resolve(uatFolder, 'conf', 'default'), {
|
|
94
|
+
recursive: true
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', './settings.json'), getSetupFileAsString('settings.json'), null, 2);
|
|
98
|
+
if (!(0, _fs.existsSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions'))) {
|
|
99
|
+
(0, _fs.mkdirSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions'), {
|
|
100
|
+
recursive: true
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions', 'free.json'), getSetupFileAsString('free-sample.json'), null, 2);
|
|
104
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'editions', 'index.js'), getSetupFileAsString('editions-index.js'), null, 2);
|
|
105
|
+
(0, _fs.writeFileSync)(_path.default.resolve(uatFolder, 'conf', 'default', 'actors', 'index.js'), getSetupFileAsString('actors-index.js'), null, 2);
|
|
89
106
|
} else {
|
|
90
107
|
_logger.Logger.log(_logger.Logger.INFO_TYPE, 'Something went wrong. Please re-initialize the @zohodesk/testinglibrary');
|
|
91
108
|
}
|
|
@@ -96,6 +113,7 @@ function setupProject() {
|
|
|
96
113
|
createFolderForUAT();
|
|
97
114
|
createConfigJson();
|
|
98
115
|
createAuthenticationFile();
|
|
116
|
+
//updateGitIgnore()
|
|
99
117
|
// Create folder for playwright . Inside .auth folder needs to be created. user.json
|
|
100
118
|
// Add playwright and test-results to .gitignore
|
|
101
119
|
setTimeout(() => {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _tagProcessor = _interopRequireDefault(require("../../../../../src/core/playwright/tagProcessor"));
|
|
5
|
+
var _logger = require("../../../../utils/logger");
|
|
6
|
+
jest.mock('../../../../utils/logger');
|
|
7
|
+
describe('TagProcessor', () => {
|
|
8
|
+
const editionOrder = ['edition1', 'edition2', 'edition3', 'edition4'];
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
jest.clearAllMocks();
|
|
11
|
+
});
|
|
12
|
+
test('should return tagArgs if no edition is provided', () => {
|
|
13
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
14
|
+
const userArgs = {
|
|
15
|
+
tags: 'tag1',
|
|
16
|
+
edition: null
|
|
17
|
+
};
|
|
18
|
+
const result = tagProcessor.processTags(userArgs);
|
|
19
|
+
expect(result).toBe('tag1');
|
|
20
|
+
});
|
|
21
|
+
test('should handle a single edition with <= operator', () => {
|
|
22
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
23
|
+
const userArgs = {
|
|
24
|
+
tags: 'tag1',
|
|
25
|
+
edition: '<=edition2'
|
|
26
|
+
};
|
|
27
|
+
const result = tagProcessor.processTags(userArgs);
|
|
28
|
+
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
29
|
+
});
|
|
30
|
+
test('should handle a single edition with >= operator', () => {
|
|
31
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
32
|
+
const userArgs = {
|
|
33
|
+
tags: 'tag1',
|
|
34
|
+
edition: '>=edition2'
|
|
35
|
+
};
|
|
36
|
+
const result = tagProcessor.processTags(userArgs);
|
|
37
|
+
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
38
|
+
});
|
|
39
|
+
test('should handle a single edition with < operator', () => {
|
|
40
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
41
|
+
const userArgs = {
|
|
42
|
+
tags: 'tag1',
|
|
43
|
+
edition: '<edition3'
|
|
44
|
+
};
|
|
45
|
+
const result = tagProcessor.processTags(userArgs);
|
|
46
|
+
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
47
|
+
});
|
|
48
|
+
test('should handle a single edition with > operator', () => {
|
|
49
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
50
|
+
const userArgs = {
|
|
51
|
+
tags: 'tag1',
|
|
52
|
+
edition: '>edition1'
|
|
53
|
+
};
|
|
54
|
+
const result = tagProcessor.processTags(userArgs);
|
|
55
|
+
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
56
|
+
});
|
|
57
|
+
test('should handle a single edition with no operator', () => {
|
|
58
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
59
|
+
const userArgs = {
|
|
60
|
+
tags: 'tag1',
|
|
61
|
+
edition: 'edition2'
|
|
62
|
+
};
|
|
63
|
+
const result = tagProcessor.processTags(userArgs);
|
|
64
|
+
expect(result).toBe('tag1 and not (@edition_edition1 or @edition_edition3 or @edition_edition4)');
|
|
65
|
+
});
|
|
66
|
+
test('should log a message if edition is not found', () => {
|
|
67
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
68
|
+
const userArgs = {
|
|
69
|
+
tags: 'tag1',
|
|
70
|
+
edition: 'nonexistentEdition'
|
|
71
|
+
};
|
|
72
|
+
const result = tagProcessor.processTags(userArgs);
|
|
73
|
+
expect(result).toBe('tag1');
|
|
74
|
+
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.INFO_TYPE, expect.stringContaining('No matching editions for nonexistentEdition found.'));
|
|
75
|
+
});
|
|
76
|
+
test('should handle multiple editions', () => {
|
|
77
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
78
|
+
const userArgs = {
|
|
79
|
+
tags: 'tag1',
|
|
80
|
+
edition: 'edition1,edition3'
|
|
81
|
+
};
|
|
82
|
+
const result = tagProcessor.processTags(userArgs);
|
|
83
|
+
expect(result).toBe('tag1 and not (@edition_edition2 or @edition_edition4)');
|
|
84
|
+
});
|
|
85
|
+
test('should build tags correctly when tags are empty', () => {
|
|
86
|
+
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
87
|
+
const userArgs = {
|
|
88
|
+
tags: '',
|
|
89
|
+
edition: 'edition1'
|
|
90
|
+
};
|
|
91
|
+
const result = tagProcessor.processTags(userArgs);
|
|
92
|
+
expect(result).toBe('not (@edition_edition2 or @edition_edition3 or @edition_edition4)');
|
|
93
|
+
});
|
|
94
|
+
});
|