コード例 #1
0
ファイル: Program.cs プロジェクト: 12masta/RowingSectionTests
        public void Login()
        {
            HomePageObjects  homeObj  = new HomePageObjects();
            LoginPageObjects loginObj = homeObj.ToLoginPage();

            loginObj.Login(ExcelLib.ReadData(1, "UserName"), ExcelLib.ReadData(1, "Password"));

            //checking is URL correct after loggin
            Assert.AreEqual("http://localhost:81/", PropertiesCollection.driver.Url.ToString());
            //checking is login is correct on navbar
            Assert.AreEqual(homeObj.GetUserLoginStringInButton().ToLower(), ExcelLib.ReadData(1, "UserName").ToLower());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: 12masta/RowingSectionTests
        public void LoginIncorrectCredentials()
        {
            HomePageObjects  homeObj  = new HomePageObjects();
            LoginPageObjects loginObj = homeObj.ToLoginPage();

            loginObj.Login(ExcelLib.ReadData(2, "UserName"), ExcelLib.ReadData(2, "Password"));

            //checking is URL correct after loggin
            Assert.AreEqual("http://localhost:81/Account/Login", PropertiesCollection.driver.Url.ToString());
            //checking is login is correct on navbar
            Assert.AreEqual("Niepoprawny login lub hasło.", loginObj.ErrorMessage());
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: 12masta/RowingSectionTests
        public void AddContest()
        {
            Login();
            HomePageObjects homeObj = new HomePageObjects();

            homeObj.ShowDropdownList();
            ContestListPageObjects contestListObj    = homeObj.GoToContestListPage();
            ContestAddPageObject   contestAddPageObj = contestListObj.AddContest();

            contestListObj = contestAddPageObj.CreateContest(ExcelLib.ReadData(1, "ContestName"), ExcelLib.ReadData(1, "ContestDate").Remove(10), ExcelLib.ReadData(1, "ContestDescription"));
            contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName"));

            Assert.AreEqual(contestListObj.GetNameOfContest(), ExcelLib.ReadData(1, "ContestName"));
            Assert.AreEqual(contestListObj.GetDateOfContest(), ExcelLib.ReadData(1, "ContestDate").Remove(10));
            Assert.AreEqual(contestListObj.GetDescriptionOfContest(), ExcelLib.ReadData(1, "ContestDescription"));
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: 12masta/RowingSectionTests
        public void DeleteContest()
        {
            Login();
            HomePageObjects homeObj = new HomePageObjects();

            homeObj.ShowDropdownList();
            ContestListPageObjects contestListObj = homeObj.GoToContestListPage();

            contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName"));
            ContestConfirmDeletePageObjects contestConfirmDelObj = contestListObj.DeleteContest();

            contestListObj = contestConfirmDelObj.ConfirmDelete();
            contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName"));

            Assert.AreEqual(contestListObj.GetNameOfContest(), "");
            Assert.AreEqual(contestListObj.GetDateOfContest(), "");
            Assert.AreEqual(contestListObj.GetDescriptionOfContest(), "");
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: 12masta/RowingSectionTests
 public void OpenHomePage()
 {
     HomePageObjects homeObj = new HomePageObjects();
 }