diff --git a/testing/PIMS.Tests.Automation/Classes/AcquisitionFile.cs b/testing/PIMS.Tests.Automation/Classes/AcquisitionFile.cs index 2aa9a5a991..42ed38fb2c 100644 --- a/testing/PIMS.Tests.Automation/Classes/AcquisitionFile.cs +++ b/testing/PIMS.Tests.Automation/Classes/AcquisitionFile.cs @@ -8,14 +8,14 @@ public class AcquisitionFile public string? AcquisitionProjProduct { get; set; } = String.Empty; public string? AcquisitionProjFunding { get; set; } = String.Empty; public string? AcquisitionFundingOther { get; set; } = String.Empty; - + public string? AssignedDate { get; set; } = String.Empty; public string? DeliveryDate { get; set; } = String.Empty; public string? AcquisitionCompletedDate { get; set; } = String.Empty; public string AcquisitionFileName { get; set; } = null!; public string? HistoricalFileNumber { get; set; } = String.Empty; public string? PhysicalFileStatus { get; set; } = String.Empty; public string AcquisitionType { get; set; } = null!; - public string MOTIRegion { get; set; } = null!; + public string AcquisitionMOTIRegion { get; set; } = null!; public int AcquisitionTeamStartRow { get; set; } = 0; public int AcquisitionTeamCount { get; set; } = 0; public List? AcquisitionTeam { get; set; } = new List(); diff --git a/testing/PIMS.Tests.Automation/Classes/Contact.cs b/testing/PIMS.Tests.Automation/Classes/Contact.cs index cacd759f0c..b3f9f6c4f9 100644 --- a/testing/PIMS.Tests.Automation/Classes/Contact.cs +++ b/testing/PIMS.Tests.Automation/Classes/Contact.cs @@ -1,8 +1,11 @@  namespace PIMS.Tests.Automation.Classes { - public class Contact + public class OrganizationContact { + public string OrganizationName { get; set; } = null!; + public string? Alias { get; set; } = String.Empty; + public string? IncorporationNumber { get; set; } = String.Empty; public string ContactStatus { get; set; } = null!; public string? Email1 { get; set; } = String.Empty; public string? EmailType1 { get; set; } = String.Empty; @@ -45,15 +48,10 @@ public class Contact public string? BillingOtherCountry { get; set; } = String.Empty; public string? BillingPostalCode { get; set; } = String.Empty; public string? Comments { get; set; } = String.Empty; - } - public class OrganizationContact: Contact - { - public string OrganizationName { get; set; } = null!; - public string? Alias { get; set; } = String.Empty; - public string? IncorporationNumber { get; set; } = String.Empty; + } - public class IndividualContact : Contact + public class IndividualContact { public string FirstName { get; set; } = null!; public string? MiddleName { get; set; } = String.Empty; @@ -61,5 +59,47 @@ public class IndividualContact : Contact public string FullName { get; set; } = null!; public string? PreferableName { get; set; } = String.Empty; public string? Organization { get; set; } = String.Empty; + public string ContactStatus { get; set; } = null!; + public string? Email1 { get; set; } = String.Empty; + public string? EmailType1 { get; set; } = String.Empty; + public string? EmailTypeDisplay1 { get; set; } = String.Empty; + public string? Email2 { get; set; } = String.Empty; + public string? EmailType2 { get; set; } = String.Empty; + public string? EmailTypeDisplay2 { get; set; } = String.Empty; + public string? Phone1 { get; set; } = String.Empty; + public string? PhoneType1 { get; set; } = String.Empty; + public string? PhoneTypeDisplay1 { get; set; } = String.Empty; + public string? Phone2 { get; set; } = String.Empty; + public string? PhoneType2 { get; set; } = String.Empty; + public string? PhoneTypeDisplay2 { get; set; } = String.Empty; + public string? MailAddressLine1 { get; set; } = String.Empty; + public string? MailAddressLine2 { get; set; } = String.Empty; + public string? MailAddressLine3 { get; set; } = String.Empty; + public string? MailCity { get; set; } = String.Empty; + public string? MailProvince { get; set; } = String.Empty; + public string? MailProvDisplay { get; set; } = String.Empty; + public string? MailCityProvinceView { get; set; } = String.Empty; + public string? MailCountry { get; set; } = String.Empty; + public string? MailOtherCountry { get; set; } = String.Empty; + public string? MailPostalCode { get; set; } = String.Empty; + public string? PropertyAddressLine1 { get; set; } = String.Empty; + public string? PropertyAddressLine2 { get; set; } = String.Empty; + public string? PropertyAddressLine3 { get; set; } = String.Empty; + public string? PropertyCity { get; set; } = String.Empty; + public string? PropertyProvince { get; set; } = String.Empty; + public string? PropertyCityProvinceView { get; set; } = String.Empty; + public string? PropertyCountry { get; set; } = String.Empty; + public string? PropertyOtherCountry { get; set; } = String.Empty; + public string? PropertyPostalCode { get; set; } = String.Empty; + public string? BillingAddressLine1 { get; set; } = String.Empty; + public string? BillingAddressLine2 { get; set; } = String.Empty; + public string? BillingAddressLine3 { get; set; } = String.Empty; + public string? BillingCity { get; set; } = String.Empty; + public string? BillingProvince { get; set; } = String.Empty; + public string? BillingCityProvinceView { get; set; } = String.Empty; + public string? BillingCountry { get; set; } = String.Empty; + public string? BillingOtherCountry { get; set; } = String.Empty; + public string? BillingPostalCode { get; set; } = String.Empty; + public string? Comments { get; set; } = String.Empty; } } diff --git a/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx b/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx index 2139f8ee7e..c2b14083c5 100644 Binary files a/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx and b/testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx differ diff --git a/testing/PIMS.Tests.Automation/Drivers/BrowserDriver.cs b/testing/PIMS.Tests.Automation/Drivers/BrowserDriver.cs index ae68d96251..83488bdf4f 100644 --- a/testing/PIMS.Tests.Automation/Drivers/BrowserDriver.cs +++ b/testing/PIMS.Tests.Automation/Drivers/BrowserDriver.cs @@ -9,12 +9,13 @@ public class BrowserDriver : IDisposable { private readonly Lazy currentWebDriverLazy; private readonly Lazy configurationLazy; - //private bool _isDisposed; private readonly bool closeBrowserOnDispose; private readonly bool runAutomationHeadless; public BrowserDriver() { + + System.Diagnostics.Debug.WriteLine(Environment.GetEnvironmentVariable("BASE_URL")); currentWebDriverLazy = new Lazy(CreateEdgeWebDriver); configurationLazy = new Lazy(ReadConfiguration); closeBrowserOnDispose = Configuration.GetValue("CloseBrowserAfterEachTest", true); @@ -39,6 +40,7 @@ private IWebDriver CreateChromeWebDriver() var chromeDriver = new ChromeDriver(ChromeDriverService.CreateDefaultService(), options); chromeDriver.Url = Configuration.GetValue("baseUrl"); + //chromeDriver.Url = Environment.GetEnvironmentVariable("BASE_URL"); return chromeDriver; } @@ -57,6 +59,8 @@ private IWebDriver CreateEdgeWebDriver() var edgeDriver = new EdgeDriver(EdgeDriverService.CreateDefaultService(), options); edgeDriver.Url = Configuration.GetValue("baseUrl"); + //var baseUrl = Environment.GetEnvironmentVariable("BASE_URL"); + //edgeDriver.Url = baseUrl; return edgeDriver; } @@ -68,17 +72,10 @@ private IConfiguration ReadConfiguration() => public void Dispose() { - //if (_isDisposed) - //{ - // return; - //} - if (currentWebDriverLazy.IsValueCreated && closeBrowserOnDispose) { Current.Quit(); } - - //_isDisposed = true; } } } diff --git a/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature b/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature index 8f0979a27e..62f9f9f63d 100644 --- a/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature +++ b/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature @@ -12,9 +12,9 @@ Scenario: Create a new complete Acquisition File with pins Scenario: Edit existing Acquisition File and Properties Given I edit an existing Acquisition File from row number 2 - When I edit a Digital Document for a "Acquisition File" from row number 7 - And I update a Property details from row number 4 + When I update a Property details from row number 4 And I navigate back to the Acquisition File Summary + And I edit a Digital Document for a "Acquisition File" from row number 7 Then An existing Acquisition file has been edited successfully Scenario: Create an Acquisition File from Pin diff --git a/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature.cs b/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature.cs index 4e62b7b057..5ca708b9f1 100644 --- a/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature.cs +++ b/testing/PIMS.Tests.Automation/Features/AcquisitionFiles.feature.cs @@ -141,13 +141,13 @@ public void EditExistingAcquisitionFileAndProperties() testRunner.Given("I edit an existing Acquisition File from row number 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden #line 15 - testRunner.When("I edit a Digital Document for a \"Acquisition File\" from row number 7", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); + testRunner.When("I update a Property details from row number 4", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden #line 16 - testRunner.And("I update a Property details from row number 4", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I navigate back to the Acquisition File Summary", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden #line 17 - testRunner.And("I navigate back to the Acquisition File Summary", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I edit a Digital Document for a \"Acquisition File\" from row number 7", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden #line 18 testRunner.Then("An existing Acquisition file has been edited successfully", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); diff --git a/testing/PIMS.Tests.Automation/Features/Contacts.feature b/testing/PIMS.Tests.Automation/Features/Contacts.feature index 7945f2c929..4d14f8fc30 100644 --- a/testing/PIMS.Tests.Automation/Features/Contacts.feature +++ b/testing/PIMS.Tests.Automation/Features/Contacts.feature @@ -10,6 +10,7 @@ Scenario Outline: Create new Organization Complete Contact Examples: | ContactType | RowNumber | | Organization | 1 | + | Organization | 3 | Scenario Outline: Create new Individual Complete Contact Given I create a new Individual Contact from row number @@ -19,17 +20,18 @@ Scenario Outline: Create new Individual Complete Contact | ContactType | RowNumber | | Individual | 1 | | Individual | 2 | + | Individual | 4 | Scenario: Cancel creating a new contact Given I cancel creating a new contact from row number 2 Then Search Contacts screen is correctly rendered Scenario: Update an Existing Organization Contact - Given I update an existing Organization Contact from row number 3 + Given I update an existing Organization Contact from row number 4 Then An Organization contact is successfully updated Scenario: Update an Existing Individual Contact - Given I update an existing Individual Contact from row number 4 + Given I update an existing Individual Contact from row number 5 Then An Individual contact is successfully updated Scenario Outline: Search for a non-existing Contact @@ -37,7 +39,7 @@ Scenario Outline: Search for a non-existing Contact Then No contacts results are found Examples: | ContactType | RowNumber | - | Individual | 5 | + | Individual | 6 | | Organization | 4 | diff --git a/testing/PIMS.Tests.Automation/Features/Contacts.feature.cs b/testing/PIMS.Tests.Automation/Features/Contacts.feature.cs index 56ee1a9fee..804a59420f 100644 --- a/testing/PIMS.Tests.Automation/Features/Contacts.feature.cs +++ b/testing/PIMS.Tests.Automation/Features/Contacts.feature.cs @@ -86,6 +86,7 @@ void System.IDisposable.Dispose() [Xunit.TraitAttribute("FeatureTitle", "Contacts")] [Xunit.TraitAttribute("Description", "Create new Organization Complete Contact")] [Xunit.InlineDataAttribute("Organization", "1", new string[0])] + [Xunit.InlineDataAttribute("Organization", "3", new string[0])] public void CreateNewOrganizationCompleteContact(string contactType, string rowNumber, string[] exampleTags) { string[] tagsOfScenario = exampleTags; @@ -121,6 +122,7 @@ public void CreateNewOrganizationCompleteContact(string contactType, string rowN [Xunit.TraitAttribute("Description", "Create new Individual Complete Contact")] [Xunit.InlineDataAttribute("Individual", "1", new string[0])] [Xunit.InlineDataAttribute("Individual", "2", new string[0])] + [Xunit.InlineDataAttribute("Individual", "4", new string[0])] public void CreateNewIndividualCompleteContact(string contactType, string rowNumber, string[] exampleTags) { string[] tagsOfScenario = exampleTags; @@ -128,7 +130,7 @@ public void CreateNewIndividualCompleteContact(string contactType, string rowNum argumentsOfScenario.Add("ContactType", contactType); argumentsOfScenario.Add("RowNumber", rowNumber); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Create new Individual Complete Contact", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 14 +#line 15 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -138,13 +140,13 @@ public void CreateNewIndividualCompleteContact(string contactType, string rowNum else { this.ScenarioStart(); -#line 15 +#line 16 testRunner.Given(string.Format("I create a new Individual Contact from row number {0}", rowNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 16 +#line 17 testRunner.And(string.Format("I search for an existing contact from type \"{0}\" row number {1}", contactType, rowNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden -#line 17 +#line 18 testRunner.Then(string.Format("Expected Content is displayed on Contacts Table from contact type \"{0}\"", contactType), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -159,7 +161,7 @@ public void CancelCreatingANewContact() string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Cancel creating a new contact", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 23 +#line 25 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -169,10 +171,10 @@ public void CancelCreatingANewContact() else { this.ScenarioStart(); -#line 24 +#line 26 testRunner.Given("I cancel creating a new contact from row number 2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 25 +#line 27 testRunner.Then("Search Contacts screen is correctly rendered", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -187,7 +189,7 @@ public void UpdateAnExistingOrganizationContact() string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update an Existing Organization Contact", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 27 +#line 29 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -197,10 +199,10 @@ public void UpdateAnExistingOrganizationContact() else { this.ScenarioStart(); -#line 28 - testRunner.Given("I update an existing Organization Contact from row number 3", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 30 + testRunner.Given("I update an existing Organization Contact from row number 4", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 29 +#line 31 testRunner.Then("An Organization contact is successfully updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -215,7 +217,7 @@ public void UpdateAnExistingIndividualContact() string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update an Existing Individual Contact", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 31 +#line 33 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -225,10 +227,10 @@ public void UpdateAnExistingIndividualContact() else { this.ScenarioStart(); -#line 32 - testRunner.Given("I update an existing Individual Contact from row number 4", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 34 + testRunner.Given("I update an existing Individual Contact from row number 5", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 33 +#line 35 testRunner.Then("An Individual contact is successfully updated", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -238,7 +240,7 @@ public void UpdateAnExistingIndividualContact() [Xunit.SkippableTheoryAttribute(DisplayName="Search for a non-existing Contact")] [Xunit.TraitAttribute("FeatureTitle", "Contacts")] [Xunit.TraitAttribute("Description", "Search for a non-existing Contact")] - [Xunit.InlineDataAttribute("Individual", "5", new string[0])] + [Xunit.InlineDataAttribute("Individual", "6", new string[0])] [Xunit.InlineDataAttribute("Organization", "4", new string[0])] public void SearchForANon_ExistingContact(string contactType, string rowNumber, string[] exampleTags) { @@ -247,7 +249,7 @@ public void SearchForANon_ExistingContact(string contactType, string rowNumber, argumentsOfScenario.Add("ContactType", contactType); argumentsOfScenario.Add("RowNumber", rowNumber); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Search for a non-existing Contact", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 35 +#line 37 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -257,10 +259,10 @@ public void SearchForANon_ExistingContact(string contactType, string rowNumber, else { this.ScenarioStart(); -#line 36 +#line 38 testRunner.Given(string.Format("I search for an non-existing contact from type \"{0}\" row number {1}", contactType, rowNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 37 +#line 39 testRunner.Then("No contacts results are found", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } diff --git a/testing/PIMS.Tests.Automation/Features/Projects.feature b/testing/PIMS.Tests.Automation/Features/Projects.feature index 1744f01a2b..0acdf0ba4a 100644 --- a/testing/PIMS.Tests.Automation/Features/Projects.feature +++ b/testing/PIMS.Tests.Automation/Features/Projects.feature @@ -4,14 +4,15 @@ Feature: Projects Scenario Outline: Create new Projects Given I create a new Project from row number When I verify The Project View Form + And I create Digital Documents for a "Project" row number And I search for an existing project Then Expected Content is displayed on Projects Table Examples: - | RowNumber | - | 1 | - | 2 | - | 3 | - | 4 | + | RowNumber | DocRowNumber | + | 1 | 8 | + | 2 | 9 | + | 3 | 10 | + | 4 | 11 | Scenario: Update Project Given I update an existing project from row number 5 diff --git a/testing/PIMS.Tests.Automation/Features/Projects.feature.cs b/testing/PIMS.Tests.Automation/Features/Projects.feature.cs index 73b9ccee82..7585c9dd89 100644 --- a/testing/PIMS.Tests.Automation/Features/Projects.feature.cs +++ b/testing/PIMS.Tests.Automation/Features/Projects.feature.cs @@ -85,15 +85,16 @@ void System.IDisposable.Dispose() [Xunit.SkippableTheoryAttribute(DisplayName="Create new Projects")] [Xunit.TraitAttribute("FeatureTitle", "Projects")] [Xunit.TraitAttribute("Description", "Create new Projects")] - [Xunit.InlineDataAttribute("1", new string[0])] - [Xunit.InlineDataAttribute("2", new string[0])] - [Xunit.InlineDataAttribute("3", new string[0])] - [Xunit.InlineDataAttribute("4", new string[0])] - public void CreateNewProjects(string rowNumber, string[] exampleTags) + [Xunit.InlineDataAttribute("1", "8", new string[0])] + [Xunit.InlineDataAttribute("2", "9", new string[0])] + [Xunit.InlineDataAttribute("3", "10", new string[0])] + [Xunit.InlineDataAttribute("4", "11", new string[0])] + public void CreateNewProjects(string rowNumber, string docRowNumber, string[] exampleTags) { string[] tagsOfScenario = exampleTags; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); argumentsOfScenario.Add("RowNumber", rowNumber); + argumentsOfScenario.Add("DocRowNumber", docRowNumber); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Create new Projects", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 4 this.ScenarioInitialize(scenarioInfo); @@ -112,9 +113,12 @@ public void CreateNewProjects(string rowNumber, string[] exampleTags) testRunner.When("I verify The Project View Form", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden #line 7 - testRunner.And("I search for an existing project", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And(string.Format("I create Digital Documents for a \"Project\" row number {0}", docRowNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden #line 8 + testRunner.And("I search for an existing project", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 9 testRunner.Then("Expected Content is displayed on Projects Table", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -129,7 +133,7 @@ public void UpdateProject() string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Update Project", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 16 +#line 17 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -139,10 +143,10 @@ public void UpdateProject() else { this.ScenarioStart(); -#line 17 +#line 18 testRunner.Given("I update an existing project from row number 5", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 18 +#line 19 testRunner.Then("The Project is updated successfully", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -157,7 +161,7 @@ public void DuplicateProject() string[] tagsOfScenario = ((string[])(null)); System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Duplicate Project", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 20 +#line 21 this.ScenarioInitialize(scenarioInfo); #line hidden if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) @@ -167,10 +171,10 @@ public void DuplicateProject() else { this.ScenarioStart(); -#line 21 +#line 22 testRunner.Given("I create a new Project from row number 1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 22 +#line 23 testRunner.Then("Duplicate Project Alert is displayed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } diff --git a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionFiles.cs b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionFiles.cs index 90c5946f51..b932a15c9d 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/AcquisitionFiles.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/AcquisitionFiles.cs @@ -13,6 +13,7 @@ public class AcquisitionFiles : PageObjectBase private By createAcquisitionFileButton = By.XPath("//a[contains(text(),'Create an Acquisition File')]"); private By acquisitionFileSummaryBttn = By.XPath("//div[contains(text(),'File Summary')]"); + private By acquisitionFileDetailsTab = By.XPath("//a[contains(text(),'File details')]"); //Acquisition File Details View Form Elements private By acquisitionFileViewTitle = By.XPath("//h1[contains(text(),'Acquisition File')]"); @@ -32,7 +33,7 @@ public class AcquisitionFiles : PageObjectBase private By acquisitionFileHeaderStatusLabel = By.XPath("//label[contains(text(),'Status')]"); private By acquisitionFileHeaderStatusContent = By.XPath("//label[contains(text(),'Status')]/parent::div/following-sibling::div[1]/strong"); - private By acquisitionFileProjectSubtitle = By.XPath("//div[contains(text(),'Project')]"); + private By acquisitionFileProjectSubtitle = By.XPath("//h2/div/div[contains(text(), 'Project')]"); private By acquisitionFileProjectLabel = By.XPath("//div[@class='collapse show']/div/div/label[contains(text(),'Ministry project')]"); private By acquisitionFileProjectInput = By.CssSelector("input[id='typeahead-project']"); private By acquisitionFileProject1stOption = By.CssSelector("div[id='typeahead-project'] a"); @@ -114,10 +115,10 @@ public AcquisitionFiles(IWebDriver webDriver) : base(webDriver) public void NavigateToCreateNewAcquisitionFile() { - WaitUntil(menuAcquisitionButton); + Wait(5000); webDriver.FindElement(menuAcquisitionButton).Click(); - Wait(); + WaitUntil(createAcquisitionFileButton); FocusAndClick(createAcquisitionFileButton); } @@ -133,6 +134,12 @@ public void NavigateToFileSummary() webDriver.FindElement(acquisitionFileSummaryBttn).Click(); } + public void NavigateToFileDetailsTab() + { + Wait(); + webDriver.FindElement(acquisitionFileDetailsTab).Click(); + } + public void CreateMinimumAcquisitionFile(AcquisitionFile acquisition) { Wait(); @@ -145,7 +152,7 @@ public void CreateMinimumAcquisitionFile(AcquisitionFile acquisition) ChooseSpecificSelectOption(acquisitionFileDetailsTypeSelect, acquisition.AcquisitionType); Wait(); - ChooseSpecificSelectOption(acquisitionFileDetailsRegionSelect, acquisition.MOTIRegion); + ChooseSpecificSelectOption(acquisitionFileDetailsRegionSelect, acquisition.AcquisitionMOTIRegion); } public void EditAcquisitionFileDetails() @@ -216,8 +223,8 @@ public void UpdateAcquisitionFile(AcquisitionFile acquisition) ChooseSpecificSelectOption(acquisitionFileDetailsTypeSelect, acquisition.AcquisitionType); Wait(); - if (acquisition.MOTIRegion != "") - ChooseSpecificSelectOption(acquisitionFileDetailsRegionSelect, acquisition.MOTIRegion); + if (acquisition.AcquisitionMOTIRegion != "") + ChooseSpecificSelectOption(acquisitionFileDetailsRegionSelect, acquisition.AcquisitionMOTIRegion); Wait(); if (acquisition.AcquisitionStatus != "") @@ -245,6 +252,13 @@ public void UpdateAcquisitionFile(AcquisitionFile acquisition) ClearInput(acquisitionFileProjectOtherFundingInput); webDriver.FindElement(acquisitionFileProjectOtherFundingInput).SendKeys(acquisition.AcquisitionFundingOther); + if (acquisition.AssignedDate != "") + { + ClearInput(acquisitionFileAssignedDateInput); + webDriver.FindElement(acquisitionFileAssignedDateInput).SendKeys(acquisition.AssignedDate); + webDriver.FindElement(acquisitionFileAssignedDateInput).SendKeys(Keys.Enter); + } + if (acquisition.DeliveryDate != "") { ClearInput(acquisitionFileDeliveryDateInput); diff --git a/testing/PIMS.Tests.Automation/PageObjects/Contacts.cs b/testing/PIMS.Tests.Automation/PageObjects/Contacts.cs index 5fbf56e2f3..74cecbd660 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/Contacts.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/Contacts.cs @@ -178,7 +178,7 @@ public Contacts(IWebDriver webDriver) : base(webDriver) //Navigates to Create a new Contact public void NavigateToCreateNewContact() { - Wait(); + Wait(5000); webDriver.FindElement(menuContactsButton).Click(); Wait(); diff --git a/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs b/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs index b5d90effa9..0e6b53e095 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/DigitalDocuments.cs @@ -341,7 +341,7 @@ public void AddNewDocument(string fileType) public void VerifyDocumentFields(string documentType) { - Wait(4000); + Wait(5000); ChooseSpecificSelectOption(documentUploadDocTypeModalSelect, documentType); Wait(); @@ -413,7 +413,7 @@ public void VerifyDocumentFields(string documentType) public void VerifyDocumentsListView(string fileType) { Wait(); - if (fileType == "Lease") + if (fileType.Equals("Lease") || fileType.Equals("CDOGS Templates")) { Assert.True(webDriver.FindElement(documentsLeasesTitle).Displayed); Assert.True(webDriver.FindElement(addDocumentLeasesBttn).Displayed); diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeaseDeposits.cs b/testing/PIMS.Tests.Automation/PageObjects/LeaseDeposits.cs index 22218cee9c..2103a19878 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/LeaseDeposits.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/LeaseDeposits.cs @@ -1,10 +1,7 @@  using OpenQA.Selenium; -using OpenQA.Selenium.DevTools.V110.IndexedDB; using PIMS.Tests.Automation.Classes; -using System; -using System.Globalization; namespace PIMS.Tests.Automation.PageObjects { diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs b/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs index 2c9a1554d8..e00dbf3f5d 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs @@ -198,7 +198,6 @@ public void NavigateToCreateNewLicense() webDriver.FindElement(createLicenseButton).Click(); } - //Covers all fields on License Details public void CreateLicenseDetails(Lease lease) { Wait(); @@ -552,7 +551,7 @@ public void UpdateLeaseFileDetails(Lease lease) webDriver.FindElement(licenseDetailsNotesTextarea).SendKeys(lease.LeaseNotes); } - public void EditLeaseFileDetails() + public void EditLeaseFileDetailsBttn() { Wait(); webDriver.FindElement(licenseDetailsEditIcon).Click(); diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeaseImprovements.cs b/testing/PIMS.Tests.Automation/PageObjects/LeaseImprovements.cs index bf7fbce9ed..6e55f481a8 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/LeaseImprovements.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/LeaseImprovements.cs @@ -21,24 +21,24 @@ public class LeaseImprovements : PageObjectBase private By licenseImprovResidentialSubtitle = By.XPath("//div[contains(text(),'Other Improvements')]/parent::div/parent::h2"); private By licenseImprovResidentialUnitNbrLabel = By.XPath("//div[contains(text(),'Residential')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Unit #')]"); private By licenceImprovResidentialUnitNbrInput = By.Id("input-improvements.1.address"); - private By licenseImprovResidentialUnitContent = By.Id("input-improvements.2.address"); + //private By licenseImprovResidentialUnitContent = By.Id("input-improvements.2.address"); private By licenseImprovResidentialSizeLabel = By.XPath("//div[contains(text(),'Residential')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Building size')]"); private By licenceImprovResidentialSizeInput = By.Id("input-improvements.1.structureSize"); - private By licenseImprovResidentialSizeContent = By.Id("input-improvements.2.structureSize"); + //private By licenseImprovResidentialSizeContent = By.Id("input-improvements.2.structureSize"); private By licenseImprovResidentialDescriptionLabel = By.XPath("//div[contains(text(),'Residential')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Description')]"); private By licenseImprovResidentialDescriptionTextarea = By.Id("input-improvements.1.description"); - private By licenseImprovResidentialDescriptionContent = By.Id("input-improvements.2.description"); + //private By licenseImprovResidentialDescriptionContent = By.Id("input-improvements.2.description"); private By licenseImprovOtherSubtitle = By.XPath("//div[contains(text(),'Other Improvements')]/parent::div/parent::h2"); private By licenseImprovOtherlUnitNbrLabel = By.XPath("//div[contains(text(),'Other Improvements')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Unit #')]"); private By licenceImprovOtherUnitNbrInput = By.Id("input-improvements.2.address"); - private By licenseImprovOtherUnitNbrContent = By.Id("input-improvements.1.address"); + //private By licenseImprovOtherUnitNbrContent = By.Id("input-improvements.1.address"); private By licenseImprovOtherSizeLabel = By.XPath("//div[contains(text(),'Other Improvements')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Building size')]"); private By licenceImprovOtherSizeInput = By.Id("input-improvements.2.structureSize"); - private By licenseImprovOtherSizeContent = By.Id("input-improvements.1.structureSize"); + //private By licenseImprovOtherSizeContent = By.Id("input-improvements.1.structureSize"); private By licenseImprovOtherDescriptionLabel = By.XPath("//div[contains(text(),'Other Improvements')]/parent::div/parent::h2/following-sibling::div/div/div/label[contains(text(),'Description')]"); private By licenceImprovOtherDescriptionTextarea = By.Id("input-improvements.2.description"); - private By licenseImprovOtherDescriptionContent = By.Id("input-improvements.1.description"); + //private By licenseImprovOtherDescriptionContent = By.Id("input-improvements.1.description"); private By licenseImproSaveButton = By.XPath("//button/div[contains(text(),'Save')]/ancestor::button"); @@ -157,19 +157,19 @@ public void VerifyImprovementView(Lease lease) { Assert.True(webDriver.FindElement(licenseImprovResidentialSubtitle).Displayed); Assert.True(webDriver.FindElement(licenseImprovResidentialUnitNbrLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovResidentialUnitContent).GetAttribute("value") == lease.ResidentialImprovementUnit); + Assert.True(webDriver.FindElement(licenceImprovResidentialUnitNbrInput).GetAttribute("value") == lease.ResidentialImprovementUnit); } if (lease.ResidentialImprovementBuildingSize != "") { Assert.True(webDriver.FindElement(licenseImprovResidentialSizeLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovResidentialSizeContent).GetAttribute("value") == lease.ResidentialImprovementBuildingSize); + Assert.True(webDriver.FindElement(licenceImprovResidentialSizeInput).GetAttribute("value") == lease.ResidentialImprovementBuildingSize); } if (lease.ResidentialImprovementDescription != "") { Assert.True(webDriver.FindElement(licenseImprovResidentialDescriptionLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovResidentialDescriptionContent).Text == lease.ResidentialImprovementDescription); + Assert.True(webDriver.FindElement(licenseImprovResidentialDescriptionTextarea).Text == lease.ResidentialImprovementDescription); } //Other Improvements @@ -177,19 +177,19 @@ public void VerifyImprovementView(Lease lease) { Assert.True(webDriver.FindElement(licenseImprovOtherSubtitle).Displayed); Assert.True(webDriver.FindElement(licenseImprovOtherlUnitNbrLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovOtherUnitNbrContent).GetAttribute("value") == lease.OtherImprovementUnit); + Assert.True(webDriver.FindElement(licenceImprovOtherUnitNbrInput).GetAttribute("value") == lease.OtherImprovementUnit); } if (lease.OtherImprovementBuildingSize != "") { Assert.True(webDriver.FindElement(licenseImprovOtherSizeLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovOtherSizeContent).GetAttribute("value") == lease.OtherImprovementBuildingSize); + Assert.True(webDriver.FindElement(licenceImprovOtherSizeInput).GetAttribute("value") == lease.OtherImprovementBuildingSize); } if (lease.OtherImprovementDescription != "") { Assert.True(webDriver.FindElement(licenseImprovOtherDescriptionLabel).Displayed); - Assert.True(webDriver.FindElement(licenseImprovOtherDescriptionContent).Text == lease.OtherImprovementDescription); + Assert.True(webDriver.FindElement(licenceImprovOtherDescriptionTextarea).Text == lease.OtherImprovementDescription); } } diff --git a/testing/PIMS.Tests.Automation/PageObjects/LeasePayments.cs b/testing/PIMS.Tests.Automation/PageObjects/LeasePayments.cs index bb7e5928b1..349cef758d 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/LeasePayments.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/LeasePayments.cs @@ -181,6 +181,9 @@ public void AddPayment(Payment payment) ChooseSpecificSelectOption(licensePaymentMethodSelect, payment.PaymentMethod); webDriver.FindElement(licensePaymentAmountReceivedInput).SendKeys(payment.PaymentTotalReceived); + webDriver.FindElement(licensePaymentAmountReceivedInput).Click(); + webDriver.FindElement(licensePaymentExpPaymentInput).Click(); + webDriver.FindElement(licensePaymentGSTInput).Click(); ButtonElement("Save payment"); diff --git a/testing/PIMS.Tests.Automation/PageObjects/ManageUsers.cs b/testing/PIMS.Tests.Automation/PageObjects/ManageUsers.cs index 498dad3a11..d6fe199922 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/ManageUsers.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/ManageUsers.cs @@ -43,7 +43,7 @@ public ManageUsers(IWebDriver webDriver) : base(webDriver) public void NavigateAdminTools() { - Wait(); + Wait(5000); webDriver.FindElement(mainMenuAdminToolLink).Click(); } diff --git a/testing/PIMS.Tests.Automation/PageObjects/Notes.cs b/testing/PIMS.Tests.Automation/PageObjects/Notes.cs index 878dc1c47f..dcd221f7f1 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/Notes.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/Notes.cs @@ -80,7 +80,7 @@ public void NavigateNotesTab() public void CreateNotesTabButton() { - Wait(); + Wait(5000); webDriver.FindElement(notesTabAddBttn).Click(); } diff --git a/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs b/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs index ec9ebb7cce..3ebe3a5387 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs @@ -13,7 +13,7 @@ protected PageObjectBase(IWebDriver webDriver) this.webDriver = webDriver; } - public virtual void Wait(int milliseconds = 3000) => Thread.Sleep(milliseconds); + public virtual void Wait(int milliseconds = 4000) => Thread.Sleep(milliseconds); public void WaitUntil(By element) { diff --git a/testing/PIMS.Tests.Automation/PageObjects/PropertyInformation.cs b/testing/PIMS.Tests.Automation/PageObjects/PropertyInformation.cs index f01211625d..2376654241 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/PropertyInformation.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/PropertyInformation.cs @@ -419,6 +419,7 @@ public void UpdatePropertyDetails(Property property) ClearMultiSelectInput(propertyDetailsRoadEstablishInput); foreach (string status in property.HighwayEstablishedBy) { + Wait(); FocusAndClick(propertyDetailsRoadEstablishInput); ChooseMultiSelectSpecificOption(propertyDetailsRoadEstablishOptions, status); } diff --git a/testing/PIMS.Tests.Automation/PageObjects/ResearchFiles.cs b/testing/PIMS.Tests.Automation/PageObjects/ResearchFiles.cs index 645c351176..6d0763c146 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/ResearchFiles.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/ResearchFiles.cs @@ -305,7 +305,7 @@ public void AddPropertyResearchInfo(PropertyResearch propertyResearch, int index if (propertyResearch.Purpose != "") { webDriver.FindElement(researchPropertyPurposeSelect).Click(); - Wait(); + Wait(5000); ChooseMultiSelectSpecificOption(researchPropertyPurposeOptions, propertyResearch.Purpose); } if (propertyResearch.LegalOpinionRequest != "") @@ -752,12 +752,12 @@ private void VerifyResearchFileHeader(ResearchFile researchFile, string user) Assert.True(webDriver.FindElement(researchFileHeaderDistrictLabel).Displayed); Assert.True(webDriver.FindElement(researchFileHeaderCreatedLabel).Displayed); - Assert.True(webDriver.FindElement(researchFileHeaderCreatedDateContent).Text.Equals(GetTodayFormattedDate())); + //Assert.True(webDriver.FindElement(researchFileHeaderCreatedDateContent).Text.Equals(GetTodayFormattedDate())); Assert.True(webDriver.FindElement(researchFileHeaderCreatedByContent).Text.Equals(user)); Assert.True(webDriver.FindElement(researchFileHeaderLastUpdatedLabel).Displayed); - Assert.True(webDriver.FindElement(researchFileHeaderLastUpdatedDateContent).Text.Equals(GetTodayFormattedDate())); + //Assert.True(webDriver.FindElement(researchFileHeaderLastUpdatedDateContent).Text.Equals(GetTodayFormattedDate())); Assert.True(webDriver.FindElement(researchFileHeaderLastUpdatedByContent).Text.Equals(user)); Assert.True(webDriver.FindElement(researchFileHeaderStatusLabel).Displayed); diff --git a/testing/PIMS.Tests.Automation/PageObjects/SearchAcquisitionFiles.cs b/testing/PIMS.Tests.Automation/PageObjects/SearchAcquisitionFiles.cs index 9f6bb79e35..9f65835e5c 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/SearchAcquisitionFiles.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/SearchAcquisitionFiles.cs @@ -159,7 +159,7 @@ public void VerifyAcquisitionFileTableContent(AcquisitionFile acquisition) Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultLink).Displayed); Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultHistoricalFile).Text.Equals(acquisition.HistoricalFileNumber)); Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultName).Text.Equals(acquisition.AcquisitionFileName)); - Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultMOTIRegion).Text.Equals(acquisition.MOTIRegion)); + Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultMOTIRegion).Text.Equals(acquisition.AcquisitionMOTIRegion)); Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultProject).Text.Equals(acquisition.AcquisitionProjCode + " " + acquisition.AcquisitionProject)); Assert.True(webDriver.FindElements(searchAcquisitionFile1stResultAddress).Count() > 0); Assert.True(webDriver.FindElement(searchAcquisitionFile1stResultStatus).Text.Equals(acquisition.AcquisitionStatus)); diff --git a/testing/PIMS.Tests.Automation/PageObjects/SearchContacts.cs b/testing/PIMS.Tests.Automation/PageObjects/SearchContacts.cs index 59a5d46a44..d8bb192923 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/SearchContacts.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/SearchContacts.cs @@ -97,7 +97,7 @@ public void SelectFirstResultLink() //Click on Create new contact public void CreateNewContactFromSearch() { - Wait(); + Wait(4000); ButtonElement("Add new contact"); } diff --git a/testing/PIMS.Tests.Automation/PageObjects/SearchLease.cs b/testing/PIMS.Tests.Automation/PageObjects/SearchLease.cs index 51fbff624c..b9e38b7a90 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/SearchLease.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/SearchLease.cs @@ -62,7 +62,7 @@ public SearchLease(IWebDriver webDriver) : base(webDriver) //Navigates to Search a Lease/License public void NavigateToSearchLicense() { - Wait(); + Wait(5000); webDriver.FindElement(menuManagementButton).Click(); Wait(); diff --git a/testing/PIMS.Tests.Automation/PageObjects/SharedSearchProperties.cs b/testing/PIMS.Tests.Automation/PageObjects/SharedSearchProperties.cs index 9b337bc2de..36865508cc 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/SharedSearchProperties.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/SharedSearchProperties.cs @@ -186,15 +186,15 @@ public void DeleteProperty() Assert.True(PropertiesTotal - PropertiesLeft == 1); } - public void SelectFirstOption() + public void SelectFirstOption(Boolean isDuplicateTest) { WaitUntil(searchProperties1stResultPropDiv); FocusAndClick(searchProperties1stResultPropCheckbox); - Wait(); + Wait(5000); ButtonElement("Add to selection"); - if (webDriver.FindElements(generalToastBody).Count() > 0) + if (webDriver.FindElements(generalToastBody).Count() > 0 && isDuplicateTest) { Assert.True(sharedModals.ToastifyText().Equals("A property that the user is trying to select has already been added to the selected properties list")); } diff --git a/testing/PIMS.Tests.Automation/PageObjects/SharedSelectContact.cs b/testing/PIMS.Tests.Automation/PageObjects/SharedSelectContact.cs index 4d9ed57ecf..3b76f50180 100644 --- a/testing/PIMS.Tests.Automation/PageObjects/SharedSelectContact.cs +++ b/testing/PIMS.Tests.Automation/PageObjects/SharedSelectContact.cs @@ -16,7 +16,7 @@ public SharedSelectContact(IWebDriver webDriver) : base(webDriver) public void SelectContact(string contactSearchName) { - Wait(5000); + Wait(10000); webDriver.FindElement(selectContactSearchInput).SendKeys(contactSearchName); webDriver.FindElement(selectContactSearchButton).Click(); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs index ffd707832f..e7f2cacbad 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/AcquisitionFileSteps.cs @@ -32,6 +32,7 @@ public AcquisitionFileSteps(BrowserDriver driver) sharedSearchProperties = new SharedSearchProperties(driver.Current); searchProperties = new SearchProperties(driver.Current); propertyInformation = new PropertyInformation(driver.Current); + notes = new Notes(driver.Current); acquisitionFile = new AcquisitionFile(); } @@ -63,7 +64,8 @@ public void CreateAcquisitionFile(int rowNumber) [StepDefinition(@"I add additional information to the Acquisition File")] public void AddAdditionalInfoAcquisitionFile() { - /* TEST COVERAGE: PSP-4163, PSP-4323, PSP-4471, PSP-4553, PSP-4331, PSP-4469, PSP-5308, PSP-4327, PSP-4163, PSP-4593, PSP-4334, PSP-4329, PSP-4328, PSP-4327, PSP-4326, PSP-4325 */ + /* TEST COVERAGE: PSP-4163, PSP-4323, PSP-4325, PSP-4326, PSP-4327, PSP-4328, PSP-4329, PSP-4331, PSP-4334, PSP-4469, PSP-4471, PSP-4553, PSP-4593, PSP-5308, PSP-5589, + * PSP-5590, PSP-5790, PSP-6041, PSP-6268 */ //Enter to Edit mode of Acquisition File acquisitionFiles.EditAcquisitionFileDetails(); @@ -77,7 +79,14 @@ public void AddAdditionalInfoAcquisitionFile() //Validate View File Details View Mode acquisitionFiles.VerifyAcquisitionFileView(acquisitionFile); - //Navigate to Edit Research File + //Verify automatic note created when + if (acquisitionFile.AcquisitionStatus != "Active") + { + notes.NavigateNotesTab(); + notes.VerifyAutomaticNotes("Acquisition File", "Active", acquisitionFile.AcquisitionStatus); + } + + //Navigate to Edit Acquisition File acquisitionFiles.NavigateToAddPropertiesAcquisitionFile(); //Navigate to Add Properties by search and verify Add Properties UI/UX @@ -88,42 +97,42 @@ public void AddAdditionalInfoAcquisitionFile() if (acquisitionFile.SearchProperties.PID != "") { sharedSearchProperties.SelectPropertyByPID(acquisitionFile.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by PIN if (acquisitionFile.SearchProperties.PIN != "") { sharedSearchProperties.SelectPropertyByPIN(acquisitionFile.SearchProperties.PIN); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Plan if (acquisitionFile.SearchProperties.PlanNumber != "") { sharedSearchProperties.SelectPropertyByPlan(acquisitionFile.SearchProperties.PlanNumber); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Address if (acquisitionFile.SearchProperties.Address != "") { sharedSearchProperties.SelectPropertyByAddress(acquisitionFile.SearchProperties.Address); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Legal Description if (acquisitionFile.SearchProperties.LegalDescription != "") { sharedSearchProperties.SelectPropertyByLegalDescription(acquisitionFile.SearchProperties.LegalDescription); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a duplicate property if (acquisitionFile.SearchProperties.PID != "") { sharedSearchProperties.SelectPropertyByPID(acquisitionFile.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(true); } //Save Research File @@ -273,7 +282,7 @@ public void EditAcquisitionFile(int rowNumber) //Search for a property by Legal Description sharedSearchProperties.NavigateToSearchTab(); sharedSearchProperties.SelectPropertyByLegalDescription(acquisitionFile.SearchProperties.LegalDescription); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); //Save changes acquisitionFiles.SaveAcquisitionFileProperties(); @@ -341,6 +350,7 @@ public void NewAcquisitionFileCreated() [StepDefinition(@"An existing Acquisition file has been edited successfully")] public void EditAcquisitionFileSuccess() { + acquisitionFiles.NavigateToFileDetailsTab(); acquisitionFiles.VerifyAcquisitionFileView(acquisitionFile); } @@ -360,23 +370,27 @@ private void PopulateAcquisitionFile(int rowNumber) DataTable acquisitionSheet = ExcelDataContext.GetInstance().Sheets["AcquisitionFiles"]; ExcelDataContext.PopulateInCollection(acquisitionSheet); - //Lease Details + //Acquisition Status acquisitionFile.AcquisitionStatus = ExcelDataContext.ReadData(rowNumber, "AcquisitionStatus"); + //Project acquisitionFile.AcquisitionProject = ExcelDataContext.ReadData(rowNumber, "AcquisitionProject"); acquisitionFile.AcquisitionProjCode = ExcelDataContext.ReadData(rowNumber, "AcquisitionProjCode"); acquisitionFile.AcquisitionProjProduct = ExcelDataContext.ReadData(rowNumber, "AcquisitionProjProduct"); acquisitionFile.AcquisitionProjFunding = ExcelDataContext.ReadData(rowNumber, "AcquisitionProjFunding"); acquisitionFile.AcquisitionFundingOther = ExcelDataContext.ReadData(rowNumber, "AcquisitionFundingOther"); + //Schedule + acquisitionFile.AssignedDate = ExcelDataContext.ReadData(rowNumber, "AssignedDate"); acquisitionFile.DeliveryDate = ExcelDataContext.ReadData(rowNumber, "DeliveryDate"); acquisitionFile.AcquisitionCompletedDate = ExcelDataContext.ReadData(rowNumber, "AcquisitionCompletedDate"); + //Acquisition Details acquisitionFile.AcquisitionFileName = ExcelDataContext.ReadData(rowNumber, "AcquisitionFileName"); acquisitionFile.HistoricalFileNumber = ExcelDataContext.ReadData(rowNumber, "HistoricalFileNumber"); acquisitionFile.PhysicalFileStatus = ExcelDataContext.ReadData(rowNumber, "PhysicalFileStatus"); acquisitionFile.AcquisitionType = ExcelDataContext.ReadData(rowNumber, "AcquisitionType"); - acquisitionFile.MOTIRegion = ExcelDataContext.ReadData(rowNumber, "MOTIRegion"); + acquisitionFile.AcquisitionMOTIRegion = ExcelDataContext.ReadData(rowNumber, "AcquisitionMOTIRegion"); acquisitionFile.AcquisitionTeamStartRow = int.Parse(ExcelDataContext.ReadData(rowNumber, "AcquisitionTeamStartRow")); acquisitionFile.AcquisitionTeamCount = int.Parse(ExcelDataContext.ReadData(rowNumber, "AcquisitionTeamCount")); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/AdminToolSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/AdminToolSteps.cs index 2149e81c36..8ab4b762d6 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/AdminToolSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/AdminToolSteps.cs @@ -90,7 +90,7 @@ public void UserManagement() [StepDefinition(@"I create a CDOGS template")] public void CDOGSTemplate() { - /* TEST COVERAGE: PSP-4667, PSP-4668, PSP-4677, PSP-4681, PSP-5329 */ + /* TEST COVERAGE: PSP-4667, PSP-4668, PSP-4677, PSP-4680, PSP-4681, PSP-5329 */ //Login to PIMS loginSteps.Idir(userName); @@ -116,6 +116,9 @@ public void CDOGSTemplate() //Save new template digitalDocuments.SaveDigitalDocument(); + //Verify Document List + digitalDocuments.VerifyDocumentsListView("CDOGS Templates"); + //Add new template cdogsTemplates.AddNewTemplate(); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/ContactsSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/ContactsSteps.cs index c1bd4d7f48..89dd764d64 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/ContactsSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/ContactsSteps.cs @@ -22,8 +22,8 @@ public ContactsSteps(BrowserDriver driver) loginSteps = new LoginSteps(driver); contacts = new Contacts(driver.Current); searchContacts = new SearchContacts(driver.Current); - individualContact = new IndividualContact(); - organizationContact = new OrganizationContact(); + //individualContact = new IndividualContact(); + //organizationContact = new OrganizationContact(); } [StepDefinition(@"I create a new Individual Contact from row number (.*)")] @@ -260,6 +260,7 @@ private void PopulateIndividualContact(int rowNumber) DataTable individualContactSheet = ExcelDataContext.GetInstance().Sheets["IndividualContacts"]; ExcelDataContext.PopulateInCollection(individualContactSheet); + individualContact = new IndividualContact(); individualContact.FirstName = ExcelDataContext.ReadData(rowNumber, "FirstName"); individualContact.MiddleName = ExcelDataContext.ReadData(rowNumber, "MiddleName"); individualContact.LastName = ExcelDataContext.ReadData(rowNumber, "LastName"); @@ -320,6 +321,7 @@ private void PopulateOrganizationContact(int rowNumber) DataTable organizationContactSheet = ExcelDataContext.GetInstance().Sheets["OrganizationContacts"]; ExcelDataContext.PopulateInCollection(organizationContactSheet); + organizationContact = new OrganizationContact(); organizationContact.OrganizationName = ExcelDataContext.ReadData(rowNumber, "OrganizationName"); organizationContact.Alias = ExcelDataContext.ReadData(rowNumber, "Alias"); organizationContact.IncorporationNumber = ExcelDataContext.ReadData(rowNumber, "IncorporationNumber"); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs index de4b3bf626..6a8061511d 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/DigitalDocumentSteps.cs @@ -26,8 +26,8 @@ public DigitalDocumentSteps(BrowserDriver driver) [StepDefinition(@"I create Digital Documents for a ""(.*)"" row number (.*)")] public void DocumentTabCreate(string fileType, int rowNumber) { - /* TEST COVERAGE: PSP-4159, PSP-4339, PSP-4340, PSP-4341 PSP-4342, PSP-4343, PSP-4344, PSP-4345, PSP-4346, PSP-4347, PSP-4348, PSP-4349, PSP-4350, PSP-4351, PSP-4352, PSP-4353, - * PSP-4354, PSP-4355, PSP-4356, PSP-4357 */ + /* TEST COVERAGE: PSP-4159, PSP-4172, PSP-4339, PSP-4340, PSP-4341 PSP-4342, PSP-4343, PSP-4344, PSP-4345, PSP-4346, PSP-4347, PSP-4348, PSP-4349, PSP-4350, PSP-4351, PSP-4352, PSP-4353, + * PSP-4354, PSP-4355, PSP-4356, PSP-4357, PSP-5208, PSP-5435, PSP-5421, PSP-5440, PSP-5755, PSP-5766, PSP-5929, PSP-6018, PSP-6211 */ //Access the documents tab digitalDocumentsTab.NavigateDocumentsTab(); @@ -67,7 +67,7 @@ public void DocumentTabCreate(string fileType, int rowNumber) [StepDefinition(@"I edit a Digital Document for a ""(.*)"" from row number (.*)")] public void UpdateDigitalDocuments(string fileType, int rowNumber) { - /* TEST COVERAGE: PSP-4030, PSP-4168, PSP-4335, PSP-4336, PSP-4338 */ + /* TEST COVERAGE: PSP-4030, PSP-4168, PSP-4335, PSP-4336, PSP-4338, PSP-5417, PSP-5418, PSP-5420, PSP-5436, PSP-5437, PSP-5439, PSP-5762, PSP-5765, PSP-5930 */ //Access the documents tab digitalDocumentsTab.NavigateDocumentsTab(); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs index e6ae47bbcf..101803cb37 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/LeaseLicenseSteps.cs @@ -50,12 +50,12 @@ public LeaseLicenseSteps(BrowserDriver driver) public void CreateLeaseLicense(int rowNumber) { /* TEST COVERAGE: - * Lease Details: PSP-2550, PSP-1966, PSP-5100, PSP-5334, PSP-5335, PSP-5336, PSP-5337, PSP-5338, PSP-5340, PSP-5340, PSP-4558, PSP-2644 - * Tenants: PSP-3495, PSP-3496, PSP-3498, PSP-3499 + * Lease Details: PSP-1966, PSP-2550, PSP-2644, PSP-4558, PSP-5100, PSP-5245, PSP-5334, PSP-5335, PSP-5336, PSP-5337, PSP-5338, PSP-5340, PSP-5654, PSP-5668, PSP-5923, PSP-6266 + * Tenants: PSP-3492, PSP-3494, PSP-3495, PSP-3496, PSP-3498, PSP-3499 * Improvements: PSP-2637, PSP-2640 - * Insurance: PSP-2677, PSP-2099 + * Insurance: PSP-2099, PSP-2677 * Deposits: PSP-2094, PSP-2921, PSP-2922 - * Payments: PSP-2755, PSP-2915, PSP-2918, PSP-2927, PSP-2815 + * Payments: PSP-2755, PSP-2815, PSP-2915, PSP-2918, PSP-2927 * Surplus: PSP-2157 */ @@ -83,21 +83,21 @@ public void CreateLeaseLicense(int rowNumber) if (lease.SearchProperties.PID != "") { sharedSearchProperties.SelectPropertyByPID(lease.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by PIN if (lease.SearchProperties.PIN != "") { sharedSearchProperties.SelectPropertyByPIN(lease.SearchProperties.PIN); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Plan if (lease.SearchProperties.PlanNumber != "") { sharedSearchProperties.SelectPropertyByPlan(lease.SearchProperties.PlanNumber); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } @@ -105,21 +105,21 @@ public void CreateLeaseLicense(int rowNumber) if (lease.SearchProperties.Address != "") { sharedSearchProperties.SelectPropertyByAddress(lease.SearchProperties.Address); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Legal Description if (lease.SearchProperties.LegalDescription != "") { sharedSearchProperties.SelectPropertyByLegalDescription(lease.SearchProperties.LegalDescription); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a duplicate property if (lease.SearchProperties.PID != "") { sharedSearchProperties.SelectPropertyByPID(lease.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(true); } //Save the new license details @@ -347,7 +347,7 @@ public void CreateLeaseGreenPin(int rowNumber) leaseDetails.VerifyLicenseHeader(); //Insert an update - leaseDetails.EditLeaseFileDetails(); + leaseDetails.EditLeaseFileDetailsBttn(); leaseDetails.UpdateLeaseFileDetails(lease); //Cancel changes @@ -433,7 +433,7 @@ public void CreateLeasePurplePin(int rowNumber) [StepDefinition(@"I update an existing lease from row number (.*)")] public void UpdateExistingLease(int rowNumber) { - /* TEST COVERAGE: PSP-2096, PSP-2637, PSP-2638, PSP-2642, PSP-2923, PSP-4195, PSP-4196, PSP-4558, PSP-5161, PSP-5342 */ + /* TEST COVERAGE: PSP-2096, PSP-2637, PSP-2638, PSP-2642, PSP-2923, PSP-4195, PSP-4196, PSP-4558, PSP-5161, PSP-5342, PSP-5667, PSP-5924 */ //Login to PIMS loginSteps.Idir(userName); @@ -448,7 +448,7 @@ public void UpdateExistingLease(int rowNumber) //FILE DETAILS //Edit File Details Section PopulateLeaseLicense(rowNumber); - leaseDetails.EditLeaseFileDetails(); + leaseDetails.EditLeaseFileDetailsBttn(); //Verify the edit File details form leaseDetails.VerifyLicenseDetailsUpdateForm(); diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs index 21499df1f3..4d6d902bcf 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/PropertiesSteps.cs @@ -15,8 +15,7 @@ public class PropertiesSteps private PropertyInformation propertyInformation; private readonly GenericSteps genericSteps; - //private readonly string userName = "TRANPSP1"; - private readonly string userName = "sutairak"; + private readonly string userName = "TRANPSP1"; private Property property; private SearchProperty searchProperty; @@ -152,26 +151,6 @@ public void EditPropertyInformationDetails(int rowNumber) } - //[StepDefinition(@"I update a Property details from row number (.*)")] - //public void UpdatePropertyDetailsFromFile(int rowNumber) - //{ - // /* TEST COVERAGE: */ - - // //Navigate to Property Information Tab - // propertyInformation.NavigatePropertyDetailsTab(); - - // //Click on the Edit Property Information Button - // //propertyInformation.EditPropertyInfoResearchBttn(); - // propertyInformation.EditPropertyInfoBttn(); - - // //Insert some changes - // PopulateProperty(rowNumber); - // propertyInformation.UpdatePropertyDetails(property); - - // //Save changes - // propertyInformation.SavePropertyDetails(); - //} - [StepDefinition(@"LTSA Pop-up Information validation is successful")] public void ValidateLTSAPopUp() { diff --git a/testing/PIMS.Tests.Automation/StepDefinitions/ResearchFileSteps.cs b/testing/PIMS.Tests.Automation/StepDefinitions/ResearchFileSteps.cs index 5557276474..1b7fb5b32f 100644 --- a/testing/PIMS.Tests.Automation/StepDefinitions/ResearchFileSteps.cs +++ b/testing/PIMS.Tests.Automation/StepDefinitions/ResearchFileSteps.cs @@ -41,7 +41,7 @@ public ResearchFileSteps(BrowserDriver driver) public void CreateResearchFile(int rowNumber) { /* TEST COVERAGE: PSP-3266, PSP-3267, PSP-3357, PSP-3358, PSP-3367, PSP-3595, PSP-3596, PSP-3597, PSP-3598, PSP-3600, - * PSP-3721, PSP-3849, PSP-4333, PSP-4556, PSP-5360, PSP-5541, PSP-5545 */ + * PSP-3721, PSP-3849, PSP-4333, PSP-4556, PSP-5360, PSP-5541, PSP-5545, PSP-6303 */ //Login to PIMS loginSteps.Idir(userName); @@ -88,31 +88,31 @@ public void CreateResearchFile(int rowNumber) if (researchFile.SearchProperties.PID != "") { sharedSearchProperties.SelectPropertyByPID(researchFile.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by PIN if (researchFile.SearchProperties.PIN != "") { sharedSearchProperties.SelectPropertyByPIN(researchFile.SearchProperties.PIN); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Plan if (researchFile.SearchProperties.PlanNumber != "") { sharedSearchProperties.SelectPropertyByPlan(researchFile.SearchProperties.PlanNumber); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Address if (researchFile.SearchProperties.Address != "") { sharedSearchProperties.SelectPropertyByAddress(researchFile.SearchProperties.Address); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Search for a property by Legal Description if (researchFile.SearchProperties.LegalDescription != "") { sharedSearchProperties.SelectPropertyByLegalDescription(researchFile.SearchProperties.LegalDescription); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(false); } //Save Research File @@ -282,7 +282,7 @@ public void UpdateExistingResearchFile(int rowNumber) sharedSearchProperties.VerifySearchPropertiesFeature(); sharedSearchProperties.SelectPropertyByPID(researchFile.SearchProperties.PID); - sharedSearchProperties.SelectFirstOption(); + sharedSearchProperties.SelectFirstOption(true); //Delete first property sharedSearchProperties.DeleteProperty();