test: add calculator widget device tests#944
Conversation
6058f50 to
4c965a8
Compare
4c965a8 to
60fe272
Compare
c167ac7 to
e8f05e7
Compare
60fe272 to
6607f90
Compare
e8f05e7 to
d4e542d
Compare
6607f90 to
566af19
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 566af193b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d4e542d to
3fa8959
Compare
566af19 to
836a65f
Compare
3fa8959 to
3c440c9
Compare
836a65f to
61cc72c
Compare
3c440c9 to
966c034
Compare
61cc72c to
2637a68
Compare
2637a68 to
b45eeb4
Compare
966c034 to
8f0dd84
Compare
b45eeb4 to
78253c8
Compare
8f0dd84 to
74056bd
Compare
78253c8 to
8f16bbc
Compare
74056bd to
3b82d78
Compare
3b82d78 to
618af1b
Compare
806a2d2 to
24d16bd
Compare
20b2b81 to
0bafb28
Compare
24d16bd to
91404e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91404e0952
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return CalculatorViewModel( | ||
| widgetsRepo = widgetsRepo, | ||
| currencyRepo = currencyRepo, | ||
| ) as T |
There was a problem hiding this comment.
Align test with current CalculatorViewModel constructor
This test creates CalculatorViewModel with both widgetsRepo and currencyRepo, but the production class in this commit only accepts widgetsRepo (see app/src/main/java/to/bitkit/ui/screens/widgets/calculator/CalculatorViewModel.kt constructor) and the test later calls members that are not on that API. In this state, Android test sources do not compile, so compileDevDebugAndroidTestKotlin/device UI lanes are blocked until the test is rebased to the actual calculator view-model interface.
Useful? React with 👍 / 👎.
91404e0 to
ac291f1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac291f1b75
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CalculatorCard( | ||
| calculatorViewModel = viewModel, | ||
| modifier = Modifier.fillMaxWidth() |
There was a problem hiding this comment.
Pass the required calculator card dependencies
On this PR's base, CalculatorCard still requires a CurrencyViewModel and showWidgetTitle in addition to the calculator view model, but this test only supplies calculatorViewModel and modifier. That makes compileDevDebugAndroidTestKotlin fail before the new DeviceUiIntegration lane can run, even after fixing the separate CalculatorViewModel constructor/API mismatch already noted in the existing review.
Useful? React with 👍 / 👎.
ac291f1 to
b8e579b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8e579bade
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| composeTestRule.onNodeWithTag(tag) | ||
| .assertIsDisplayed() | ||
| .performClick() | ||
| composeTestRule.waitUntil(timeoutMillis = TIMEOUT_MS) { | ||
| composeTestRule.onAllNodesWithTag(NUMBER_PAD_TAG).fetchSemanticsNodes().isNotEmpty() |
There was a problem hiding this comment.
Target existing semantics nodes in calculator UI test
The interaction helper assumes UI elements that do not exist in this commit: selectInput clicks CalculatorBtcInput/CalculatorFiatInput and then waits for CalculatorNumberPad, but CalculatorCard renders plain CalculatorInput fields and does not attach those test tags or a calculator number pad (checked app/src/main/java/to/bitkit/ui/screens/widgets/calculator/components/CalculatorCard.kt). In this state both new tests fail in selectInput (or later pressKeys) before validating conversion logic, so the new Device UI lane cannot provide the intended coverage.
Useful? React with 👍 / 👎.
Related: #950
Stacked on #943.
Description
DeviceIntegrationlane from test: add android test lanes #943 and adds theDeviceUiIntegrationlane for calculator device UI coverage.Preview
N/A
QA Notes
Manual Tests
N/A
Automated Checks
./gradlew compileDevDebugKotlin testDevDebugUnitTest compileDevDebugAndroidTestKotlin detekt./gradlew connectedDevDebugDeviceUiIntegrationAndroidTest -m./gradlew connectedDevDebugDeviceUiIntegrationAndroidTestran 2 tests on Pixel 10 Pro - 16.