/// <summary> /// First creates an organization and then imports an organization template that contains 2 organizations of which 1 has the same organization name with the previously created organization. /// Check for duplicate organziation names is made during import /// </summary> public static void ImportTemplateWithAnExistingOrganization() { var organizationName = "SiEBEN"; NewOrganizationPage.CreateOrganization().WithOrganizationName(organizationName).Create(); if (!NewOrganizationPage.IsOrganizationSavedSuccessfully) { return; } FirstOrganization.SetFieldValue(OrganizationFields.OrganizationName, organizationName); ImportPage.ImportFile() .Containing(ImportFileType.Organizations) .FromPath(ImportFilePath) .WithFileName("Organizations16.xls") .CheckingForDuplicate(ImportField.OrganizationName).Submit(); if (!ImportPage.IsImportWithDuplicatesMessageShown) { return; } SecondOrganization.SetFieldValue(OrganizationFields.OrganizationName, "SiEBEN"); ThirdOrganization.SetFieldValue(OrganizationFields.OrganizationName, "InEdu"); }
public static void CleanUp() { FirstOrganization.CleanUp(); SecondOrganization.CleanUp(); ThirdOrganization.CleanUp(); LeftSideMenu.GoToContacts(); VerifyThat.AreEqual(InitialOrganizationCount, OrganizationsPage.TotalOrganizationsCountByLabel, $"Total organizations count is not the same as in the test initiation (Expected={InitialOrganizationCount}, Actual={OrganizationsPage.TotalOrganizationsCountByLabel}). Some organizations may have not been cleaned up at the end of test."); }
/// <summary> /// Import an organization template that contains 3 organization that have void lines in between them /// </summary> public static void ImportTemplateWithVoidLinesBetweenOrganizations() { ImportPage.ImportFile() .Containing(ImportFileType.Organizations) .FromPath(ImportFilePath) .WithFileName("Organizations18.xls") .Submit(); if (!ImportPage.IsImportSuccessMessageShown) { return; } FirstOrganization.SetFieldValue(OrganizationFields.OrganizationName, "SiEBEN"); SecondOrganization.SetFieldValue(OrganizationFields.OrganizationName, "InEdu"); ThirdOrganization.SetFieldValue(OrganizationFields.OrganizationName, "Microsoft"); }
/// <summary> /// Import an organization template that contains 2 organizations with the same organization name. During import, duplicate organization name checkbox is checked /// </summary> public static void ImportTemplateWithTwinOrganizations() { ImportPage.ImportFile() .Containing(ImportFileType.Organizations) .FromPath(ImportFilePath) .WithFileName("Organizations17.xls") .CheckingForDuplicate(ImportField.OrganizationName).Submit(); if (!ImportPage.IsImportWithDuplicatesMessageShown) { return; } FirstOrganization.SetFieldValue(OrganizationFields.OrganizationName, "SiEBEN"); SecondOrganization.SetFieldValue(OrganizationFields.OrganizationName, "InEdu"); ThirdOrganization.SetFieldValue(OrganizationFields.OrganizationName, "SiEBEN"); }