diff --git a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/SurveyExperimentIntegrationTest.kt b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/SurveyExperimentIntegrationTest.kt index 18fb391051..d916a034a0 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/SurveyExperimentIntegrationTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/SurveyExperimentIntegrationTest.kt @@ -4,6 +4,7 @@ package org.mozilla.fenix.experimentintegration +import android.content.pm.ActivityInfo import org.junit.After import org.junit.Before import org.junit.Rule @@ -26,6 +27,7 @@ class SurveyExperimentIntegrationTest { isJumpBackInCFREnabled = false, isPWAsPromptEnabled = false, isTCPCFREnabled = false, + isDeleteSitePermissionsEnabled = true, ) @Before @@ -69,4 +71,13 @@ class SurveyExperimentIntegrationTest { verifyExperimentExists(experimentName) } } + + @Test + fun checkSurveyLandscapeLooksCorrect() { + activityTestRule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE + browserScreen { + verifySurveyNoThanksButton() + verifySurveyButton() + } + } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/conftest.py b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/conftest.py index 27b2f2f1f3..602d802fc2 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/conftest.py +++ b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/conftest.py @@ -160,6 +160,7 @@ def fixture_setup_experiment(experiment_slug, json_data, gradlewbuild_log): def _(branch): 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" + logging.info(f"Running command {command}") try: out = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: diff --git a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/test_integration.py b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/test_integration.py index 9e88c5df69..76ff4e9925 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/test_integration.py +++ b/app/src/androidTest/java/org/mozilla/fenix/experimentintegration/test_integration.py @@ -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): setup_experiment(load_branches) 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") diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt index ebd6515623..4c0d9fb34b 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt @@ -910,7 +910,6 @@ class BrowserRobot { button.waitForExists(waitingTime) button.click() } - fun clickNoThanksSurveyButton() { val button = mDevice.findObject( UiSelector().text(