public void ChangePlayer_ShouldChangeAiToSecondPlayer()
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .ClickPlayerSwitcher();
            Assert.IsTrue(ticTacToePage.IsTwoPlayersModeOn());
        }
        public void AudioSwitcher_ShouldTurnOffAudio()
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .ClickAudioSwitcher();
            Assert.IsFalse(ticTacToePage.IsAudioOn());
        }
        public void MakeMark_ShouldMakeMark(int index)
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .CreateSquareList()
            .ClickOnSquare(index);
            Assert.IsTrue(ticTacToePage.IsSquareMarked(index));
        }
        public void AudioSwitcher_ShouldTurnOnAudio()
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .ClickAudioSwitcher();
            if (!ticTacToePage.IsAudioOn())
            {
                ticTacToePage.ClickAudioSwitcher();
            }
            Assert.IsTrue(ticTacToePage.IsAudioOn());
        }
Beispiel #5
0
        public void FirstPalyerWin_ShuldScorePointToFirstPlayer()
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .ClickPlayerSwitcher()
            .CreateSquareList()
            .ClickOnSquare(0)
            .ClickOnSquare(2)
            .ClickOnSquare(3)
            .ClickOnSquare(5)
            .ClickOnSquare(6)
            .StartNewGame();
            ticTacToePage.WaitForFirstPlayerScore();

            var actualScore   = ticTacToePage.GetScoreFirstPlayer();
            var expectedScore = "1";

            Assert.AreEqual(expectedScore, actualScore);
        }
Beispiel #6
0
        public void Tie_ShuldScorePointToTieScores()
        {
            var ticTacToePage = new TicTacToePage(webDriver);

            ticTacToePage.GoToTicTacToePage()
            .ClickPlayerSwitcher()
            .CreateSquareList()
            .ClickOnSquare(0)
            .ClickOnSquare(1)
            .ClickOnSquare(2)
            .ClickOnSquare(3)
            .ClickOnSquare(5)
            .ClickOnSquare(4)
            .ClickOnSquare(7)
            .ClickOnSquare(8)
            .ClickOnSquare(6)
            .StartNewGame();
            ticTacToePage.WaitForTieScore();

            var actualScore   = ticTacToePage.GetScoreTie();
            var expectedScore = "1";

            Assert.AreEqual(expectedScore, actualScore);
        }