]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/e2e/cluster/hosts.e2e-spec.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / e2e / cluster / hosts.e2e-spec.ts
index 913d01bfa98a319311d9aed87b0495686b36ff21..1b64cdbfa83b596d420615ba8999e65b4acf9301 100644 (file)
@@ -1,34 +1,45 @@
-import { Helper } from '../helper.po';
-import { HostsPage } from './hosts.po';
+import { HostsPageHelper } from './hosts.po';
 
 describe('Hosts page', () => {
-  let page: HostsPage;
+  let hosts: HostsPageHelper;
 
   beforeAll(() => {
-    page = new HostsPage();
+    hosts = new HostsPageHelper();
   });
 
-  afterEach(() => {
-    Helper.checkConsole();
+  afterEach(async () => {
+    await HostsPageHelper.checkConsole();
   });
 
-  it('should open and show breadcrumb', () => {
-    page.navigateTo();
-    Helper.waitTextToBePresent(Helper.getBreadcrumb(), 'Hosts');
-  });
+  describe('breadcrumb and tab tests', () => {
+    beforeAll(async () => {
+      await hosts.navigateTo();
+    });
 
-  it('should show two tabs', () => {
-    page.navigateTo();
-    expect(Helper.getTabsCount()).toEqual(2);
-  });
+    it('should open and show breadcrumb', async () => {
+      await hosts.waitTextToBePresent(hosts.getBreadcrumb(), 'Hosts');
+    });
+
+    it('should show two tabs', async () => {
+      await expect(hosts.getTabsCount()).toEqual(2);
+    });
 
-  it('should show hosts list tab at first', () => {
-    page.navigateTo();
-    expect(Helper.getTabText(0)).toEqual('Hosts List');
+    it('should show hosts list tab at first', async () => {
+      await expect(hosts.getTabText(0)).toEqual('Hosts List');
+    });
+
+    it('should show overall performance as a second tab', async () => {
+      await expect(hosts.getTabText(1)).toEqual('Overall Performance');
+    });
   });
 
-  it('should show overall performance as a second tab', () => {
-    page.navigateTo();
-    expect(Helper.getTabText(1)).toEqual('Overall Performance');
+  describe('services link test', () => {
+    it('should check at least one host is present', async () => {
+      await hosts.check_for_host();
+    });
+
+    it('should check services link(s) work for first host', async () => {
+      await hosts.check_services_links();
+    });
   });
 });