fix: refs #7323 e2e #1443

Merged
carlossa merged 3 commits from 7323-fixe2e into dev 2025-02-20 08:56:49 +00:00
1 changed files with 8 additions and 3 deletions
Showing only changes of commit 743e07cd64 - Show all commits

View File

@ -2,8 +2,8 @@ describe('WorkerNotificationsManager', () => {
const salesPersonId = 18; const salesPersonId = 18;
const developerId = 9; const developerId = 9;
const activeList = '.q-infinite-scroll > :nth-child(1)'; const activeList = ':nth-child(1) > .q-list';
const availableList = '.q-infinite-scroll > :nth-child(2)'; const availableList = ':nth-child(2) > .q-list';
const firstActiveNotification = const firstActiveNotification =
':nth-child(1) > .q-list > :nth-child(1) > .q-item > .q-toggle > .q-toggle__inner'; ':nth-child(1) > .q-list > :nth-child(1) > .q-item > .q-toggle > .q-toggle__inner';
const firstAvailableNotification = const firstAvailableNotification =
@ -29,6 +29,7 @@ describe('WorkerNotificationsManager', () => {
cy.waitForElement(availableList); cy.waitForElement(availableList);
cy.get(activeList) cy.get(activeList)
.children()
.its('length') .its('length')
.then((beforeSize) => { .then((beforeSize) => {
cy.get(firstAvailableNotification).click(); cy.get(firstAvailableNotification).click();
@ -45,10 +46,13 @@ describe('WorkerNotificationsManager', () => {
cy.waitForElement(availableList); cy.waitForElement(availableList);
cy.get(availableList) cy.get(availableList)
.children()
.its('length') .its('length')
.then((beforeSize) => { .then((beforeSize) => {
cy.get(firstActiveNotification).click(); cy.get(firstActiveNotification).click();
cy.get(availableList).children().should('have.length', beforeSize); cy.get(availableList)
.children()
.should('have.length', beforeSize + 1);
}); });
}); });
@ -58,6 +62,7 @@ describe('WorkerNotificationsManager', () => {
cy.waitForElement(availableList); cy.waitForElement(availableList);
cy.get(activeList) cy.get(activeList)
.children()
.its('length') .its('length')
.then((beforeSize) => { .then((beforeSize) => {
cy.get(firstAvailableNotification).click(); cy.get(firstAvailableNotification).click();