-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Task
- make the cypress test 5_3_People_Totals_Test.js work. It didn't work in the original implementation in Add total row to people table showing number of beneficiaries #730
- the following errors appear
1) People_Totals_Test
Should display totals row showing number of beneficiaries:
AssertionError: Timed out retrying after 4000ms: expected '<div>' to contain 'beneficiaries'
at Context.eval (webpack://*******/./cypress/e2e/1_feature_tests/5_3_People_Totals_Test.js:15:43)
2) People_Totals_Test
Should update totals when filtering:
AssertionError: Timed out retrying after 4000ms: Expected to find element: `input[type="search"]`, but never found it.
at Context.eval (webpack://*******/./cypress/e2e/1_feature_tests/5_3_People_Totals_Test.js:37:11)
I'm also adding part of the source for the people.php page. Use it to fix the test assertions.
For 1) note that the words "Total" and "beneficiaries" appear in different divs.
For 2) note that the search input has type="text" and name="search", and that the search text needs to be submitted by clicking the button.
Use GPT-5 to solve this.
<li>
<form method="post">
<div class="input-group form-inline search-group">
<div class="has-feedback">
<input type="text" class="form-control input-sm" data-testid='box-search' name="search" value="fdsafdsa">
<a class="fa fa-times-circle form-control-feedback" href="?action=people&resetsearch=true"></a> </div>
<span class="input-group-btn listSearchButtonDiv">
<button class="btn btn-sm btn-default" data-testid = "search-button" type="submit"><span class="fa fa-search"></span></button>
</span>
</div>
</form>
</li>
</ul>
<div class="fc"></div>
</div>
<div class="sticky-header-container">
<table class="table list-people" data-testid="table-people">
<thead>
<tr>
<th ><div >Surname</div></th>
<th ><div >Firstname</div></th>
<th ><div >Gender</div></th>
<th ><div >Age</div></th>
<th ><div >Refugee / Case ID</div></th>
<th ><div >Tokens</div></th>
<th ><div >Tags</div></th>
<th ><div >Comments</div></th>
<th ><div >Last Activity</div></th>
<th ><div > </div></th>
</tr>
<tr class="sorter-false firstline">
<th><div>Total</div></th>
<th><div>0 beneficiaries</div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th><div>Total</div></th>
<th><div>0 beneficiaries</div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
<th><div></div></th>
</tr>
</tfoot>
</table>
</div>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels