From: Kefu Chai Date: Thu, 14 Oct 2021 22:44:55 +0000 (+0800) Subject: mgr/dashboard: s/hosts.clickHostTab/hosts.clickTab/ X-Git-Tag: v17.1.0~678^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43555%2Fhead;p=ceph.git 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 --- 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 465ca311002f..5344fcaed3be 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 () {