This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Feat: Added locator for confirm swap button#203
Merged
Andrew718PLTS merged 1 commit intomainfrom Mar 5, 2025
Merged
Conversation
There was a problem hiding this comment.
PR Overview
This PR adds a unique locator for the Confirm Swap button and standardizes the button text by introducing a new enum value.
- Updates SwapConfirm.tsx to include a data test id on the confirm button
- Extends Button3D to accept a dataTestId prop and adjusts its HTML attribute accordingly
- Refactors SubmitButton to use the new enum value for the "preparing swap" state
Reviewed Changes
| File | Description |
|---|---|
| src/features/swap/SwapConfirm.tsx | Added a unique data test id locator for the confirm swap button |
| src/components/buttons/3DButton.tsx | Updated BaseButtonProps with dataTestId and added a new enum value |
| src/features/swap/components/SubmitButton.tsx | Changed inline text to enum-based text using Button3DText.preparingSwap |
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/components/buttons/3DButton.tsx:39
- [nitpick] Consider renaming the attribute to 'data-testid' to follow common HTML custom attribute naming conventions.
data-testId={dataTestId}
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
chapati23
approved these changes
Mar 4, 2025
Contributor
chapati23
left a comment
There was a problem hiding this comment.
lgtm, thanks for the cleanup of my hardcoded text..
nvtaveras
approved these changes
Mar 5, 2025
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After the refactor the swap button has different states with the specified text. Therefore, we can't take this button by particular text anymore, and I added a unique locator.
Other changes
Made a new enum value for a button text.
Tested
Run any swap autotest or check the locator on the Confirm Swap state for the main button.
Related issues
Checklist before requesting a review