@zohodesk/testinglibrary 0.4.54-experimental → 0.4.56-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/.gitlab-ci.yml +2 -2
- package/README.md +54 -1
- package/build/core/playwright/builtInFixtures/executionContext.js +3 -4
- package/build/core/playwright/builtInFixtures/page.js +4 -3
- package/build/core/playwright/clear-caches.js +7 -0
- package/build/core/playwright/fixtures.js +24 -0
- package/build/core/playwright/helpers/configFileNameProvider.js +1 -1
- package/build/core/playwright/index.js +10 -23
- package/build/core/playwright/runner/SpawnRunner.js +2 -2
- package/build/core/playwright/setup/config-creator.js +15 -8
- package/build/core/playwright/setup/config-utils.js +8 -25
- package/build/core/playwright/tagProcessor.js +5 -7
- package/build/core/playwright/test-runner.js +2 -2
- package/build/decorators.d.ts +1 -1
- package/build/decorators.js +1 -1
- package/build/index.js +6 -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 +10 -68
- 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/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 +3 -1
- package/build/setup-folder-structure/setupProject.js +22 -5
- package/build/test/core/playwright/__tests__/tagProcessor.test.js +18 -19
- package/build/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js +1 -1
- package/npm-shrinkwrap.json +7301 -2286
- package/package.json +10 -9
- package/playwright.config.js +0 -48
- package/build/bdd-framework/cli/commands/env.js +0 -42
- package/build/bdd-framework/cli/commands/export.js +0 -62
- package/build/bdd-framework/cli/commands/test.js +0 -64
- package/build/bdd-framework/cli/index.js +0 -11
- package/build/bdd-framework/cli/options.js +0 -19
- package/build/bdd-framework/cli/worker.js +0 -13
- package/build/bdd-framework/config/configDir.js +0 -35
- package/build/bdd-framework/config/enrichReporterData.js +0 -23
- package/build/bdd-framework/config/env.js +0 -50
- package/build/bdd-framework/config/index.js +0 -94
- package/build/bdd-framework/config/lang.js +0 -14
- package/build/bdd-framework/cucumber/buildStepDefinition.js +0 -43
- package/build/bdd-framework/cucumber/createTestStep.js +0 -43
- package/build/bdd-framework/cucumber/formatter/EventDataCollector.js +0 -126
- package/build/bdd-framework/cucumber/formatter/GherkinDocumentParser.js +0 -72
- package/build/bdd-framework/cucumber/formatter/PickleParser.js +0 -25
- package/build/bdd-framework/cucumber/formatter/durationHelpers.js +0 -13
- package/build/bdd-framework/cucumber/formatter/getColorFns.js +0 -57
- package/build/bdd-framework/cucumber/formatter/index.js +0 -16
- package/build/bdd-framework/cucumber/formatter/locationHelpers.js +0 -16
- package/build/bdd-framework/cucumber/loadConfig.js +0 -17
- package/build/bdd-framework/cucumber/loadFeatures.js +0 -70
- package/build/bdd-framework/cucumber/loadSnippetBuilder.js +0 -20
- package/build/bdd-framework/cucumber/loadSteps.js +0 -47
- package/build/bdd-framework/cucumber/resolveFeaturePaths.js +0 -62
- package/build/bdd-framework/cucumber/stepArguments.js +0 -21
- package/build/bdd-framework/cucumber/types.js +0 -5
- package/build/bdd-framework/cucumber/valueChecker.js +0 -23
- package/build/bdd-framework/decorators.js +0 -18
- package/build/bdd-framework/gen/fixtures.js +0 -48
- package/build/bdd-framework/gen/formatter.js +0 -167
- package/build/bdd-framework/gen/i18n.js +0 -39
- package/build/bdd-framework/gen/index.js +0 -197
- package/build/bdd-framework/gen/specialTags.js +0 -70
- package/build/bdd-framework/gen/testFile.js +0 -470
- package/build/bdd-framework/gen/testMeta.js +0 -60
- package/build/bdd-framework/gen/testNode.js +0 -35
- package/build/bdd-framework/gen/testPoms.js +0 -133
- package/build/bdd-framework/hooks/scenario.js +0 -130
- package/build/bdd-framework/hooks/worker.js +0 -89
- package/build/bdd-framework/index.js +0 -52
- package/build/bdd-framework/playwright/fixtureParameterNames.js +0 -93
- package/build/bdd-framework/playwright/getLocationInFile.js +0 -79
- package/build/bdd-framework/playwright/loadConfig.js +0 -42
- package/build/bdd-framework/playwright/loadUtils.js +0 -33
- package/build/bdd-framework/playwright/testTypeImpl.js +0 -79
- package/build/bdd-framework/playwright/transform.js +0 -88
- package/build/bdd-framework/playwright/types.js +0 -12
- package/build/bdd-framework/playwright/utils.js +0 -56
- package/build/bdd-framework/reporter/cucumber/base.js +0 -52
- package/build/bdd-framework/reporter/cucumber/custom.js +0 -73
- package/build/bdd-framework/reporter/cucumber/helper.js +0 -12
- package/build/bdd-framework/reporter/cucumber/html.js +0 -40
- package/build/bdd-framework/reporter/cucumber/index.js +0 -74
- package/build/bdd-framework/reporter/cucumber/json.js +0 -312
- package/build/bdd-framework/reporter/cucumber/junit.js +0 -205
- package/build/bdd-framework/reporter/cucumber/message.js +0 -20
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/AttachmentMapper.js +0 -82
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Builder.js +0 -197
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocument.js +0 -43
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocumentClone.js +0 -52
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocuments.js +0 -105
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Hook.js +0 -70
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Meta.js +0 -45
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Pickles.js +0 -27
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Projects.js +0 -38
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCase.js +0 -128
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRun.js +0 -154
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRunHooks.js +0 -123
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepAttachments.js +0 -67
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepRun.js +0 -114
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/index.js +0 -30
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/pwStepUtils.js +0 -70
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/timing.js +0 -35
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/types.js +0 -5
- package/build/bdd-framework/run/StepInvoker.js +0 -69
- package/build/bdd-framework/run/bddData/index.js +0 -59
- package/build/bdd-framework/run/bddData/types.js +0 -5
- package/build/bdd-framework/run/bddFixtures.js +0 -192
- package/build/bdd-framework/run/bddWorld.js +0 -79
- package/build/bdd-framework/run/bddWorldInternal.js +0 -11
- package/build/bdd-framework/snippets/index.js +0 -132
- package/build/bdd-framework/snippets/snippetSyntax.js +0 -43
- package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +0 -26
- package/build/bdd-framework/snippets/snippetSyntaxTs.js +0 -18
- package/build/bdd-framework/stepDefinitions/createBdd.js +0 -66
- package/build/bdd-framework/stepDefinitions/decorators/class.js +0 -68
- package/build/bdd-framework/stepDefinitions/decorators/steps.js +0 -99
- package/build/bdd-framework/stepDefinitions/defineStep.js +0 -62
- package/build/bdd-framework/stepDefinitions/stepConfig.js +0 -24
- package/build/bdd-framework/steps/createBdd.js +0 -78
- package/build/bdd-framework/steps/decorators/class.js +0 -68
- package/build/bdd-framework/steps/decorators/steps.js +0 -98
- package/build/bdd-framework/steps/defineStep.js +0 -62
- package/build/bdd-framework/steps/stepConfig.js +0 -24
- package/build/bdd-framework/utils/AutofillMap.js +0 -20
- package/build/bdd-framework/utils/exit.js +0 -62
- package/build/bdd-framework/utils/index.js +0 -93
- package/build/bdd-framework/utils/jsStringWrap.js +0 -44
- package/build/bdd-framework/utils/logger.js +0 -30
- package/build/bdd-framework/utils/stripAnsiEscapes.js +0 -20
- package/build/setup-folder-structure/samples/authUsers-sample.json +0 -9
- package/build/setup-folder-structure/samples/env-config-sample.json +0 -21
- package/unit_reports/unit-report.html +0 -260
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
var _tagProcessor = _interopRequireDefault(require("../../../../../src/core/playwright/tagProcessor"));
|
|
5
|
-
var _Configuration = _interopRequireDefault(require("../../../../../src/core/playwright/configuration/Configuration.js"));
|
|
6
5
|
var _logger = require("../../../../utils/logger");
|
|
7
6
|
jest.mock('../../../../utils/logger');
|
|
8
7
|
describe('TagProcessor', () => {
|
|
@@ -12,83 +11,83 @@ describe('TagProcessor', () => {
|
|
|
12
11
|
});
|
|
13
12
|
test('should return tagArgs if no edition is provided', () => {
|
|
14
13
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
15
|
-
const userArgs =
|
|
14
|
+
const userArgs = {
|
|
16
15
|
tags: 'tag1',
|
|
17
16
|
edition: null
|
|
18
|
-
}
|
|
17
|
+
};
|
|
19
18
|
const result = tagProcessor.processTags(userArgs);
|
|
20
19
|
expect(result).toBe('tag1');
|
|
21
20
|
});
|
|
22
21
|
test('should handle a single edition with <= operator', () => {
|
|
23
22
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
24
|
-
const userArgs =
|
|
23
|
+
const userArgs = {
|
|
25
24
|
tags: 'tag1',
|
|
26
25
|
edition: '<=edition2'
|
|
27
|
-
}
|
|
26
|
+
};
|
|
28
27
|
const result = tagProcessor.processTags(userArgs);
|
|
29
28
|
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
30
29
|
});
|
|
31
30
|
test('should handle a single edition with >= operator', () => {
|
|
32
31
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
33
|
-
const userArgs =
|
|
32
|
+
const userArgs = {
|
|
34
33
|
tags: 'tag1',
|
|
35
34
|
edition: '>=edition2'
|
|
36
|
-
}
|
|
35
|
+
};
|
|
37
36
|
const result = tagProcessor.processTags(userArgs);
|
|
38
37
|
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
39
38
|
});
|
|
40
39
|
test('should handle a single edition with < operator', () => {
|
|
41
40
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
42
|
-
const userArgs =
|
|
41
|
+
const userArgs = {
|
|
43
42
|
tags: 'tag1',
|
|
44
43
|
edition: '<edition3'
|
|
45
|
-
}
|
|
44
|
+
};
|
|
46
45
|
const result = tagProcessor.processTags(userArgs);
|
|
47
46
|
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
48
47
|
});
|
|
49
48
|
test('should handle a single edition with > operator', () => {
|
|
50
49
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
51
|
-
const userArgs =
|
|
50
|
+
const userArgs = {
|
|
52
51
|
tags: 'tag1',
|
|
53
52
|
edition: '>edition1'
|
|
54
|
-
}
|
|
53
|
+
};
|
|
55
54
|
const result = tagProcessor.processTags(userArgs);
|
|
56
55
|
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
57
56
|
});
|
|
58
57
|
test('should handle a single edition with no operator', () => {
|
|
59
58
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
60
|
-
const userArgs =
|
|
59
|
+
const userArgs = {
|
|
61
60
|
tags: 'tag1',
|
|
62
61
|
edition: 'edition2'
|
|
63
|
-
}
|
|
62
|
+
};
|
|
64
63
|
const result = tagProcessor.processTags(userArgs);
|
|
65
64
|
expect(result).toBe('tag1 and not (@edition_edition1 or @edition_edition3 or @edition_edition4)');
|
|
66
65
|
});
|
|
67
66
|
test('should log a message if edition is not found', () => {
|
|
68
67
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
69
|
-
const userArgs =
|
|
68
|
+
const userArgs = {
|
|
70
69
|
tags: 'tag1',
|
|
71
70
|
edition: 'nonexistentEdition'
|
|
72
|
-
}
|
|
71
|
+
};
|
|
73
72
|
const result = tagProcessor.processTags(userArgs);
|
|
74
73
|
expect(result).toBe('tag1');
|
|
75
74
|
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.INFO_TYPE, expect.stringContaining('No matching editions for nonexistentEdition found.'));
|
|
76
75
|
});
|
|
77
76
|
test('should handle multiple editions', () => {
|
|
78
77
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
79
|
-
const userArgs =
|
|
78
|
+
const userArgs = {
|
|
80
79
|
tags: 'tag1',
|
|
81
80
|
edition: 'edition1,edition3'
|
|
82
|
-
}
|
|
81
|
+
};
|
|
83
82
|
const result = tagProcessor.processTags(userArgs);
|
|
84
83
|
expect(result).toBe('tag1 and not (@edition_edition2 or @edition_edition4)');
|
|
85
84
|
});
|
|
86
85
|
test('should build tags correctly when tags are empty', () => {
|
|
87
86
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
88
|
-
const userArgs =
|
|
87
|
+
const userArgs = {
|
|
89
88
|
tags: '',
|
|
90
89
|
edition: 'edition1'
|
|
91
|
-
}
|
|
90
|
+
};
|
|
92
91
|
const result = tagProcessor.processTags(userArgs);
|
|
93
92
|
expect(result).toBe('not (@edition_edition2 or @edition_edition3 or @edition_edition4)');
|
|
94
93
|
});
|
|
@@ -24,7 +24,7 @@ describe('getUATFileName', () => {
|
|
|
24
24
|
});
|
|
25
25
|
test('return the default config files for pipeline matched files not exists', () => {
|
|
26
26
|
const mode = 'ci';
|
|
27
|
-
const defaultPath = `${mockCwd}/uat.config.js`;
|
|
27
|
+
const defaultPath = `${mockCwd}/uat/conf/default/uat.config.js`;
|
|
28
28
|
_fs.existsSync.mockReturnValue(false);
|
|
29
29
|
_path.default.resolve.mockImplementation((...args) => args.join('/'));
|
|
30
30
|
const result = (0, _configFileNameProvider.getUATFileName)(mode);
|