Skip to content

Commit

Permalink
Add groupping by label from input (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
epszaw authored Dec 22, 2024
1 parent ec05a0f commit 2d7d243
Show file tree
Hide file tree
Showing 16 changed files with 397 additions and 153 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn lint-staged
yarn test
15 changes: 13 additions & 2 deletions packages/cli/src/commands/awesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ type AwesomeCommandOptions = {
singleFile?: boolean;
historyPath?: string;
knownIssues?: string;
groupBy?: string;
};

export const AwesomeCommandAction = async (resultsDir: string, options: AwesomeCommandOptions) => {
const before = new Date().getTime();
const { output, reportName: name, historyPath, knownIssues: knownIssuesPath, ...rest } = options;
const { output, reportName: name, historyPath, knownIssues: knownIssuesPath, groupBy, ...rest } = options;
const config = await resolveConfig({
output,
name,
historyPath,
knownIssuesPath,
plugins: {
"@allurereport/plugin-awesome": {
options: rest,
options: {
...rest,
groupBy: groupBy?.split(","),
},
},
},
});
Expand Down Expand Up @@ -90,6 +94,13 @@ export const AwesomeCommand = createCommand({
description: "Path to the known issues file. Updates the file and quarantines failed tests when specified",
},
],
[
"--group-by, -g <string>",
{
description: "Group test results by labels. The labels should be separated by commas",
default: "parentSuite,suite,subSuite",
}
]
],
action: AwesomeCommandAction,
});
Loading

0 comments on commit 2d7d243

Please sign in to comment.