Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test result navigation arrows behaviour #44

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading