public void Test001_AddSecurityRoleWithFees() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Security Role with Fees'"); ManageRolesPage manageRolesPage = new ManageRolesPage(_driver); manageRolesPage.OpenUsingControlPanel(_baseUrl); int itemNumber = manageRolesPage.FindElements(By.XPath(ManageRolesPage.SecurityRolesList)).Count; manageRolesPage.AddNewSecurityRoleWithFees(_roleName, _serviceFee, _numberInBillingPeriod, _billingPeriod); manageRolesPage.OpenUsingControlPanel(_baseUrl); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1"); Assert.That(manageRolesPage.FindElements(By.XPath(ManageRolesPage.SecurityRolesList)).Count, Is.EqualTo(itemNumber + 1), "The security role is not added correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Service Fee is present in the list"); Assert.That(manageRolesPage.FindElement(By.XPath("//tr[td[text() = '" + _roleName + "']]/td/span[contains(@id, '_Label1')]")).Text, Is.EqualTo(_serviceFee), "The service fee is not added correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Billing Period is present in the list"); Assert.That(manageRolesPage.FindElement(By.XPath("//tr[td[text() = '" + _roleName + "']]/td/span[contains(@id, '_Label2')]")).Text, Is.EqualTo(_numberInBillingPeriod), "The Billing period is not added correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Billing Frequency is present in the list"); Assert.That(manageRolesPage.FindElement(By.XPath("//tr[td[text() = '" + _roleName + "']]/td/span[contains(@id, '_lblBillingFrequency')]")).Text, Is.EqualTo(_billingPeriod), "The Billing frequency is not added correctly"); }
public void Test002_EditSecurityRole() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Security Role'"); ManageRolesPage manageRolesPage = new ManageRolesPage(_driver); manageRolesPage.OpenUsingControlPanel(_baseUrl); manageRolesPage.AddDescriptionToSecurityRole(_roleName, _roleDescription); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Security description is present in the list"); Assert.That(_roleDescription, Is.EqualTo(manageRolesPage.FindElement(By.XPath("//tr[td[text() = '" + _roleName + "']]/td[4]")).Text), "The role description is not added correctly"); }
public void Test004_AssignRoleToUser() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Assign the Role to User'"); ManageUsersPage manageUsersPage = new ManageUsersPage(_driver); manageUsersPage.OpenUsingControlPanel(_baseUrl); manageUsersPage.ManageRoles(_userName); manageUsersPage.AssignRoleToUser(_assignedRoleName); ManageRolesPage manageRolesPage = new ManageRolesPage(_driver); manageRolesPage.OpenUsingControlPanel(_baseUrl); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of Users assigned to the Role"); Assert.That("1", Is.EqualTo(manageRolesPage.FindElement(By.XPath("//tr[td[text() = '" + _assignedRoleName + "']]/td[13]")).Text), "The role is not assigned correctly to User"); }
public void Test002_EditSecurityRoleGroup() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Security Role Group'"); ManageRolesPage manageRolesPage = new ManageRolesPage(_driver); manageRolesPage.OpenUsingControlPanel(_baseUrl); manageRolesPage.AddDescriptionToSecurityRoleGroup(_roleGroupName, _roleGroupDescription); manageRolesPage.OpenUsingControlPanel(_baseUrl); manageRolesPage.EditSecurityRoleGroup(_roleGroupName); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Security role Group description is present in the box"); Assert.That(_roleGroupDescription, Is.EqualTo(manageRolesPage.FindElement(By.XPath(ManageRolesPage.RoleGroupNameDescriptionTextBox)).Text), "The role description is not added correctly"); }