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

added test for Mobile Pins #2593

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

added test for Mobile Pins #2593

wants to merge 3 commits into from

Conversation

kbo001
Copy link
Contributor

@kbo001 kbo001 commented Sep 29, 2022

Summary

Added MobilePinTests.kt and 2 corresponding .ccz files that cover testcases in the Mobile Pins tab of the Mobile Test Plan:
https://docs.google.com/spreadsheets/d/1X9YAf_g1Cq9vZZdCkcBLnRSFrhZuk_vEyCSM3sD5QvM/edit#gid=1556040007

Feature Flag

Product Description

Safety Assurance

  • If the PR is high risk, "High Risk" label is set
  • I have confidence that this PR will not introduce a regression for the reasons below
  • Do we need to enhance manual QA test coverage ? If yes, "QA Note" label is set correctly

Automated test coverage

MobilePinTests.kt covers tests for:

  • set up Pin for Single App: It includes setting a pin, changing the pin, resetting the pin.
  • set up Pin for Multiple App: one app is taken as the one in the previous test and then install another app and setup a pin. Then uninstall the other app and check if login using pin is working correctly.

Safety story

Executed in local AVD as well as physical device, ran successfully.

@shubham1g5
Copy link
Contributor

@damagatchi retest this please

@shubham1g5
Copy link
Contributor

@kbo001 Looks like this test is failing currently on BS

@BrowserstackTests
class MobilePinTests : BaseTest() {
companion object {
const val CCZ_NAME_1 = "basic_tests_latest.ccz"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we name these varialbles for what they are like BASIC_TESTS_CCZ_NAME , BASIC_TESTS_APP_NAME and so on..


@Before
fun setup() {
if (CommCareApplication.instance().currentApp == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use installApp directly like other instrumentation tests ?

onView(withText("Developer Options"))
.perform(click())
InstrumentationUtility.openOptionsMenu()
onView(withText("Mobile Privileges"))
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is not actually going to grant any priviliges, would not steps below fail to enable pin option ?

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

Successfully merging this pull request may close these issues.

None yet

2 participants