diff --git a/cypress/integration/all/app/hosts.spec.ts b/cypress/integration/all/app/hosts.spec.ts index a84685a6f0..c0a8f4106c 100644 --- a/cypress/integration/all/app/hosts.spec.ts +++ b/cypress/integration/all/app/hosts.spec.ts @@ -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); } ); diff --git a/cypress/integration/all/app/labelflow.spec.ts b/cypress/integration/all/app/labelflow.spec.ts index 81f0772f01..5b23996417 100644 --- a/cypress/integration/all/app/labelflow.spec.ts +++ b/cypress/integration/all/app/labelflow.spec.ts @@ -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(); diff --git a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx index 6b90facc7d..cf29e86fe3 100644 --- a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx +++ b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx @@ -332,8 +332,11 @@ const ManageHostsPage = ({ } }; - const refetchHosts = (options: IHostCountLoadOptions) => { + const refetchHosts = (options: IHostLoadOptions) => { retrieveHosts(options); + if (options.sortBy) { + delete options.sortBy; + } retrieveHostCount(options); }; diff --git a/frontend/services/entities/host_count.ts b/frontend/services/entities/host_count.ts index b575e8219e..ab80a8e333 100644 --- a/frontend/services/entities/host_count.ts +++ b/frontend/services/entities/host_count.ts @@ -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 {