Ejemplo n.º 1
0
 public override void BeforeEach()
 {
     base.BeforeEach();
     _driver.Logout();
     _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
     _autoVerificationConfigurationPage = _dashboardPage.Menu.ClickAutoVerificationConfiguration();
 }
Ejemplo n.º 2
0
        public override void BeforeAll()
        {
            base.BeforeAll();

            //create vip level for a brand
            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
            var vipLevelManagerPage = _dashboardPage.Menu.ClickVipLevelManagerMenuItem();
            var newVipLevelPage     = vipLevelManagerPage.OpenNewVipLevelForm();

            _vipLevelData = TestDataGenerator.CreateValidVipLevelData(DefaultLicensee, DefaultBrand, false);
            var submittedVipLevelForm = newVipLevelPage.Submit(_vipLevelData);

            submittedVipLevelForm.CloseTab("View VIP Level");
            _dashboardPage.CloseTab("VIP Level Manager");

            //generate auto verification configuration form data
            _avcData = TestDataGenerator.CreateAutoVerificationConfigurationData(
                DefaultLicensee,
                DefaultBrand,
                DefaultCurrency,
                _vipLevelData.Name
                );

            //create new AVC
            _autoVerificationConfigurationPage = submittedVipLevelForm.Menu.ClickAutoVerificationConfiguration();
            _newAvcForm = _autoVerificationConfigurationPage.OpenNewAutoVerificationForm();
            _newAvcForm.SetAutoVerificationConfigurationFields(_avcData);
            _newAvcForm.SubmitAutoVerificationConfiguration().CloseTab("View Auto Verification Configuration");
        }
Ejemplo n.º 3
0
        public AutoVerificationConfigurationPage ClickAutoVerificationConfiguration()
        {
            _driver.WaitForJavaScript();
            var menuItem = By.XPath("//div[@id='sidebar']//span[text()='Auto Verification Configuration']");

            if (_driver.FindElements(menuItem).Count(x => x.Displayed && x.Enabled) == 0)
            {
                _driver.WaitAndClickElement(GetFraudMenu);
            }
            var submenu = _driver.FindElementWait(menuItem);

            _driver.WaitAndClickElement(submenu);

            var page = new AutoVerificationConfigurationPage(_driver);

            page.Initialize();
            return(page);
        }