예제 #1
0
        public void TeamLineUpIsPresented()
        {
            HomeForm homeForm = new HomeForm();

            Assert.AreEqual(homeForm.IsHomeFormTitleDisplayed, true);
            homeForm.Header.GoToSection("teams");
            TeamsForm teams = new TeamsForm();

            teams.GoToTeam(1);
            TeamForm teamForm = new TeamForm();

            Assert.AreEqual(teamForm.IsTeamLineupPresented(), true);
        }
예제 #2
0
        public void TeamProfileRedirecting()
        {
            HomeForm home = new HomeForm();

            Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
            home.Header.GoToSection("teams");
            TeamsForm teams = new TeamsForm();

            Assert.AreEqual(32, teams.TeamsNumber);
            Assert.AreEqual("Teams".ToLower(), teams.Title.ToLower());
            TeamForm        selectedTeam = teams.GoToTeam(new Random().Next(31));
            string          teamName     = selectedTeam.Title;
            TeamProfileForm teamProfile  = selectedTeam.GoToTeamProfile();

            Assert.AreEqual(teamName, teamProfile.TeamName);
            Assert.IsTrue(teamProfile.TeamNameIsDisplayed);
            Assert.IsTrue(Browser.Url.Contains(teamName.ToLower()));
        }
예제 #3
0
 public void ManOfTheMatch()
 {
     try
     {
         HomeForm home = new HomeForm();
         Assert.AreEqual("2018 FIFA World Cup Russia™".ToLower(), home.Header.GetTitleText.ToLower());
         home.Header.GoToSection("teams");
         TeamsForm teams = new TeamsForm();
         Assert.AreEqual(32, teams.TeamsNumber);
         Assert.AreEqual("Teams".ToLower(), teams.Title.ToLower());
         TeamForm  selectedTeam = teams.GoToTeam((new Random()).Next(teams.TeamsNumber - 1));
         MatchForm match        = selectedTeam.GoToMatch((new Random()).Next(selectedTeam.Matches.Count - 1));
         match.GoToManOfTheMatchPage();
         Assert.IsTrue(match.ManOfTheMatch.Displayed);
     }
     catch
     {
         ScreenshotTaker screenshotmaker = new ScreenshotTaker();
         screenshotmaker.MakeScreen();
         screenshotmaker.PrintScreenshotsTo();
     }
 }