getodk / getodk/collect

Tests for ContextMenu in FormEntryActivity

Open
#3,797 0 comments 0 reactions 0 assignees View on GitHub
testing
Dominant language
Kotlin
Stars
789
Forks
1.4k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

#### Problem description
We need tests to make sure that ContextMenu for every widget works as expected to avoid problems like:
https://github.com/getodk/collect/issues/3751
https://github.com/getodk/collect/issues/3761

as we agreed in https://github.com/getodk/collect/pull/3770#issuecomment-617105039 ideally those shouldn't be UI test.

Cases we should tests:
- removing answers if there is one answer on a screen (for every single widget)
- removing answers where there are multiple answers on a screen to cover https://github.com/getodk/collect/issues/3751
- asserting that for every widget `registerToClearAnswerOnLongPress()` is called just once to cover https://github.com/getodk/collect/issues/3761

Contributor guide

Open the contributing guide

Research direction

Start at FormEntryActivity and the ContextMenu code, then trace each widget's registerToClearAnswerOnLongPress() call. Add non-UI tests for clearing one and multiple answers across widgets and for ensuring each registration happens once. Done means the cases described in the issue are covered without relying on UI tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.