Skip to content

Commit

Permalink
Ensure url is updated before going to edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Sep 6, 2024
1 parent 8d11abe commit 459ceed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions cypress/e2e/po/components/sortable-table.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ export default class SortableTablePo extends ComponentPo {
* @param searchText
* @returns
*/
filter(searchText: string) {
return this.filterComponent()
filter(searchText: string, checkQuery = false) {
const res = this.filterComponent()
.focus()
.clear()
.type(searchText);

if (checkQuery) {
cy.url().should('include', `q=${ searchText }`);
}

return res;
}

resetFilter() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/po/pages/explorer/config-map.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ConfigMapPagePo extends PagePo {
}

searchForConfigMap(name: string) {
return this.list().resourceTable().sortableTable().filter(name);
return this.list().resourceTable().sortableTable().filter(name, true);
}

title() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/po/pages/explorer/network-policy.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export class NetworkPolicyPagePo extends PagePo {
}

searchForNetworkPolicy(name: string) {
return this.list().resourceTable().sortableTable().filter(name);
return this.list().resourceTable().sortableTable().filter(name, true);
}
}

0 comments on commit 459ceed

Please sign in to comment.