Skip to content

Commit

Permalink
logs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
todti committed Feb 3, 2025
1 parent b5a0b90 commit b2bc953
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/plugin-classic/src/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
type AttachmentLink,
type EnvironmentItem,
type Statistic,
type TreeData,
type TreeGroup,
type TreeLeaf,
compareBy,
Expand All @@ -15,9 +14,11 @@ import {
type ReportFiles,
type ResultFile,
createTreeByCategories,
createTreeByLabels,
filterTree,
sortTree,
transformTree,
} from "@allurereport/plugin-api";
import { createTreeByLabels, sortTree, transformTree } from "@allurereport/plugin-api";
import type {
AllureAwesomeFixtureResult,
AllureAwesomeReportOptions,
Expand Down Expand Up @@ -135,8 +136,6 @@ export const generateTestResults = async (writer: AllureAwesomeDataWriter, store
status,
flaky,
});
console.log("categories", categories);
console.log("matchCategories", matchedCategories);

convertedTr.categories = matchedCategories;
convertedTr.history = await store.historyByTrId(tr.id);
Expand Down Expand Up @@ -365,12 +364,12 @@ export const generateTreeByCategories = async (
);

// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
filterTree(tree, (leaf: TreeLeaf<AllureAwesomeTreeLeaf>) => !leaf.hidden);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
sortTree(tree, nullsLast(compareBy("start", ordinal())));
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
transformTree(tree, (leaf: TreeLeaf<AllureAwesomeTreeLeaf>, idx: number) => ({ ...leaf, groupOrder: idx + 1 }));
transformTree(tree, (leaf: TreeLeaf<AllureAwesomeTreeLeaf>, idx: number) => ({
...leaf,
groupOrder: idx + 1,
}));

await writer.writeWidget(`${treeName}.json`, tree as TreeData<AllureAwesomeTreeLeaf, AllureAwesomeTreeGroup>);
await writer.writeWidget(`${treeName}.json`, tree);
};

0 comments on commit b2bc953

Please sign in to comment.