Exemplo n.º 1
0
        public void LogoIsDisplay()
        {
            HomeForm home = new HomeForm();

            Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
            home.GoToPlayersForm();

            PlayersForm players = new PlayersForm();

            players.WaitForLoadingPage();
            Assert.IsTrue(players.IsFormTitleDisplay);

            PlayerBrowserSearchByPositionForm playerBrowser = players.SelectPlayer();

            playerBrowser.WaitForLoadingPage();
            Assert.IsTrue(playerBrowser.IsFormTitleDisplay);

            PlayerForm player = playerBrowser.GetInfo(new Random().Next(NUMBER_All_PLAYERS));

            player.WaitForLoadingPage();
            Assert.IsTrue(player.IsFormTitleDisplay);
            MatchSummaryForm matchSummary = player.SelectMatch(new Random().Next(NUMBER_OF_MATCHES));

            Assert.IsTrue(matchSummary.IsFormTitleDisplay);

            MatchForm match = matchSummary.GoToMatchForm();

            match.WaitForLoadingPage();
            Assert.IsTrue(match.IsFormTitleDisplay);
            Assert.IsTrue(match.IsLogoPresented);
        }
Exemplo n.º 2
0
        public void TeamIsDisplay()
        {
            try
            {
                HomeForm home = new HomeForm();
                Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
                home.GoToPlayersForm();

                PlayersForm players = new PlayersForm();
                players.WaitForLoadingPage();
                Assert.IsTrue(players.IsFormTitleDisplay);

                PlayerBrowserSearchByPositionForm playerBrowser     = players.SelectPlayer();
                PlayerBrowserSearchByTeamForm     playerBrowserTeam = playerBrowser.SelectTeam();
                playerBrowserTeam.WaitForLoadingPage();
                Assert.IsTrue(playerBrowserTeam.IsFormTitleDisplay);
                playerBrowserTeam.ClickTeam(TEAM_NAME);
                playerBrowserTeam.WaitForLoadingPage();
                Assert.IsTrue(playerBrowserTeam.SelectedTeamIsDisplayed(TEAM_NAME));
            }
            catch (Exception ex)
            {
                Log.Error(ex.Message, ex);
                ScreenshotTaker taker = new ScreenshotTaker();
                taker.MakeScreen();
                taker.PrintScreenshotsTo();
                Assert.Fail();
            }
        }
Exemplo n.º 3
0
        public void CorrectAddUp()
        {
            HomeForm home = new HomeForm();

            Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
            home.GoToPlayersForm();

            PlayersForm players = new PlayersForm();

            players.WaitForLoadingPage();
            Assert.IsTrue(players.IsFormTitleDisplay);

            PlayerBrowserSearchByPositionForm playerBrowser = players.SelectPlayer();

            playerBrowser.WaitForLoadingPage();
            Assert.IsTrue(playerBrowser.IsFormTitleDisplay);
            Assert.IsTrue(playerBrowser.IsCorrect);
        }
Exemplo n.º 4
0
        private void btnPlayers_Click(object sender, EventArgs e)
        {
            FormCollection fc        = Application.OpenForms;
            bool           foundForm = false;

            foreach (Form frm in fc)
            {
                if (frm is PlayersForm)
                {
                    foundForm = true;
                    frm.BringToFront();
                    break;
                }
            }
            if (!foundForm)
            {
                PlayersForm playersForm = new PlayersForm();
                playersForm.Show();
            }
        }
Exemplo n.º 5
0
        public void IsBirthDisplay()
        {
            HomeForm home = new HomeForm();

            Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
            home.GoToPlayersForm();

            PlayersForm players = new PlayersForm();

            players.WaitForLoadingPage();
            Assert.IsTrue(players.IsFormTitleDisplay);

            PlayerBrowserSearchByPositionForm playerBrowser = players.SelectPlayer();

            playerBrowser.WaitForLoadingPage();
            Assert.IsTrue(playerBrowser.IsFormTitleDisplay);

            PlayerForm player = playerBrowser.GetInfo(new Random().Next(NUMBER_ALL_PLAYERS));

            player.WaitForLoadingPage();
            Assert.IsTrue(player.IsFormTitleDisplay);
            Assert.IsTrue(player.IsDisplay);
        }
Exemplo n.º 6
0
        public void IsCountryDisplay()
        {
            HomeForm home = new HomeForm();

            Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
            home.GoToPlayersForm();

            PlayersForm players = new PlayersForm();

            players.WaitForLoadingPage();
            Assert.IsTrue(players.IsFormTitleDisplay);

            CoachesForm coaches = players.SelectCoach();

            coaches.WaitForLoadingPage();
            Assert.IsTrue(coaches.IsFormTitleDisplay);

            CoachForm coach = coaches.GoToCoachForm(new Random().Next(NUMBER_OF_COACHES));

            coach.WaitForLoadingPage();
            Assert.IsTrue(coach.IsFormTitleDisplay);
            Assert.IsTrue(coach.IsDisplay);
        }