public void Can_edit_color_of_vip_Level() { //create vip level var vipLevelData = TestDataGenerator.CreateValidVipLevelData(_defaultLicensee.Name, _brand.Name, false); _vipLevelsPage = _dashboardPage.Menu.ClickVipLevelManagerMenuItem(); var newForm = _vipLevelsPage.OpenNewVipLevelForm(); var submittedForm = newForm.Submit(vipLevelData); Assert.AreEqual("VIP Level has been created successfully.", submittedForm.ConfirmationMessage); submittedForm.CloseTab("View VIP Level"); //deactivate vip level var deactivateDialog = _vipLevelsPage.OpenDeactivateDialog(vipLevelData.Name).Deactivate(); Assert.IsTrue(_vipLevelsPage.CheckDeactivatedVipLevelStatus(vipLevelData.Name)); //edit color of vip level var color = TestDataGenerator.GetRandomColor(); _vipLevelsPage.Grid.SelectRecord(vipLevelData.Name); var editForm = _vipLevelsPage.OpenEditVipLevelForm(); submittedForm = editForm.EditColor(color); Assert.AreEqual("VIP Level has been edited successfully.", submittedForm.ConfirmationMessage); submittedForm.CloseTab("View VIP Level"); //check color's change _vipLevelsPage.Grid.SelectRecord(vipLevelData.Name); var viewVipLevelForm = _vipLevelsPage.OpenViewVipLevelForm(); Assert.IsTrue(viewVipLevelForm.IsColorDisplayed(ColorTranslator.FromHtml(color))); }
public void Can_edit_inactive_vip_level() { //create vip level var vipLevelData = TestDataGenerator.CreateValidVipLevelData(_defaultLicensee.Name, _brand.Name, false); _vipLevelsPage = _dashboardPage.Menu.ClickVipLevelManagerMenuItem(); var newForm = _vipLevelsPage.OpenNewVipLevelForm(); var submittedForm = newForm.Submit(vipLevelData); Assert.AreEqual("VIP Level has been created successfully.", submittedForm.ConfirmationMessage); submittedForm.CloseTab("View VIP Level"); //deactivate vip level var deactivateDialog = _vipLevelsPage.OpenDeactivateDialog(vipLevelData.Name).Deactivate(); Assert.IsTrue(_vipLevelsPage.CheckDeactivatedVipLevelStatus(vipLevelData.Name)); //edit vip level var secondVipLevelData = TestDataGenerator.CreateValidVipLevelData(_defaultLicensee.Name, _brand.Name, false); _vipLevelsPage.Grid.SelectRecord(vipLevelData.Name); var editForm = _vipLevelsPage.OpenEditVipLevelForm(); submittedForm = editForm.Submit(secondVipLevelData); Assert.AreEqual("VIP Level has been edited successfully.", submittedForm.ConfirmationMessage); submittedForm.CloseTab("View VIP Level"); //check changes _vipLevelsPage.Grid.SelectRecord(secondVipLevelData.Name); var viewVipLevelForm = _vipLevelsPage.OpenViewVipLevelForm(); Assert.AreEqual(secondVipLevelData.Licensee, viewVipLevelForm.Licensee); Assert.AreEqual(secondVipLevelData.Brand, viewVipLevelForm.Brand); Assert.AreEqual(secondVipLevelData.DefaultForNewPlayers, viewVipLevelForm.DefaultForNewPlayers); Assert.AreEqual(secondVipLevelData.Code, viewVipLevelForm.Code); Assert.AreEqual(secondVipLevelData.Name, viewVipLevelForm.Name); Assert.AreEqual(secondVipLevelData.Rank.ToString(), viewVipLevelForm.Rank); Assert.AreEqual(secondVipLevelData.Description, viewVipLevelForm.Description); }