Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSP-8536: Property Information Details - Historical File, Headers. #4071

Merged
merged 32 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9665127
Adding or improving list views and pagination
stairaku Mar 7, 2024
c05e012
Automation - changes based on Build updates
stairaku Mar 20, 2024
6add932
Automation changes based on build updates. Subdivision and Consolidat…
stairaku Mar 20, 2024
07f719a
Deleting unnecessary comments
stairaku Mar 21, 2024
47f64cf
Merge branch 'dev' into automation-branch
stairaku Mar 21, 2024
c701f04
Merge branch 'dev' into automation-branch
asanchezr Mar 21, 2024
7d5e289
Merge branch 'bcgov:dev' into automation-branch
stairaku Apr 8, 2024
eb1c216
Subdivision/ Consolidation - Alternative testing paths
stairaku Apr 8, 2024
76a7c3a
Merge branch 'automation-branch' of https://github.com/stairaku/PSP i…
stairaku Apr 8, 2024
96e57f4
Merge branch 'dev' into automation-branch
devinleighsmith Apr 9, 2024
916eb20
Merge branch 'bcgov:dev' into automation-branch
stairaku Apr 26, 2024
776a2cb
Updates based on last deployment to TST environment
stairaku Apr 26, 2024
2330f04
Merge branch 'automation-branch' of https://github.com/stairaku/PSP i…
stairaku Apr 26, 2024
c451179
Merge branch 'dev' into automation-branch
asanchezr Apr 26, 2024
a1d164a
Merge branch 'bcgov:dev' into automation-branch
stairaku May 1, 2024
e24f27d
Changes on automation based on IS79 changes
stairaku May 1, 2024
015cc53
Merge branch 'automation-branch' of https://github.com/stairaku/PSP i…
stairaku May 1, 2024
dc23850
Merge branch 'dev' into automation-branch
asanchezr May 3, 2024
b1df95f
Merge branch 'bcgov:dev' into automation-branch
stairaku May 10, 2024
7b93e47
Takes update
stairaku May 10, 2024
5bf203c
Takes update
stairaku May 10, 2024
10e9041
Merge branch 'bcgov:dev' into automation-branch
stairaku May 15, 2024
57a664d
Merge branch 'bcgov:dev' into automation-branch
stairaku May 27, 2024
48be88b
Merge branch 'bcgov:dev' into automation-branch
stairaku May 28, 2024
10e7d96
Merge branch 'bcgov:dev' into automation-branch
stairaku May 29, 2024
0968d7e
Merge branch 'bcgov:dev' into automation-branch
stairaku May 30, 2024
6b718b7
Merge branch 'bcgov:dev' into automation-branch
stairaku May 30, 2024
781122e
Merge branch 'bcgov:dev' into automation-branch
stairaku May 31, 2024
56581fa
Merge branch 'bcgov:dev' into automation-branch
stairaku May 31, 2024
8a7f006
Merge branch 'bcgov:dev' into automation-branch
stairaku Jun 3, 2024
845f0bb
Changes in Property Details - Historical File and Headers
stairaku Jun 3, 2024
ad363ef
Merge branch 'automation-branch' of https://github.com/stairaku/PSP i…
stairaku Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion testing/PIMS.Tests.Automation/Classes/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
{
public class Property
{
public string PID { get; set; } = null!;
public string PlanNumber { get; set; } = null!;
public string PropertyName { get; set; } = null!;
public Address Address { get; set; } = new Address();
public string GeneralLocation { get; set; } = null!;
public int HistoricalFileStartRow { get; set; } = 0;
public int HistoricalFileCount { get; set; } = 0;
public List<HistoricalFile> PropertyHistoricalFiles { get; set; } = new List<HistoricalFile>();
public string LegalDescription { get; set; } = null!;
public string MOTIRegion { get; set; } = null!;
public string HighwaysDistrict { get; set; } = null!;
public string ElectoralDistrict { get; set; } = null!;
Expand All @@ -15,7 +22,6 @@ public class Property
public List<string> TenureStatus { get; set; } = new List<string>();
public string ProvincialPublicHwy { get; set; } = null!;
public List<string> HighwayEstablishedBy { get; set; } = new List<string>();
public List<string> AdjacentLandType { get; set; } = new List<string>();
public string SqrMeters { get; set; } = null!;
public Boolean IsVolumetric { get; set; } = false;
public string Volume { get; set; } = null!;
Expand All @@ -37,6 +43,13 @@ public class Address
public string PostalCode { get; set; } = null!;
}

public class HistoricalFile
{
public string HistoricalFileNumber { get; set; } = null!;
public string HistoricalFileType { get; set; } = null!;
public string HistoricalFileOtherDetails { get; set; } = null!;
}

public class SearchProperty
{
public string PID { get; set; } = null!;
Expand Down
Binary file modified testing/PIMS.Tests.Automation/Data/PIMS_Testing_Data.xlsx
Binary file not shown.
4 changes: 2 additions & 2 deletions testing/PIMS.Tests.Automation/Features/Properties.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Feature: Properties
Property Inventory and Information Details test cases

Scenario: 01. Property Information Tab
Given I review a Property's Information
When I update a Property details from row number 3
Given I review a Property's Information from row number 3
When I update a Property details
Then A Property Information is saved successfully

Scenario: 02. Property PIMS Files Tab
Expand Down
4 changes: 2 additions & 2 deletions testing/PIMS.Tests.Automation/Features/Properties.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace PIMS.Tests.Automation.PageObjects
public class AcquisitionDetails : PageObjectBase
{
//Acquisition Files Menu Elements
private By menuAcquisitionButton = By.CssSelector("div[data-testid='nav-tooltip-acquisition'] a");
private readonly By menuAcquisitionButton = By.CssSelector("div[data-testid='nav-tooltip-acquisition'] a");
private By createAcquisitionFileButton = By.XPath("//a[contains(text(),'Create an Acquisition File')]");

private By acquisitionFileSummaryBttn = By.XPath("//div[contains(text(),'File Summary')]");
Expand All @@ -31,6 +31,7 @@ public class AcquisitionDetails : PageObjectBase
private By acquisitionFileHeaderLastUpdateContent = By.XPath("//strong[contains(text(), 'Updated')]/parent::span");
private By acquisitionFileHeaderLastUpdateByContent = By.XPath("//strong[contains(text(), 'Updated')]/parent::span/span[@id='userNameTooltip']/strong");
private By acquisitionFileHeaderHistoricalFileLabel = By.XPath("//label[contains(text(),'Historical File')]");
private By acquisitionFileHeaderHistoricalFileContent = By.XPath("//label[contains(text(),'Historical File #:')]/parent::strong/parent::div/following-sibling::div/div/span");
private By acquisitionHeaderStatusContent = By.XPath("//div[@class='col']/div/div[3]/div/div");

private By acquisitionFileStatusSelect = By.Id("input-fileStatusTypeCode");
Expand Down Expand Up @@ -370,6 +371,7 @@ public void VerifyAcquisitionFileView(AcquisitionFile acquisition)
AssertTrueContentEquals(acquisitionFileHeaderProductContent, acquisition.AcquisitionProjProductCode + " - " + acquisition.AcquisitionProjProduct);

AssertTrueIsDisplayed(acquisitionFileHeaderHistoricalFileLabel);
Assert.True(webDriver.FindElements(acquisitionFileHeaderHistoricalFileContent).Count > 0);

AssertTrueIsDisplayed(acquisitionFileHeaderCreatedDateLabel);
AssertTrueContentNotEquals(acquisitionFileHeaderCreatedDateContent, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public void VerifyDispositionFileView(DispositionFile disposition)
AssertTrueContentNotEquals(dispositionFileHeaderCodeContent, "");

AssertTrueIsDisplayed(dispositionFileHistoricalLabel);
//AssertTrueIsDisplayed(dispositionFileHistoricalContent);
Assert.True(webDriver.FindElements(dispositionFileHistoricalContent).Count > 0);

AssertTrueIsDisplayed(dispositionFileHeaderCreatedDateLabel);
AssertTrueContentNotEquals(dispositionFileHeaderCreatedDateContent, "");
Expand Down
6 changes: 3 additions & 3 deletions testing/PIMS.Tests.Automation/PageObjects/LeaseDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class LeaseDetails : PageObjectBase
private By licenseHeaderExpiryDateLabel = By.XPath("//label[contains(text(),'Lease Start')]/parent::strong/parent::div/following-sibling::div[2]/strong/label[contains(text(),'Expiry')]");
private By licenseHeaderExpiryDateContent = By.XPath("//label[contains(text(),'Lease Start')]/parent::strong/parent::div/following-sibling::div[3]/span");
private By licenseHeaderHistoricalFileLabel = By.XPath("//label[contains(text(),'Historical File')]");
private By licenseHeaderHistoricalFileContent = By.XPath("//label[contains(text(),'Historical File')]/parent::div/following-sibling::div/strong");
private By licenseHeaderHistoricalFileContent = By.XPath("//label[contains(text(),'Historical File #:')]/parent::strong/parent::div/following-sibling::div/div/span");

private By licenseHeaderCreatedLabel = By.XPath("//span/strong[contains(text(),'Created')]");
private By licenseHeaderCreatedContent = By.XPath("//strong[contains(text(),'Created')]/parent::span");
private By licenseHeaderCreatedByContent = By.XPath("//strong[contains(text(),'Created')]/parent::span/span[@data-testid='tooltip-icon-userNameTooltip']");
Expand Down Expand Up @@ -175,7 +176,6 @@ public class LeaseDetails : PageObjectBase
//Leases Modal Element
private By licenseDetailsConfirmationModal = By.CssSelector("div[class='modal-content']");
private By licenseDetailsConfirmationContent = By.CssSelector("div[class='modal-content'] p");
//private By licenseDetailsAcknowledgeContinueBttn = By.XPath("//button/div[contains(text(),'Acknowledge & Continue')]");

private SharedFileProperties sharedSearchProperties;
private SharedModals sharedModals;
Expand Down Expand Up @@ -617,7 +617,7 @@ public void VerifyLicenseHeader(Lease lease)
AssertTrueIsDisplayed(licenseHeaderExpiryDateLabel);
AssertTrueIsDisplayed(licenseHeaderExpiryDateContent);
AssertTrueIsDisplayed(licenseHeaderHistoricalFileLabel);
//AssertTrueIsDisplayed(licenseHeaderHistoricalFileContent);
Assert.True(webDriver.FindElements(licenseHeaderHistoricalFileContent).Count > 0);
AssertTrueIsDisplayed(licenseHeaderCreatedLabel);
AssertTrueContentNotEquals(licenseHeaderCreatedContent, "");
AssertTrueContentNotEquals(licenseHeaderCreatedByContent, "");
Expand Down
20 changes: 9 additions & 11 deletions testing/PIMS.Tests.Automation/PageObjects/PageObjectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,24 @@ protected void AssertTrueIsDisplayed(By elementBy)
Assert.True(webDriver.FindElement(elementBy).Displayed);
}

protected void AssertTrueContentEquals(By elementBy, string text)
protected void AssertTrueContentEquals(By elementBy, string text = "")
{
WaitUntilVisible(elementBy);
Assert.Equal(text, webDriver.FindElement(elementBy).Text);
}

protected void AssertTrueElementValueEquals(By elementBy, string text)
protected void AssertTrueElementValueEquals(By elementBy, string text = "")
{
WaitUntilVisible(elementBy);
Assert.Equal(text, webDriver.FindElement(elementBy).GetAttribute("Value"));
}

protected void AssertTrueContentNotEquals(By elementBy, string text)
{
WaitUntilVisible(elementBy);
Assert.True(webDriver.FindElement(elementBy).Text != text);
}

protected void AssertTrueDoublesEquals(By elementBy, double number2)
{
WaitUntilVisible(elementBy);
Expand All @@ -200,12 +206,6 @@ protected void AssertTrueDoublesEquals(By elementBy, double number2)
Assert.True(number1.Equals(number2));
}

protected void AssertTrueContentNotEquals(By elementBy, string text)
{
WaitUntilVisible(elementBy);
Assert.True(webDriver.FindElement(elementBy).Text != text);
}

protected void AssertTrueElementContains(By elementBy, string text)
{
WaitUntilVisible(elementBy);
Expand Down Expand Up @@ -244,9 +244,7 @@ protected string TransformNumberFormat(string amount)


if (amount == "")
{
return "";
}
else
{
decimal value = decimal.Parse(amount);
Expand Down Expand Up @@ -327,7 +325,7 @@ protected string GetUppercaseString(string elementValue)

protected string GetSubstring(string input, int startIndex, int endIndex)
{
return input.Substring(startIndex, endIndex);
return input.Substring(startIndex, endIndex - startIndex);
}

public void Dispose()
Expand Down
Loading
Loading