fix: transform root suite to non-root when non-root id matches root id#644
Draft
KuznetsovRoman wants to merge
8000
2 commits intomasterfrom
Draft
fix: transform root suite to non-root when non-root id matches root id#644KuznetsovRoman wants to merge 2 commits intomasterfrom
KuznetsovRoman wants to merge 2 commits intomasterfrom
Conversation
KuznetsovRoman
commented
Mar 27, 2025
| id: 's1 s2', | ||
| name: 's1 s2', | ||
| parentId: null, | ||
| root: true, |
| id: 's1 s2', | ||
| name: 's2', | ||
| parentId: 's1', | ||
| root: false, |
Member
Author
There was a problem hiding this comment.
Now its non-root suite with "s1" being parent suite
sipayRT
reviewed
Mar 31, 2025
lib/tests-tree-builder/base.ts
Outdated
| const suite: TreeSuite = {id, parentId, name, suitePath, root: isRoot}; | ||
|
|
||
| this._addSuite(suite); | ||
| } else if (!isRoot && suites.byId[id].root) { |
Member
There was a problem hiding this comment.
what about case
describe("Some", function() {
describe("Nesting suite", function() {
it("it");
});
});
describe("Some", function() {
describe("Nesting", function() {
it("suite it");
});
});
Member
Author
There was a problem hiding this comment.
[13:27:36 +0300] Error: Tests with the same title 'Some Nesting suite it' in file 'testplane-tests/example.testplane.ts' can't be used
at /testing-project/node_modules/testplane/src/test-reader/test-parser.ts:191:23
Member
Author
There was a problem hiding this comment.
Changed condition to "if current suite has more items in suitePath"
f60659c to
0d71e21
Compare
0d71e21 to
306578b
Compare
DudaGod
approved these changes
Apr 14, 2025
| const suite: TreeSuite = {id, parentId, name, suitePath, root: isRoot}; | ||
|
|
||
| this._addSuite(suite); | ||
| } else if (suitePath.length > suites.byId[id].suitePath.length) { |
Member
There was a problem hiding this comment.
Maybe we can do it in function with a name that explains what's going on in it?
Member
Author
There was a problem hiding this comment.
A comment would be more clear
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example: https://nda.ya.ru/t/JsP7_JVY7D85nm
Status: issues with parent and child nodes. WIP