mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
Bug 1854173 - Add nimbus messaging integration test - Landscape UI (#3726)
This commit is contained in:
parent
9cac2fca23
commit
6e813a62c7
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
package org.mozilla.fenix.experimentintegration
|
package org.mozilla.fenix.experimentintegration
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
@ -26,6 +27,7 @@ class SurveyExperimentIntegrationTest {
|
|||||||
isJumpBackInCFREnabled = false,
|
isJumpBackInCFREnabled = false,
|
||||||
isPWAsPromptEnabled = false,
|
isPWAsPromptEnabled = false,
|
||||||
isTCPCFREnabled = false,
|
isTCPCFREnabled = false,
|
||||||
|
isDeleteSitePermissionsEnabled = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@ -69,4 +71,13 @@ class SurveyExperimentIntegrationTest {
|
|||||||
verifyExperimentExists(experimentName)
|
verifyExperimentExists(experimentName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun checkSurveyLandscapeLooksCorrect() {
|
||||||
|
activityTestRule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||||
|
browserScreen {
|
||||||
|
verifySurveyNoThanksButton()
|
||||||
|
verifySurveyButton()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,7 @@ def fixture_setup_experiment(experiment_slug, json_data, gradlewbuild_log):
|
|||||||
def _(branch):
|
def _(branch):
|
||||||
logging.info(f"Testing experiment {experiment_slug}, BRANCH: {branch[0]}")
|
logging.info(f"Testing experiment {experiment_slug}, BRANCH: {branch[0]}")
|
||||||
command = f"nimbus-cli --app fenix --channel developer enroll {experiment_slug} --branch {branch[0]} --file {json_data} --reset-app"
|
command = f"nimbus-cli --app fenix --channel developer enroll {experiment_slug} --branch {branch[0]} --file {json_data} --reset-app"
|
||||||
|
logging.info(f"Running command {command}")
|
||||||
try:
|
try:
|
||||||
out = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
|
out = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
@ -10,3 +10,8 @@ def test_survey_navigates_correctly(setup_experiment, gradlewbuild, load_branche
|
|||||||
def test_survey_no_thanks_navigates_correctly(setup_experiment, gradlewbuild, load_branches):
|
def test_survey_no_thanks_navigates_correctly(setup_experiment, gradlewbuild, load_branches):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyNoThanksNavigatesCorrectly")
|
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyNoThanksNavigatesCorrectly")
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
|
def test_survey_landscape_looks_correct(setup_experiment, gradlewbuild, load_branches):
|
||||||
|
setup_experiment(load_branches)
|
||||||
|
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyLandscapeLooksCorrect")
|
||||||
|
@ -910,7 +910,6 @@ class BrowserRobot {
|
|||||||
button.waitForExists(waitingTime)
|
button.waitForExists(waitingTime)
|
||||||
button.click()
|
button.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clickNoThanksSurveyButton() {
|
fun clickNoThanksSurveyButton() {
|
||||||
val button = mDevice.findObject(
|
val button = mDevice.findObject(
|
||||||
UiSelector().text(
|
UiSelector().text(
|
||||||
|
Loading…
Reference in New Issue
Block a user