Skip to content

Commit

Permalink
fix: feedback on drawer LLDP infos
Browse files Browse the repository at this point in the history
  • Loading branch information
upalatucci committed Jul 12, 2023
1 parent b737d2e commit 3800e26
Show file tree
Hide file tree
Showing 7 changed files with 1,860 additions and 89 deletions.
34 changes: 34 additions & 0 deletions cypress/e2e/StatusList.spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,38 @@ describe('NodeNetworkState list', () => {
.should('contain', 'Enabled');
});
});

it('with LLDP informations ', () => {
cy.intercept('GET', '/api/kubernetes/apis/nmstate.io/v1beta1/nodenetworkstates*', {
fixture: 'NodeNetworkStatusWithLLDP.json',
}).as('getStatuses');

cy.fixture('NodeNetworkStatusWithLLDP.json').then((nnsResponse) => {
const nns = nnsResponse.items[0];
const iface = nns.status.currentState.interfaces.find((iface) => iface.lldp?.enabled);

cy.visit('/k8s/cluster/nmstate.io~v1beta1~NodeNetworkState');

cy.wait(['@getStatuses'], { timeout: 40000 });

cy.get('table').should('contain', nns.metadata.name);

cy.get(EXPAND_INTERFACES_LIST_TEST_ID).click();
cy.byTestID(EXPAND_INTERFACE_INFO).find('button').click();

cy.byTestID(`${iface.type}-${iface.name}-open-drawer`).contains(iface.name).click();

cy.byTestID(INTERFACE_DRAWER_TEST_ID).should('be.visible').should('contain', 'Details');

cy.byTestID(LLDP_DRAWER_DETAILS_SECTION_TEST_ID)
.should('contain', 'LLDP')
.should('contain', 'Enabled');

cy.byTestID(LLDP_DRAWER_DETAILS_SECTION_TEST_ID)
.should('contain', 'Neighbors')
.should('contain', 'MAC address')
.should('contain', 'Port')
.should('contain', 'VLANS');
});
});
});
Loading

0 comments on commit 3800e26

Please sign in to comment.