Skip to content
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
feat/add-confirm-swap-button-locator
Mar 5, 2025
Merged

Feat: Added locator for confirm swap button#203
Andrew718PLTS merged 1 commit intomainfrom
feat/add-confirm-swap-button-locator

Conversation

@Andrew718PLTS
Copy link
Copy Markdown
Contributor

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

  • Fixes #issue number here

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • The PR title follows the conventions
  • I have run the regression tests

Copilot AI review requested due to automatic review settings March 4, 2025 16:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mento-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 4:20pm

Copy link
Copy Markdown
Contributor

@chapati23 chapati23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the cleanup of my hardcoded text..

@Andrew718PLTS Andrew718PLTS merged commit ff6f1a1 into main Mar 5, 2025
7 checks passed
@Andrew718PLTS Andrew718PLTS deleted the feat/add-confirm-swap-button-locator branch March 5, 2025 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants