Exemplo n.º 1
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");
        }
Exemplo n.º 2
0
        public void Can_not_create_duplicate_auto_verification_configuration()
        {
            _newAvcForm = _autoVerificationConfigurationPage.OpenNewAutoVerificationForm();
            _newAvcForm.SetAutoVerificationConfigurationFields(_avcData);
            _newAvcForm.SubmitAutoVerificationConfiguration();

            var failAvc = new AutoVerificationConfigurationFailure(_driver);

            Assert.True(failAvc.ErrorAlert.Displayed);
            Assert.AreEqual(failAvc.ErrorAlert.Text, "You have already set up Auto Verification Check with the selected Brand, " +
                            "Currency and Vip level. Please, update the existing one or change your form data.");
            failAvc.CloseTab("Auto Verification Configuration Failure");
        }