From a6bb0e9771eec7067ba03582583c78ded6eed8ee Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 15 Oct 2021 06:44:55 +0800 Subject: [PATCH] mgr/dashboard: s/hosts.clickHostTab/hosts.clickTab/ this change is a follow-up fix of 3276147049511a9a8d45d84c95154a4ec014cd83 otherwise we have following test failure: [lint:tsc ] cypress/integration/orchestrator/01-hosts.e2e-spec.ts(29,13): error TS2339: Property 'clickHostTab' does not exist on type 'HostsPageHelper'. also change "host" to "hostname" to be more consistent Fixes: https://tracker.ceph.com/issues/52645 Signed-off-by: Kefu Chai --- .../integration/orchestrator/01-hosts.e2e-spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts.e2e-spec.ts index 465ca311002f7..5344fcaed3bed 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts.e2e-spec.ts @@ -22,11 +22,11 @@ describe('Hosts page', () => { }); it('should drain and delete a host and then add it back', function () { - const host = Cypress._.last(this.hosts)['name']; + const hostname = Cypress._.last(this.hosts)['name']; // should drain the host first before deleting - hosts.editLabels(host, ['_no_schedule'], true); - hosts.clickHostTab(host, 'Daemons'); + hosts.editLabels(hostname, ['_no_schedule'], true); + hosts.clickTab('cd-host-details', hostname, 'Daemons'); cy.get('cd-host-details').within(() => { // draining will take some time to complete. // since we don't know how many daemons will be @@ -35,12 +35,12 @@ describe('Hosts page', () => { cy.wait(15000); hosts.getTableCount('total').should('be.eq', 0); }); - hosts.delete(host); + hosts.delete(hostname); // add it back hosts.navigateTo('add'); - hosts.add(host); - hosts.checkExist(host, true); + hosts.add(hostname); + hosts.checkExist(hostname, true); }); it('should display inventory', function () { -- 2.39.5