Пример #1
0
        public void AddExecutionAsCentralMarketUser()
        {
            VwLoginPage          loginPage = new VwLoginPage(driver);
            VwContentRequestForm crf       = new VwContentRequestForm(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
            WaitTillPageLoad(15.00);

            //crf.IsButtonDisplayed(crf.addExecutionButtonLoc);
            crf.ClickAddExecution();
        }
Пример #2
0
        public void LoginWithIncorrectDataCentralMarket()
        {
            VwLoginPage loginPage = new VwLoginPage(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin + 1, VwLoginDataQa.centralMarketCorrectPassword);
            WaitTillPageLoad(10.00);

            Assert.IsTrue(loginPage.IsLoginFormDisplayed(driver, loginPage.loginFieldLoc));
            Assert.IsTrue(loginPage.IsErrorMessageDisplayed(driver, loginPage.errorMessageLoc));
            Assert.AreEqual("Error: Invalid username or password", driver.FindElement(loginPage.errorMessageLoc).Text);
        }
Пример #3
0
        public void ClickViewMoreCampaignsButtonHomePage()
        {
            VwLoginPage loginPage = new VwLoginPage(driver);
            VwHomePage  homePage  = new VwHomePage(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
            homePage.ClickViewMoreCampaigns();
            homePage.GetCampaignsListFromHomePage();
            WaitTillPageLoad(5.00);

            Assert.AreEqual(VwCampaignData.defaultCountOfTilesHomePage + VwCampaignData.countOfTilesInOneRow, homePage.GetCampaignsListFromHomePage().Count);
        }
Пример #4
0
        public void OpenCampaignPage()
        {
            VwLoginPage    loginPage    = new VwLoginPage(driver);
            VwHomePage     homePage     = new VwHomePage(driver);
            VwCampaignPage campaignPage = new VwCampaignPage(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
            homePage.ClickOnCampaignFromHomePage(VwCampaignData.numberOfTesingCampaign);
            WaitTillPageLoad(10.00);

            Assert.AreEqual(VwCampaignData.campaignName, driver.FindElement(campaignPage.campaignsNameLoc).Text);
            Assert.AreEqual(VwSiteUrls.vWDomenQa + VwSiteUrls.campaignsPageUrl + "/VolkswagenTuareg", driver.Url);
        }
Пример #5
0
        public void LoginWithCorrectDataCentralMarket()
        {
            VwLoginPage loginPage = new VwLoginPage(driver);
            VwHeader header = new VwHeader(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
            WaitTillPageLoad(15.00);

            Assert.AreEqual("rgba(1, 168, 236, 1)", driver.FindElement(By.XPath("//*[@class='nav navbar-nav']/li[1]/a")).GetCssValue("color"));
            Assert.IsTrue(header.IsUserNameDisplayed(header.userNameLoc));
             Assert.AreEqual(VwLoginDataQa.centralMarketName, driver.FindElement(header.userNameLoc).Text);
            // Assert.True(header.IsNavigationForCentralMarketDisplayed(header.adminTabLoc, header.homeTabLoc, header.campaignsTabLoc));
        }
Пример #6
0
        public void ClickViewMoreCampaignsButtonCampaignPage()
        {
            VwLoginPage     loginPage     = new VwLoginPage(driver);
            VwHomePage      homePage      = new VwHomePage(driver);
            VwHeader        header        = new VwHeader(driver);
            VwCampaignsPage campaignsPage = new VwCampaignsPage(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
            header.ClickCampaignTab();
            WaitTillPageLoad(15.00);
            homePage.ClickViewMoreCampaigns();
            campaignsPage.GetCampaignsListFromCampaignsPage();
            WaitTillPageLoad(15.00);
            Assert.AreEqual(VwCampaignData.defaultCountOfTilesCampaignPage + 2, campaignsPage.GetCampaignsListFromCampaignsPage().Count);
        }
Пример #7
0
        public void GoToCampaignsPage()
        {
            VwLoginPage loginPage = new VwLoginPage(driver);
            VwHomePage  homePage  = new VwHomePage(driver);
            VwHeader    header    = new VwHeader(driver);

            loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);


            header.ClickCampaignTab();

            WaitTillPageLoad(10.00);

            Assert.AreEqual(VwSiteUrls.vWDomenQa + VwSiteUrls.campaignsPageUrl, driver.Url);
            Assert.AreEqual("rgba(1, 168, 236, 1)", driver.FindElement(By.XPath("//*[@class='nav navbar-nav']/li[2]/a")).GetCssValue("color"));
        }
Пример #8
0
            public void OpenContentRequestFormAsCentralMarketUser()
            {
                VwLoginPage          loginPage = new VwLoginPage(driver);
                VwContentRequestForm crf       = new VwContentRequestForm(driver);

                loginPage.Login(VwLoginDataQa.centralMarketCorrectLogin, VwLoginDataQa.centralMarketCorrectPassword);
                WaitTillPageLoad(15.00);


                Assert.True(crf.IsButtonDisplayed(crf.bulkUploadButtonLoc));
                Assert.True(crf.IsButtonDisplayed(crf.addExecutionButtonLoc));
                Assert.AreEqual(VwSiteUrls.vWDomenQa + VwSiteUrls.contentRequestPageUrl + VwSiteUrls.executionHash, driver.Url);
                Assert.AreEqual(VwContentRequestFormData.formNameForCentralMarketUser + " > " + VwCampaignData.campaignName,
                                driver.FindElement(crf.breadCrumpLinkLoc).Text);

                Console.WriteLine(driver.FindElement(crf.breadCrumpLinkLoc).Text);
            }