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

MLB -1798: Added plot selected badge to PledgeItemizedDetails #2166

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jlplks
Copy link
Contributor

@jlplks jlplks commented Nov 13, 2024

📲 What

Created PLOT badge on PledgeItemizedDetails

🤔 Why

To indicates when PLOT is selected.

🛠 How

added plotSelected prop, created component, added tests and added previews

👀 See

Screenshot 2024-11-12 at 4 40 20 p m

- added plotSelected prop, created component, added tests and added previews
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 54.54545% with 25 lines in your changes missing coverage. Please review.

Project coverage is 68.86%. Comparing base (81c088c) to head (8407f71).

Files with missing lines Patch % Lines
...ui/views/compose/checkout/PledgeItemizedDetails.kt 58.82% 19 Missing and 2 partials ⚠️
...i/activities/compose/projectpage/CheckoutScreen.kt 0.00% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2166      +/-   ##
============================================
- Coverage     68.89%   68.86%   -0.03%     
+ Complexity     2225     2224       -1     
============================================
  Files           366      366              
  Lines         23100    23152      +52     
  Branches       3349     3356       +7     
============================================
+ Hits          15915    15944      +29     
- Misses         5375     5396      +21     
- Partials       1810     1812       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -101,7 +128,8 @@ fun ItemizedRewardListContainer(
totalBonusSupport: String,
deliveryDateString: String = "",
rewardsHaveShippables: Boolean = false,
disclaimerText: String = ""
disclaimerText: String = "",
plotSelected: Boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

We can pass in a default value of false here for plotSelected, and then it will only show when we pass in a true value. that way we aren't required to pass in a value for this field everywhere we call this function unless it's PLOT related

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change added 😄

)
}
}
deliveryDate.assertIsDisplayed()
deliveryDate.assertTextEquals("April 10")
}

@Test
fun `test plot selected, when plot selected should show plot selected badge`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

😃

leighdouglas
leighdouglas previously approved these changes Nov 13, 2024
Copy link
Contributor

@leighdouglas leighdouglas left a comment

Choose a reason for hiding this comment

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

LGTM! Left a small optional comment that might clean things up a little bit, but otherwise this looks great!

Copy link
Contributor

@leighdouglas leighdouglas left a comment

Choose a reason for hiding this comment

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

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants