Example #1
0
        public void VerifyResetButton()
        {
            //Arrange
            string firstEmotion = FaceOffPage.Emotion;
            string secondEmotion;

            //Act
            if (App is AndroidApp)
            {
                return;
            }

            FaceOffPage.TapTakePhoto1Button();
            FaceOffPage.TapOK();

            CameraPage.TapPhotoCaptureButton();
            CameraPage.TapUsePhotoButton();

            FaceOffPage.WaitForPhotoImage1();
            FaceOffPage.TapResetButton();

            //Assert
            secondEmotion = FaceOffPage.Emotion;
            Assert.AreNotEqual(firstEmotion, secondEmotion);
            Assert.IsFalse(FaceOffPage.IsScoreButton1Visible);
            Assert.IsFalse(FaceOffPage.IsScoreButton2Visible);
            Assert.IsFalse(FaceOffPage.IsPhotoImage1Visible);
            Assert.IsFalse(FaceOffPage.IsPhotoImage2Visible);
        }
Example #2
0
        public void VerifyResetButton()
        {
            //Arrange
            string firstEmotion = FaceOffPage.Emotion;
            string secondEmotion;

            //Act
            if (Platform == Platform.Android)
            {
                return;
            }

            FaceOffPage.TapTakePhoto1Button();
            FaceOffPage.TapOK();

            CameraPage.TapPhotoCaptureButton();
            CameraPage.TapUsePhotoButton();

            FaceOffPage.WaitForPhotoImage1();
            FaceOffPage.TapResetButton();

            //Assert
            secondEmotion = FaceOffPage.Emotion;
            Assert.AreNotEqual(firstEmotion, secondEmotion);
        }
Example #3
0
        public override void TestSetup()
        {
            base.TestSetup();

            WelcomePage.EnterPlayer1Name("First Player");
            WelcomePage.EnterPlayer2Name("Second Player");
            WelcomePage.TapStartGameButton();

            FaceOffPage.WaitForPicturePageToLoad();
        }
Example #4
0
        public void TapSubmitButton_BothPlayerNamesEntered()
        {
            //Arrange
            var player1Name = "First Player";
            var player2Name = "Second Player";

            //Act
            WelcomePage.EnterPlayer1Name(player1Name);
            WelcomePage.EnterPlayer2Name(player2Name);
            WelcomePage.TapStartGameButton();

            //Assert
            FaceOffPage.WaitForPicturePageToLoad();
        }
Example #5
0
        public void VerifyPhoto1Results()
        {
            //Arrange
            if (App is iOSApp)
            {
                App.Invoke("useDefaultImageForPhoto1:", "");
            }
            else
            {
                App.Invoke("UseDefaultImageForPhoto1");
            }

            //Act
            App.Screenshot("Test Image Loaded");
            FaceOffPage.TapScoreButton1();

            //Assert
            Assert.IsTrue(App.Query("Results").Any());
        }
Example #6
0
        public void TakePictureTwo()
        {
            //Arrange

            //Act
            FaceOffPage.TapTakePhoto2Button();
            FaceOffPage.TapOK();

            if (Platform == Platform.Android)
            {
                return;
            }

            CameraPage.TapPhotoCaptureButton();
            CameraPage.TapUsePhotoButton();

            //Assert
            Assert.IsTrue(FaceOffPage.IsScoreButton2Visible);
        }
Example #7
0
        public void TakePictureOne()
        {
            //Arrange

            //Act
            FaceOffPage.TapTakePhoto1Button();
            FaceOffPage.TapOK();

            if (App is AndroidApp)
            {
                return;
            }

            CameraPage.TapPhotoCaptureButton();
            CameraPage.TapUsePhotoButton();

            //Assert
            Assert.IsTrue(FaceOffPage.IsScoreButton1Visible);
        }
Example #8
0
        public void VerifyPhoto2Results(EmotionType emotion, double expectedScore)
        {
            //Arrange

            //Act
            FaceOffPage.SubmitImageForPhoto2(emotion);
            App.Screenshot($"Player 2 Image Submitted: {emotion.ToString()}");

            FaceOffPage.WaitForNoPhoto2ActivityIndicator();

            //Assert
            Assert.AreEqual(EmotionConstants.EmotionDictionary[emotion], FaceOffPage.Emotion);
            Assert.IsTrue(FaceOffPage.ScoreButton2Text.Contains(expectedScore.ToString()));

            //Act
            FaceOffPage.TapScoreButton2();
            FaceOffPage.WaitForResultsPopup();

            //Assert
            Assert.IsTrue(FaceOffPage.DoesResultsPopupContainExpectedResults(emotion, expectedScore));
        }