public override void BeforeEach()
        {
            base.BeforeEach();
            _driver.Logout();
            var dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();

            _bonusTemplateManagerPage = dashboardPage.Menu.ClickBonusTemplateMenuItem();
        }
        public void Can_delete_bonus_template()
        {
            // create a bonus template
            var bonusTemplateName = "Deposit-Bonus-Template" + TestDataGenerator.GetRandomString(3);

            CreateBonusTemplate(bonusTemplateName);

            // delete the bonus template
            var deleteDialog = _bonusTemplateManagerPage.OpenDeleteBonusTemplateDialog(bonusTemplateName);

            _bonusTemplateManagerPage = deleteDialog.Confirm();
            var deletedBonusTemplate = _bonusTemplateManagerPage.SearchForDeletedRecord(bonusTemplateName);

            Assert.IsFalse(deletedBonusTemplate);
        }
Пример #3
0
        public BonusTemplateManagerPage ClickBonusTemplateMenuItem()
        {
            var menuItem = By.XPath("//div[@id='sidebar']//span[text()='Bonus template manager']");

            if (_driver.FindElements(menuItem).Count(x => x.Displayed && x.Enabled) == 0)
            {
                //GetHomeMenu.Click();
                GetBonusMenu.Click();
            }
            var submenu = _driver.FindElementWait(menuItem);

            submenu.Click();
            var page = new BonusTemplateManagerPage(_driver);

            return(page);
        }