-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
456 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
3 changes: 1 addition & 2 deletions
3
...ges/web-awesome/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx
This file contains 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
3 changes: 1 addition & 2 deletions
3
packages/web-awesome/src/components/TestResult/TestResultStatus/index.tsx
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,97 @@ | ||
// import "@testing-library/jest-dom"; | ||
import type { | ||
AttachmentTestStepResult, | ||
DefaultTreeGroup, | ||
HistoryTestResult, | ||
TestFixtureResult, | ||
TestResult, | ||
TestStatus, | ||
TestStepResult, | ||
TreeData, | ||
WithChildren, | ||
} from "@allurereport/core-api"; | ||
|
||
export type Allure2ReportOptions = { | ||
reportName?: string; | ||
reportLanguage?: string; | ||
createdAt: number; | ||
}; | ||
|
||
export type AllureAwesomeReportOptions = { | ||
reportName?: string; | ||
logo?: string; | ||
theme?: "light" | "dark"; | ||
groupBy?: string[]; | ||
reportLanguage?: "en" | "ru"; | ||
createdAt: number; | ||
reportUuid: string; | ||
}; | ||
|
||
export type AllureAwesomeFixtureResult = Omit< | ||
TestFixtureResult, | ||
"testResultIds" | "start" | "stop" | "sourceMetadata" | "steps" | ||
> & { | ||
steps: AllureAwesomeTestStepResult[]; | ||
}; | ||
|
||
export type AllureAwesomeStatus = TestStatus | "total"; | ||
|
||
export type AllureAwesomeTestStepResult = TestStepResult; | ||
|
||
type AllureAwesomeBreadcrumbItem = string[] | string[][]; | ||
|
||
export type AllureAwesomeTestResult = Omit< | ||
TestResult, | ||
| "runSelector" | ||
| "sourceMetadata" | ||
| "expectedResult" | ||
| "expectedResultHtml" | ||
| "precondition" | ||
| "preconditionHtml" | ||
| "steps" | ||
> & { | ||
setup: AllureAwesomeFixtureResult[]; | ||
teardown: AllureAwesomeFixtureResult[]; | ||
steps: AllureAwesomeTestStepResult[]; | ||
history: HistoryTestResult[]; | ||
retries?: TestResult[]; | ||
groupedLabels: Record<string, string[]>; | ||
attachments?: AttachmentTestStepResult[]; | ||
breadcrumbs: AllureAwesomeBreadcrumbItem[]; | ||
order?: number; | ||
groupOrder?: number; | ||
retry: boolean; | ||
time?: Record<string, string[]>; | ||
extra?: { severity: string }; | ||
}; | ||
|
||
export type AllureAwesomeTreeLeaf = Pick< | ||
AllureAwesomeTestResult, | ||
"duration" | "name" | "start" | "status" | "groupOrder" | "flaky" | "retry" | ||
> & { | ||
nodeId: string; | ||
}; | ||
|
||
export type AllureAwesomeTreeGroup = WithChildren & DefaultTreeGroup & { nodeId: string }; | ||
|
||
export type AllureAwesomeTree = TreeData<AllureAwesomeTreeLeaf, AllureAwesomeTreeGroup>; | ||
|
||
/** | ||
* Tree which contains tree leaves instead of their IDs and recursive trees structure instead of groups | ||
*/ | ||
export type AllureAwesomeRecursiveTree = DefaultTreeGroup & { | ||
nodeId: string; | ||
leaves: AllureAwesomeTreeLeaf[]; | ||
trees: AllureAwesomeRecursiveTree[]; | ||
}; | ||
|
||
export type TreeSortBy = "order" | "duration" | "status" | "alphabet"; | ||
export type TreeDirection = "asc" | "desc"; | ||
export type TreeFilters = "flaky" | "retry" | "new"; | ||
export type TreeFiltersState = { | ||
query: string; | ||
status: AllureAwesomeStatus; | ||
filter: Record<TreeFilters, boolean>; | ||
sortBy: TreeSortBy; | ||
direction: TreeDirection; | ||
}; |
36 changes: 36 additions & 0 deletions
36
packages/web-components/src/components/ArrowButton/index.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { clsx } from "clsx"; | ||
import type { FunctionalComponent } from "preact"; | ||
import { SvgIcon, allureIcons } from "@/components/SvgIcon"; | ||
import styles from "./styles.scss"; | ||
|
||
export interface ArrowButtonProps { | ||
isOpened?: boolean; | ||
iconSize?: "m" | "xs" | "s"; | ||
buttonSize?: "m" | "xs" | "s"; | ||
className?: string; | ||
icon?: string; | ||
} | ||
|
||
export const ArrowButton: FunctionalComponent<ArrowButtonProps> = ({ | ||
isOpened, | ||
buttonSize = "m", | ||
iconSize = "xs", | ||
className, | ||
icon = allureIcons.lineArrowsChevronDown, | ||
...rest | ||
}) => { | ||
return ( | ||
<button className={clsx(styles["arrow-button"], styles[`arrow-button-${buttonSize}`])} {...rest}> | ||
<SvgIcon | ||
id={icon} | ||
size={iconSize} | ||
className={clsx( | ||
styles["arrow-button-icon"], | ||
isOpened && styles["arrow-button-icon--opened"], | ||
styles[`icon-size-${iconSize}`], | ||
className, | ||
)} | ||
/> | ||
</button> | ||
); | ||
}; |
35 changes: 35 additions & 0 deletions
35
packages/web-components/src/components/ArrowButton/styles.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.arrow-button { | ||
background: transparent; | ||
border: none; | ||
padding: 8px 4px; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
color: var(--on-icon-secondary); | ||
|
||
&:hover { | ||
background: var(--bg-control-flat-medium); | ||
color: var(--on-icon-primary); | ||
} | ||
} | ||
|
||
.arrow-button-s { | ||
padding: 0 4px; | ||
} | ||
|
||
.arrow-button-m { | ||
padding: 6px 6px; | ||
} | ||
|
||
.icon-size-m { | ||
width: 15px; | ||
height: 15px; | ||
} | ||
|
||
.arrow-button-icon { | ||
transform: rotate(-90deg); | ||
transition: transform 200ms; | ||
} | ||
|
||
.arrow-button-icon--opened { | ||
transform: rotate(0); | ||
} |
This file contains 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
Oops, something went wrong.