test: refs #8484 await main content loaded #1318
No reviewers
Labels
No Milestone
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix-front#1318
Loading…
Reference in New Issue
No description provided.
Delete Branch "8484-waitToDomContentLoadedInTests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
refactor: refs #8484 improve search input behavior and enhance visit command with DOM content loadto WIP: refactor: refs #8484 improve search input behavior and enhance visit command with DOM content load@jtubau Cuantos tests fallan?
@ -23,3 +23,3 @@
});
it('should active a notification that is yours', () => {
it.skip('should active a notification that is yours', () => {
skip?
@ -88,33 +100,25 @@ Cypress.Commands.add('getValue', (selector) => {
// Fill Inputs
Cypress.Commands.add('selectOption', (selector, option, timeout = 5000) => {
Prueba con esto:
@ -115,3 +119,1 @@
.find('.q-item') // Encontrar los elementos de las opciones
.contains(option) // Verificar que existe una opción que contenga el texto deseado
.click(); // Hacer clic en la opción
Cypress.Commands.add('selectWorkerOption', (selector, option) => {
Para esto usar el selectOPtion
@ -57,2 +60,2 @@
Cypress.Commands.add('domContentLoad', (element, timeout = 5000) => {
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
Cypress.Commands.add('domContentLoad', (timeout = 5000) => {
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'), {
No acabo de ver el codigo de waitUntil. Se espera x segundos, comprueba algo y sino vuelve a esperar x segundos.
Debe haber algo que te permita saber cuando ha cargado
@ -30,8 +30,6 @@ describe('Ticket descriptor', () => {
it('should set the weight of the ticket', () => {
cy.visit('/#/ticket/10/summary');
cy.intercept('GET', /\/api\/Tickets\/\d/).as('ticket');
Ya no hace falta.
@ -9,13 +9,7 @@ describe('ZoneBasicData', () => {
});
it('should throw an error if the name is empty', () => {
cy.intercept('GET', /\/api\/Zones\/4./).as('zone');
Ya no hace falta.
WIP: refactor: refs #8484 improve search input behavior and enhance visit command with DOM content loadto refactor: refs #8484 improve search input behavior and enhance visit command with DOM content load@ -60,1 +60,4 @@
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
originalFn(url, options);
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
cy.waitUntil(() => cy.get('main').should('exist'));
Se asegura que el contenido este visible antes de hacer nada.
refactor: refs #8484 improve search input behavior and enhance visit command with DOM content loadto refactor: refs #8484 await main content loadedrefactor: refs #8484 await main content loadedto test: refs #8484 await main content loaded