mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-23 04:31:32 +00:00
Fix checkFilter
method in the acceptance tests (#1092)
* Fix `checkFilter` method in the acceptance tests * #run_acceptance_tests * Remove duplicate assertion #run_acceptance_tests
This commit is contained in:
parent
fc194354bc
commit
73448b514e
@ -193,23 +193,19 @@ function checkFilter(filterDetails) {
|
|||||||
const entriesForDeeperCheck = 5;
|
const entriesForDeeperCheck = 5;
|
||||||
|
|
||||||
it(`checking the filter: ${filter}`, function () {
|
it(`checking the filter: ${filter}`, function () {
|
||||||
|
cy.get('.w-tc-editor-text').clear();
|
||||||
|
// applying the filter with alt+enter or with the button
|
||||||
|
cy.get('.w-tc-editor-text').type(`${filter}${applyByCtrlEnter ? '{ctrl+enter}' : ''}`);
|
||||||
|
cy.get('.w-tc-editor').should('have.attr', 'style').and('include', Cypress.env('greenFilterColor'));
|
||||||
|
if (!applyByCtrlEnter)
|
||||||
|
cy.get('[type="submit"]').click();
|
||||||
|
|
||||||
waitForFetch();
|
waitForFetch();
|
||||||
|
pauseStream();
|
||||||
|
|
||||||
cy.get(`#list [id^=entry]`).last().then(elem => {
|
cy.get(`#list [id^=entry]`).last().then(elem => {
|
||||||
const element = elem[0];
|
const element = elem[0];
|
||||||
const entryId = getEntryId(element.id);
|
const entryId = getEntryId(element.id);
|
||||||
// checks the hover on the last entry (the only one in DOM at the beginning)
|
|
||||||
leftOnHoverCheck(entryId, leftSidePath, filter);
|
|
||||||
|
|
||||||
cy.get('.w-tc-editor-text').clear();
|
|
||||||
// applying the filter with alt+enter or with the button
|
|
||||||
cy.get('.w-tc-editor-text').type(`${filter}${applyByCtrlEnter ? '{ctrl+enter}' : ''}`);
|
|
||||||
cy.get('.w-tc-editor').should('have.attr', 'style').and('include', Cypress.env('greenFilterColor'));
|
|
||||||
if (!applyByCtrlEnter)
|
|
||||||
cy.get('[type="submit"]').click();
|
|
||||||
|
|
||||||
waitForFetch();
|
|
||||||
pauseStream();
|
|
||||||
|
|
||||||
// only one entry in DOM after filtering, checking all checks on it
|
// only one entry in DOM after filtering, checking all checks on it
|
||||||
leftTextCheck(entryId, leftSidePath, leftSideExpectedText);
|
leftTextCheck(entryId, leftSidePath, leftSideExpectedText);
|
||||||
|
Loading…
Reference in New Issue
Block a user