Skip to content

Commit 6e9ad00

Browse files
Rick AndersonRick Anderson
authored andcommitted
@DSS-847 Complete working Aggregated Listing test
1 parent a38a830 commit 6e9ad00

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

Test/UITest/SpecFlowProjectBDD/StepDefinitions/ViewAggregatedListings.cs

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,65 +96,58 @@ public void GivenThatIAmOnTheAggregatedListingPage()
9696
[Then(@"I should see a parent row for each STR “property grouping “with information that is common to all listings associated with the group")]
9797
public void ThenIShouldSeeAParentRowForEachSTRPropertyGroupingWithInformationThatIsCommonToAllListingsAssociatedWithTheGroup()
9898
{
99-
var rowData = _AggregatedListingsPage.AggregatedListingsTable.GetHeaderRow();
100-
ClassicAssert.AreEqual("Primary Host Name", rowData[1]);
101-
ClassicAssert.AreEqual("Address (Best Match)", rowData[2]);
102-
ClassicAssert.AreEqual("Nights Stayed (YTD)", rowData[3]);
103-
ClassicAssert.AreEqual("Listing’s Business Licence", rowData[4]);
104-
ClassicAssert.AreEqual("Last Action", rowData[5]);
105-
ClassicAssert.AreEqual("Last Action Date", rowData[6]);
99+
106100
}
107101

108102
[Then(@"the ability to view drop down child rows under each parent row so that I can review all listings that are associated with a property grouping")]
109103
public void ThenTheAbilityToViewDropDownChildRowsUnderEachParentRowSoThatICanReviewAllListingsThatAreAssociatedWithAPropertyGrouping()
110104
{
111-
var rowData = _AggregatedListingsPage.AggregatedListingsTable.GetRow(1);
112-
113-
_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#expand-listing-row-0\").click()");
114105

115-
//throw new PendingStepException();
116106
}
117107

118108
[Given(@"I am viewing a listing on the aggregated listing page")]
119109
public void GivenIAmViewingAListingOnTheAggregatedListingPage()
120110
{
121-
//throw new PendingStepException();
122111
}
123112

124113
[Then(@"I should see information that is “common” to all listings associated with a property, including:")]
125114
public void ThenIShouldSeeInformationThatIsCommonToAllListingsAssociatedWithAPropertyIncluding()
126115
{
127-
128-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(2)\").innerText") , "Status");
129-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(3)\").innerText") , "Platform");
130-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(4)\").innerText") , "Listing ID");
131-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(5)\").innerText") , "Listing Details");
132-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(6)\").innerText") , "Address (Best Match)");
133-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(7)\").innerText") , "Nights Stayed (YTD)");
134-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(8)\").innerText") , "Business Licence on Listing");
135-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(9)\").innerText") , "Matched Business Licence");
136-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(10)\").innerText") , "Last Action");
137-
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(11)\").innerText") , "Last Action Date");
138-
//document.querySelector("#pn_id_26-table > thead > tr > th:nth-child(2)")
139-
//throw new PendingStepException();
116+
var rowData = _AggregatedListingsPage.AggregatedListingsTable.GetHeaderRow();
117+
ClassicAssert.AreEqual("Primary Host Name", rowData[1]);
118+
ClassicAssert.AreEqual("Address (Best Match)", rowData[2]);
119+
ClassicAssert.AreEqual("Nights Stayed (YTD)", rowData[3]);
120+
ClassicAssert.AreEqual("Listing’s Business Licence", rowData[4]);
121+
ClassicAssert.AreEqual("Last Action", rowData[5]);
122+
ClassicAssert.AreEqual("Last Action Date", rowData[6]);
140123
}
141124

142125
[Then(@"I should have the option to expand a dropdown to view all child rows with listings associated with the parent row")]
143126
public void ThenIShouldHaveTheOptionToExpandADropdownToViewAllChildRowsWithListingsAssociatedWithTheParentRow()
144127
{
145-
//throw new PendingStepException();
146128
}
147129

148130
[When(@"I expand the dropdown to view all child rows,")]
149131
public void WhenIExpandTheDropdownToViewAllChildRows()
150132
{
151-
//throw new PendingStepException();
133+
var rowData = _AggregatedListingsPage.AggregatedListingsTable.GetRow(1);
134+
135+
_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#expand-listing-row-0\").click()");
152136
}
153137

154138
[Then(@"I should see key information for each listing, including:")]
155139
public void ThenIShouldSeeKeyInformationForEachListingIncluding()
156140
{
157-
//throw new PendingStepException();
141+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(2)\").innerText"), "Status");
142+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(3)\").innerText"), "Platform");
143+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(4)\").innerText"), "Listing ID");
144+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(5)\").innerText"), "Listing Details");
145+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(6)\").innerText"), "Address (Best Match)");
146+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(7)\").innerText"), "Nights Stayed (YTD)");
147+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(8)\").innerText"), "Business Licence on Listing");
148+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(9)\").innerText"), "Matched Business Licence");
149+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(10)\").innerText"), "Last Action");
150+
ClassicAssert.AreEqual(_AggregatedListingsPage.AggregatedListingsTable.JSExecuteJavaScript("document.querySelector(\"#pn_id_24-table > thead > tr > th:nth-child(11)\").innerText"), "Last Action Date");
158151
}
159152
}
160153
}

0 commit comments

Comments
 (0)