]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/03-inventory.e2e-spec.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / 03-inventory.e2e-spec.ts
1 import { InventoryPageHelper } from '../cluster/inventory.po';
2
3 describe('Inventory page', () => {
4 const inventory = new InventoryPageHelper();
5
6 beforeEach(() => {
7 cy.login();
8 Cypress.Cookies.preserveOnce('token');
9 inventory.navigateTo();
10 });
11
12 it('should have correct devices', () => {
13 cy.fixture('orchestrator/inventory.json').then((hosts) => {
14 const totalDiskCount = Cypress._.sumBy(hosts, 'devices.length');
15 inventory.getTableCount('total').should('be.eq', totalDiskCount);
16 for (const host of hosts) {
17 inventory.filterTable('Hostname', host['name']);
18 inventory.getTableCount('found').should('be.eq', host.devices.length);
19 }
20 });
21 });
22
23 it('should identify device', () => {
24 inventory.identify();
25 });
26 });