diff --git a/packages/e2e/test/allure-awesome/testResult.test.ts b/packages/e2e/test/allure-awesome/testResult.test.ts index 5243e687..eff53949 100644 --- a/packages/e2e/test/allure-awesome/testResult.test.ts +++ b/packages/e2e/test/allure-awesome/testResult.test.ts @@ -1,6 +1,5 @@ import { expect, test } from "@playwright/test"; -import { layer } from "allure-js-commons"; -import { Stage, Status } from "allure-js-commons"; +import { Stage, Status, layer } from "allure-js-commons"; import { type ReportBootstrap, boostrapReport, randomNumber } from "../utils/index.js"; let bootstrap: ReportBootstrap; @@ -82,7 +81,7 @@ test.describe("allure-awesome", () => { const randomLeaf = page.getByTestId("tree-leaf").nth(randomNumber(0, 4)); await randomLeaf.click(); - + debugger; const testTitleText = await page.getByTestId("test-result-info-title").textContent(); const navCounterText = await page.getByTestId("test-result-nav-current").textContent(); const pressPrevArrow = await page.getByTestId("test-result-nav-next").isDisabled(); diff --git a/packages/web-awesome/src/assets/scss/index.scss b/packages/web-awesome/src/assets/scss/index.scss index 4009f159..7b168611 100644 --- a/packages/web-awesome/src/assets/scss/index.scss +++ b/packages/web-awesome/src/assets/scss/index.scss @@ -1,5 +1,5 @@ @import "fonts.scss"; -@import "typography.scss"; +//@import "typography.scss"; @import "day.scss"; @import "night.scss"; @import "theme.scss"; diff --git a/packages/web-awesome/src/assets/scss/typography.scss b/packages/web-awesome/src/assets/scss/typography.scss deleted file mode 100644 index 9abfc7cf..00000000 --- a/packages/web-awesome/src/assets/scss/typography.scss +++ /dev/null @@ -1,218 +0,0 @@ -:root { - --font-family: "PTRootUIWebVF", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; - --font-family-mono: "JetBrainsMonoVF", ui-monospace, monospace; - - /* line-heights */ - --line-height-xxl: 40px; - --line-height-xl: 32px; - --line-height-l: 24px; - --line-height-m: 20px; - --line-height-s: 16px; - - /* font-sizes */ - --font-size-3xl: 36px; - --font-size-2xl: 24px; - --font-size-xl: 18px; - --font-size-l: 16px; - --font-size-m: 14px; - --font-size-m-code: 13px; - --font-size-s: 12px; - --font-size-xs: 11px; -} - -:root[data-os="mac"] { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - --font-weight-normal: 425; - --font-weight-bold: 625; - --font-weight-extra-bold: 700; -} - -/* For non macos users font weights are different and nor antialiased */ -:root:not([data-os="mac"]) { - -webkit-font-smoothing: auto; - -moz-osx-font-smoothing: auto; - - --font-weight-normal: 400; - --font-weight-bold: 600; - --font-weight-extra-bold: 700; -} - -body { - /* paragraphs-text-m */ - font-size: var(--font-size-m); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.headings-head-l) { - font-size: var(--font-size-3xl); - line-height: var(--line-height-xxl); - font-weight: var(--font-weight-extra-bold); - letter-spacing: -0.016em; // -1.6% - font-family: var(--font-family); -} - -:global(.headings-head-m) { - font-size: var(--font-size-2xl); - line-height: var(--line-height-xl); - font-weight: var(--font-weight-extra-bold); - letter-spacing: -0.016em; // -1.6% - font-family: var(--font-family); -} - -:global(.headings-head-s) { - font-size: var(--font-size-xl); - line-height: var(--line-height-l); - font-weight: var(--font-weight-extra-bold); - letter-spacing: -0.01em; // -1% - font-family: var(--font-family); -} - -:global(.paragraphs-text-l-bold) { - font-size: var(--font-size-l); - line-height: var(--line-height-l); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-text-l) { - font-size: var(--font-size-l); - line-height: var(--line-height-l); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-text-m-bold) { - font-size: var(--font-size-m); - line-height: var(--line-height-m); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-text-m) { - font-size: var(--font-size-m); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-text-s-bold) { - font-size: var(--font-size-s); - line-height: var(--line-height-m); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-text-s) { - font-size: var(--font-size-s); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.paragraphs-code-m) { - font-size: var(--font-size-m-code); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family-mono); -} - -:global(.paragraphs-code-s) { - font-size: var(--font-size-s); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family-mono); -} - -:global(.ui-text-l-ui-bold) { - font-size: var(--font-size-l); - line-height: var(--line-height-m); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-l-ui) { - font-size: var(--font-size-l); - line-height: var(--line-height-m); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-m-ui-bold) { - font-size: var(--font-size-m); - line-height: var(--line-height-s); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-m-ui) { - font-size: var(--font-size-m); - line-height: var(--line-height-s); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-s-ui-bold) { - font-size: var(--font-size-s); - line-height: var(--line-height-s); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-s-ui) { - font-size: var(--font-size-s); - line-height: var(--line-height-s); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-xs-ui-bold) { - font-size: var(--font-size-xs); - line-height: var(--line-height-s); - font-weight: var(--font-weight-bold); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-text-xs-ui) { - font-size: var(--font-size-xs); - line-height: var(--line-height-s); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family); -} - -:global(.ui-code-m-ui) { - font-size: var(--font-size-m-code); - line-height: var(--line-height-s); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family-mono); -} - -:global(.ui-code-s-ui) { - font-size: var(--font-size-s); - line-height: var(--line-height-s); - font-weight: var(--font-weight-normal); - letter-spacing: 0; - font-family: var(--font-family-mono); -} diff --git a/packages/web-awesome/src/components/BaseLayout/index.tsx b/packages/web-awesome/src/components/BaseLayout/index.tsx index 0dc9ce57..1f6d53ad 100644 --- a/packages/web-awesome/src/components/BaseLayout/index.tsx +++ b/packages/web-awesome/src/components/BaseLayout/index.tsx @@ -15,12 +15,13 @@ export type BaseLayoutProps = { export const BaseLayout = () => { const { id: testResultId } = route.value; + useEffect(() => { if (testResultId) { fetchTestResult(testResultId); fetchTestResultNav(); } - }, []); + }, [testResultId]); const content = testResultId ? ( { return ( <>
-
+
diff --git a/packages/web-components/src/assets/scss/typography.scss b/packages/web-components/src/assets/scss/typography.scss index 9abfc7cf..2b9c6295 100644 --- a/packages/web-components/src/assets/scss/typography.scss +++ b/packages/web-components/src/assets/scss/typography.scss @@ -131,7 +131,7 @@ body { :global(.paragraphs-code-s) { font-size: var(--font-size-s); - line-height: var(--line-height-m); + line-height: var(--line-height-s); font-weight: var(--font-weight-normal); letter-spacing: 0; font-family: var(--font-family-mono); diff --git a/packages/web-components/src/components/Tree/Tree.tsx b/packages/web-components/src/components/Tree/Tree.tsx index 2aa24a01..062cacb4 100644 --- a/packages/web-components/src/components/Tree/Tree.tsx +++ b/packages/web-components/src/components/Tree/Tree.tsx @@ -1,4 +1,5 @@ import type { Statistic } from "@allurereport/core-api"; +import type { Signal } from "@preact/signals"; import cx from "clsx"; import type { AllureAwesomeRecursiveTree, AllureAwesomeStatus, TreeFiltersState } from "global"; import type { FunctionComponent } from "preact"; @@ -18,8 +19,8 @@ interface TreeProps { toggleTree: (id: string) => void; navigateTo: (id: string) => void; routeId?: string; - statsStore: StoreSignalState; - treeFiltersStore: TreeFiltersState; + statsStore: Signal>; + treeFiltersStore: Signal; } export const Tree: FunctionComponent = ({ @@ -92,7 +93,7 @@ export const Tree: FunctionComponent = ({
{name && ( void; - statsStore: any; + statsStore: Signal>; treeFiltersStore: TreeFiltersState; } @@ -50,10 +52,9 @@ export const TreeHeader: FunctionComponent = ({ const treeHeaderBar = statistic ? statusesList .map((status) => ({ status, value: statistic[status] })) - .filter( - ({ status, value }) => - value !== undefined && (statusFilter === "total" || (statusFilter === status && value > 0)), - ) + .filter(({ status, value }) => { + return value !== undefined && (statusFilter === "total" || (statusFilter === status && value > 0)); + }) .map(({ status, value }) => { const className = clsx(styles["tree-header-bar-item"], styles[status]); const style = { flexGrow: value };