public void Can_edit_auto_verification_configuration_via_UI() { //generate auto verification configuration edited form data var avcDataEdited = TestDataGenerator.CreateAutoVerificationConfigurationData( DefaultLicensee, DefaultBrand, "RMB", _vipLevelData.Name ); //edit avc var editAvcForm = _autoVerificationConfigurationPage.OpenEditAutoVerificationConfigurationForm(_avcData); editAvcForm.EditAutoVerificationConfigurationFields(_avcData, avcDataEdited); var viewAvcForm = editAvcForm.Submit(); Assert.AreEqual("Auto Verification Configurations has been successfully updated.", viewAvcForm.SuccessAlert.Text); Assert.AreEqual(avcDataEdited.Licensee, viewAvcForm.Licensee.Text); Assert.AreEqual(avcDataEdited.Brand, viewAvcForm.Brand.Text); Assert.AreEqual(avcDataEdited.Currency, viewAvcForm.Currency.Text); Assert.AreEqual(avcDataEdited.VipLevel, viewAvcForm.GetSelectedVipLevels()[0]); viewAvcForm.CloseTab("View Auto Verification Configuration"); //move to the initial state editAvcForm = _autoVerificationConfigurationPage.OpenEditAutoVerificationConfigurationForm(avcDataEdited); editAvcForm.EditAutoVerificationConfigurationFields(avcDataEdited, _avcData); viewAvcForm = editAvcForm.Submit(); Assert.AreEqual("Auto Verification Configurations has been successfully updated.", viewAvcForm.SuccessAlert.Text); }
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"); }