Skip to content

Commit

Permalink
chore: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Dec 17, 2024
1 parent 8353149 commit 325cbae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,28 +295,10 @@ describe('<ScreenshotAccepter/>', () => {
for (let i = 1; i <= 10; i++) {
const image = mkImageEntityFail(`state-${i}`, {parentId: result.id});
addImageToTree({tree, image});

// addImageToTree({
//
// tree,
// suiteName: 'test-1',
// browserName: 'bro-1',
// attempt: 0,
// stateName: `state-${i}`,
// expectedImgPath: `img${i}-expected.png`,
// diffImgPath: `img${i}-diff.png`,
// actualImgPath: `img${i}-actual.png`
// });
}
const store = mkRealStore({initialState: {tree, view: {expand: EXPAND_ALL}}});

const currentImageId = Object.values(tree.images.byId)[4].id;
// generateImageId({
// suiteName: 'test-1',
// browserName: 'bro-1',
// attempt: 0,
// stateName: 'state-5'
// });

component = renderWithStore(<ScreenshotAccepter image={tree.images.byId[currentImageId]}/>, store);
});
Expand Down
34 changes: 0 additions & 34 deletions test/unit/lib/static/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ export const mkResultEntity = (name: string, overrides?: Partial<ResultEntity>):
metaInfo: {},
suiteUrl: 'suite-url',
history: [],
// error?: TestError;
suitePath: [],
/** @note Browser Name/ID, e.g. `chrome-desktop` */
name: '',
// skipReason?: string;
duration: 123
} satisfies ResultEntity, overrides));

Expand Down Expand Up @@ -169,17 +166,9 @@ export const addBrowserToTree = ({tree, browser}: AddBrowserToTreeData): void =>
interface AddResultToTreeData {
tree: TreeEntity;
result: ResultEntity;
// parentId: string;
// suiteName: string;
// browserName: string;
// attempt: number;
// metaInfo: Record<string, string>;
}

export const addResultToTree = ({tree, result}: AddResultToTreeData): void => {
// const browserId = `${suiteName} ${browserName}`;
// const fullId = `${browserId} ${attempt}`;

tree.results.byId[result.id] = result;
tree.results.stateById[result.id] = {
matchedSelectedGroup: false
Expand All @@ -194,31 +183,8 @@ interface AddImageToTreeData {
}

export const addImageToTree = ({tree, image}: AddImageToTreeData): void => {
// const browserId = `${suiteName} ${browserName}`;
// const resultId = `${browserId} ${attempt}`;
// const fullId = `${resultId} ${stateName}`;

tree.images.byId[image.id] = image;

// if (expectedImgPath) {
// (tree.images.byId[fullId] as ImageEntityFail).expectedImg = {
// path: expectedImgPath,
// size: {height: 1, width: 2}
// };
// }
// if (actualImgPath) {
// (tree.images.byId[fullId] as ImageEntityFail).actualImg = {
// path: actualImgPath,
// size: {height: 1, width: 2}
// };
// }
// if (diffImgPath) {
// (tree.images.byId[fullId] as ImageEntityFail).diffImg = {
// path: diffImgPath,
// size: {height: 1, width: 2}
// };
// }

tree.results.byId[image.parentId].imageIds.push(image.id);

const result = tree.results.byId[image.parentId];
Expand Down

0 comments on commit 325cbae

Please sign in to comment.