mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-12 13:53:30 +00:00
34 lines
982 B
JavaScript
34 lines
982 B
JavaScript
import {isValueExistsInElement} from "../testHelpers/TrafficHelper";
|
|
|
|
it('Loading Mizu', function () {
|
|
cy.visit(Cypress.env('testUrl'));
|
|
});
|
|
|
|
it('going through each entry', function () {
|
|
cy.get('#total-entries').then(number => {
|
|
const getNum = () => {
|
|
const numOfEntries = number.text();
|
|
return parseInt(numOfEntries);
|
|
};
|
|
cy.wrap({ there: getNum }).invoke('there').should('be.gte', 25);
|
|
|
|
checkThatAllEntriesShown();
|
|
|
|
const entriesNum = getNum();
|
|
[...Array(entriesNum).keys()].map(checkEntry);
|
|
});
|
|
});
|
|
|
|
function checkThatAllEntriesShown() {
|
|
cy.get('#entries-length').then(number => {
|
|
if (number.text() === '1')
|
|
cy.get('[title="Fetch old records"]').click();
|
|
});
|
|
}
|
|
|
|
function checkEntry(entryIndex) {
|
|
cy.get(`#entry-${entryIndex}`).click();
|
|
cy.get('#tbody-Headers').should('be.visible');
|
|
isValueExistsInElement(false, 'Ignored-User-Agent', '#tbody-Headers');
|
|
}
|