From b67c240f27d89f9fbccac35ef94006996e3b0b52 Mon Sep 17 00:00:00 2001 From: epszaw Date: Sun, 22 Dec 2024 13:00:27 +0100 Subject: [PATCH] fix test result navigation arrows --- .husky/pre-commit | 2 +- package.json | 1 + .../app/TestResult/TestResultNavigation/index.tsx | 10 +++++----- .../app/TestResult/TestResultNavigation/styles.scss | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 53e066ff..37236231 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -yarn test +yarn lint-staged diff --git a/package.json b/package.json index c9650728..fc5c90c9 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "clean": "yarn workspaces foreach -Avvpt run clean", "eslint": "yarn workspaces foreach -Avvpt run eslint", "eslint:format": "yarn workspaces foreach -Avvpt run eslint:format", + "lint-staged": "lint-staged", "prepare": "husky", "prettier:format": "prettier --write './packages/*/{src,test,features}/**/*.{json,js,ts,tsx}' package.json ./packages/*/package.json", "test": "yarn allure run -- yarn workspaces foreach -Avvpt run test" diff --git a/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/index.tsx b/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/index.tsx index 263d7ae3..9cbcc2ca 100644 --- a/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/index.tsx +++ b/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/index.tsx @@ -54,9 +54,10 @@ export const TestResultNavigation: FunctionalComponent navigateTo(data[currentIndex - 2])} + className={styles["test-result-nav-prev"]} + onClick={() => navigateTo(data[currentIndex])} /> navigateTo(data[currentIndex])} - className={styles["test-result-nav-next"]} + onClick={() => navigateTo(data[currentIndex - 2])} /> diff --git a/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/styles.scss b/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/styles.scss index e0e93251..e712e5d6 100644 --- a/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/styles.scss +++ b/packages/web-awesome/src/components/app/TestResult/TestResultNavigation/styles.scss @@ -40,7 +40,7 @@ font-weight: 400; } -.test-result-nav-next { +.test-result-nav-prev { transform: rotate(-180deg); &:active { transform: scale(var(--allure-btn-pressed-scale)) rotate(-180deg);