mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Bug Fixes: sortBy key and e2e hosts.spec.ts (#2506)
This commit is contained in:
parent
0510075398
commit
de1e73b5b4
4 changed files with 10 additions and 11 deletions
|
|
@ -61,12 +61,9 @@ describe(
|
|||
|
||||
// Go to host details page
|
||||
cy.get('button[title="Online"]').click();
|
||||
cy.waitUntil(
|
||||
() => {
|
||||
return cy.get("span.status").contains(/online/i);
|
||||
},
|
||||
{ timeout: 30000, interval: 1000 }
|
||||
);
|
||||
|
||||
cy.wait(3000); // eslint-disable-line cypress/no-unnecessary-waiting
|
||||
cy.get(".status").contains(/online/i);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ describe(
|
|||
// delete custom label
|
||||
cy.get(".manage-hosts__label-block button").last().click();
|
||||
|
||||
// Can't figure out how attach findByRole onto modal button
|
||||
// Can't use findByText because delete button under modal
|
||||
cy.wait(2000); // eslint-disable-line cypress/no-unnecessary-waiting
|
||||
cy.get(".manage-hosts__modal-buttons > .button--alert")
|
||||
.contains("button", /delete/i)
|
||||
.click();
|
||||
|
|
|
|||
|
|
@ -332,8 +332,11 @@ const ManageHostsPage = ({
|
|||
}
|
||||
};
|
||||
|
||||
const refetchHosts = (options: IHostCountLoadOptions) => {
|
||||
const refetchHosts = (options: IHostLoadOptions) => {
|
||||
retrieveHosts(options);
|
||||
if (options.sortBy) {
|
||||
delete options.sortBy;
|
||||
}
|
||||
retrieveHostCount(options);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ export interface ISortOption {
|
|||
export interface IHostCountLoadOptions {
|
||||
page?: number;
|
||||
perPage?: number;
|
||||
status?: string;
|
||||
selectedLabels?: string[];
|
||||
globalFilter?: string;
|
||||
status?: string;
|
||||
teamId?: number;
|
||||
policyId?: number;
|
||||
policyResponse?: string;
|
||||
selectedLabels?: string[];
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
|||
Loading…
Reference in a new issue