mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
feat: add Search flow to Maestro
This commit is contained in:
parent
7669a85f43
commit
f1d30e59b0
3 changed files with 18 additions and 3 deletions
|
@ -26,6 +26,7 @@ import androidx.compose.runtime.remember
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.semantics.isTraversalGroup
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
@ -67,7 +68,7 @@ fun SearchList(
|
|||
triggerSearch(it)
|
||||
searchActive = true
|
||||
},
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp),
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp).testTag("search_bar"),
|
||||
)
|
||||
if (searchActive) {
|
||||
NetworkPosts(
|
||||
|
|
|
@ -10,6 +10,14 @@ appId: dev.msfjarvis.claw.android
|
|||
- takeScreenshot: "HottestPosts"
|
||||
- tapOn: "Saved"
|
||||
- takeScreenshot: "SavedPosts"
|
||||
- tapOn: "Search"
|
||||
- tapOn:
|
||||
id: "search_bar"
|
||||
- inputText: "Rust"
|
||||
- pressKey: Enter
|
||||
- hideKeyboard
|
||||
- waitForAnimationToEnd
|
||||
- takeScreenshot: "SearchPage"
|
||||
- tapOn: "Hottest"
|
||||
- tapOn: "Open comments"
|
||||
- waitForAnimationToEnd
|
||||
|
|
|
@ -11,8 +11,14 @@ SCREENSHOT_DIR="${SCRIPT_DIR}"/../screenshots
|
|||
# Run the Maestro flow to generate the screenshots
|
||||
"${SCRIPT_DIR}"/run-maestro-flows.sh feature_graphic.yml
|
||||
|
||||
# Use imagemagick to stitch the screenshots horizontally
|
||||
convert +append "${SCREENSHOT_DIR}"/HottestPosts.png "${SCREENSHOT_DIR}"/CommentsPage.png "${SCREENSHOT_DIR}"/SavedPosts.png "${SCRIPT_DIR}"/../.github/readme_feature.png
|
||||
# Use imagemagick to stitch the screenshots in a grid
|
||||
montage -tile 2x0 -geometry +0+0 \
|
||||
-border 0 -density 300 \
|
||||
"${SCREENSHOT_DIR}"/HottestPosts.png \
|
||||
"${SCREENSHOT_DIR}"/CommentsPage.png \
|
||||
"${SCREENSHOT_DIR}"/SavedPosts.png \
|
||||
"${SCREENSHOT_DIR}"/SearchPage.png \
|
||||
"${SCRIPT_DIR}"/../.github/readme_feature.png
|
||||
|
||||
# Convert the resulting PNG to WebP
|
||||
cwebp .github/readme_feature.png -o .github/readme_feature.webp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue