Skip to content

Commit

Permalink
Change setting via the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Oct 23, 2024
1 parent 34e4d83 commit 1a354e5
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.odk.collect.android.feature.formentry

import android.app.Activity
import android.app.Application
import android.app.Instrumentation
import android.content.Context
import android.graphics.Bitmap
Expand All @@ -14,14 +13,12 @@ import org.junit.Rule
import org.junit.Test
import org.junit.rules.RuleChain
import org.odk.collect.android.R
import org.odk.collect.android.injection.DaggerUtils
import org.odk.collect.android.preferences.GuidanceHint
import org.odk.collect.android.storage.StoragePathProvider
import org.odk.collect.android.support.pages.FormEntryPage
import org.odk.collect.android.support.pages.ProjectSettingsPage
import org.odk.collect.android.support.rules.FormEntryActivityTestRule
import org.odk.collect.android.support.rules.TestRuleChain.chain
import org.odk.collect.androidtest.RecordedIntentsRule
import org.odk.collect.settings.keys.ProjectKeys
import java.io.File
import java.io.FileOutputStream
import java.util.Random
Expand Down Expand Up @@ -253,12 +250,13 @@ class FieldListUpdateTest {
fun changeInValueUsedInGuidanceHint_ShouldChangeGuidanceHintText() {
rule.setUpProjectAndCopyForm("fieldlist-updates.xml")
.fillNewForm("fieldlist-updates.xml", "fieldlist-updates")
.apply {
DaggerUtils.getComponent(ApplicationProvider.getApplicationContext<Application>())
.settingsProvider()
.getUnprotectedSettings()
.save(ProjectKeys.KEY_GUIDANCE_HINT, GuidanceHint.YES.toString())
}
.clickOptionsIcon()
.clickGeneralSettings()
.clickFormManagement()
.openShowGuidanceForQuestions()
.clickOnString(org.odk.collect.strings.R.string.guidance_yes)
.pressBack(ProjectSettingsPage())
.pressBack(FormEntryPage("fieldlist-updates"))
.clickGoToArrow()
.clickGoUpIcon()
.clickOnGroup("Guidance hint")
Expand Down

0 comments on commit 1a354e5

Please sign in to comment.