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

[WOO POS] UI tests for Product and Cart screens #12713

Draft
wants to merge 1,024 commits into
base: issue/12689-ui-tests-exit-pos-dialog
Choose a base branch
from

Conversation

AnirudhBhat
Copy link
Contributor

Closes: #12702

Description

This PR adds UI tests for Product and Cart screens of POS.

Screenshot 2024-09-27 at 8 36 39 AM

Testing information

Ensure the CI is happy - specifically, UI test pipeline is green.

The tests that have been performed

  1. Add UI test to verify Products screen is displayed when POS mode is entered
  2. Add UI test to verify Cart item is added when product item is clicked
  3. Add UI test to verify Checkout button is not displayed when the cart list is empty
  4. Add UI test to verify different cases of Checkout button visibility
  5. Add UI test to verify cart item removal functionality
  6. Add UI test to verify clicking Checkout button transitions to Checkout screen and hides Products screen
  7. Add UI test to verify clicking Checkout button transitions to Checkout screen and displays Totals screen
  8. Add UI test to verify clicking Checkout button transitions to Checkout screen and displays "Collect Payment" button
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

wpmobilebot and others added 30 commits September 13, 2024 06:17
Previously, we were assigning the charts value to itself, and it was making the logic harder to follow.
Remove modifier param because we don't really want to allow overriding it.
…ui-issues

[Woo POS] Totals calculation app-side issue
hichamboushaba and others added 19 commits September 25, 2024 09:14
… the product is added, the same product is added to cart.
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 27, 2024

10 Errors
🚫 Please ensure the PR has the category: tracks label.
🚫 Please add tests for class ProductImagePickerViewModel (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class AbandonedCampaignReminder (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class AztecViewsHolder (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class AztecEditorState (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class ComposeWebChromeClient (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class UiState (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class OptionalVariantAttribute (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class Toast (or add unit-tests-exemption label to ignore this).
🚫 Please add tests for class RotationDirection (or add unit-tests-exemption label to ignore this).
1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
2 Messages
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 27, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit4a5573e
Direct Downloadwoocommerce-wear-prototype-build-pr12713-4a5573e.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 27, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit4a5573e
Direct Downloadwoocommerce-prototype-build-pr12713-4a5573e.apk

…een-pos

# Conflicts:
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/WooPosHomeScreen.kt
#	WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/cart/WooPosCartScreen.kt

@Composable
private fun defaultSwitchColors(): SwitchColors =
SwitchDefaults.colors(checkedThumbColor = MaterialTheme.colors.primary)

@Composable
fun BottomSheetSwitchColors(): SwitchColors =

Check warning

Code scanning / Android Lint

Incorrect naming for @Composable functions Warning

Composable functions with a return type should start with a lowercase letter
Aztec.with(viewsHolder.visualEditor, viewsHolder.sourceEditor, viewsHolder.toolbar, listener)
.setImageGetter(GlideImageLoader(localContext))
}
var sourceEditorMinHeight by rememberSaveable { mutableStateOf(0) }

Check notice

Code scanning / Android Lint

State<T> will autobox values assigned to this state. Use a specialized state type instead. Note

Prefer mutableIntStateOf instead of mutableStateOf
<string name="woopos_dialog_exit_confirmation_background_content_description">Abgedunkelter Hintergrund. Zum Schließen des Dialogs tippen.</string>
<string name="blaze_campaign_budget_weekly_spending">%1$s wöchentlich</string>
<string name="blaze_campaign_budget_duration_endless_label">Ausführen, bis ich sie beende</string>
<string name="blaze_campaign_budget_duration_endless_campaign_value">Seit dem %1$s</string>

Check warning

Code scanning / Android Lint

Spelling error Warning

"Seit dem" is a common misspelling; did you mean "Seitdem"?
<string name="blaze_campaign_budget_duration_bottom_sheet_starts">Starts</string>
<string name="blaze_campaign_budget_duration_bottom_sheet_end_date">to %1$s</string>
<string name="blaze_campaign_budget_duration_bottom_sheet_start_date">Start date</string>
<string name="blaze_campaign_budget_duration_endless_label">Run until I stop it</string>

Check warning

Code scanning / Android Lint

Unused resources Warning

The resource R.string.blaze_campaign_budget_duration_endless_label appears to be unused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.