]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: s/hosts.clickHostTab/hosts.clickTab/ 43555/head
authorKefu Chai <tchaikov@gmail.com>
Thu, 14 Oct 2021 22:44:55 +0000 (06:44 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 15 Oct 2021 06:46:40 +0000 (14:46 +0800)
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 <tchaikov@gmail.com>
src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts.e2e-spec.ts

index 465ca311002f7351be99de0ed9d7e1b6458035cd..5344fcaed3bedf60968ad167066d0c1740f84747 100644 (file)
@@ -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 () {