Skip to content

Commit

Permalink
Fix test result navigation arrows behaviour (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
epszaw authored Dec 22, 2024
1 parent 2d7d243 commit 3e0745c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn test
yarn lint-staged
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ export const TestResultNavigation: FunctionalComponent<TestResultNavigationProps
<IconButton
icon={LineArrowsChevronDown.id}
style={"ghost"}
isDisabled={currentIndex <= 1}
isDisabled={currentIndex === data.length}
data-testid="test-result-nav-prev"
onClick={() => navigateTo(data[currentIndex - 2])}
className={styles["test-result-nav-prev"]}
onClick={() => navigateTo(data[currentIndex])}
/>
</TooltipWrapper>
<Code
Expand All @@ -70,10 +71,9 @@ export const TestResultNavigation: FunctionalComponent<TestResultNavigationProps
<IconButton
icon={LineArrowsChevronDown.id}
style={"ghost"}
isDisabled={currentIndex === data.length}
isDisabled={currentIndex <= 1}
data-testid="test-result-nav-next"
onClick={() => navigateTo(data[currentIndex])}
className={styles["test-result-nav-next"]}
onClick={() => navigateTo(data[currentIndex - 2])}
/>
</TooltipWrapper>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e0745c

Please sign in to comment.