I am currently trying to use cypress to test my application. My test is the following:
it.only('goes to the detail page of a person and edits the persons details', () => {
cy.get('pd-table.hydrated').shadow()
cy.get('.pd-table-horizontal-scroll .pd-table-row').first().click()
cy.get('pd-panel-header').should('contain', 'Persönliche Angaben')
cy.get('pd-button').should('contain', 'Bearbeiten').first().click()
cy.get('[data-cy="personalAttributes-type"]').click({force: true})
cy.get('[data-cy="personalAttributes-type"]').within(() => {
cy.get('pd-dropdown-item.hydrated').eq(3).click({force: true})
})
cy.get('[data-cy="personalAttributes-parlID"]').within(() => {
cy.get('input').type('123456')
})
cy.get('[data-cy="personalAttributes-language"]').click({force: true})
cy.get('[data-cy="personalAttributes-language"]').within(() => {
cy.get('pd-dropdown-item.hydrated').eq(3).click({force: true})
})
cy.get('[data-cy="personalAttributes-salutation"]').within(() => {
cy.get('input').type('{selectAll} {del} Mister')
})
})
The problem is that cypress allways fails on this line:
cy.get('[data-cy="personalAttributes-language"]').click({force: true})
I get the following error:
Error: RangeError: Maximum call stack size exceeded
at Object.acceptNode (http://localhost:8080/__cypress/runner/cypress_runner.js:180834:15)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180853:29)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
at collectRoots (http://localhost:8080/__cypress/runner/cypress_runner.js:180855:12)
From previous event:
at resolveElements (http://localhost:8080/__cypress/runner/cypress_runner.js:156590:67)
at Context.get (http://localhost:8080/__cypress/runner/cypress_runner.js:156601:14)
at http://localhost:8080/__cypress/runner/cypress_runner.js:168605:17
From previous event:
at runCommand (http://localhost:8080/__cypress/runner/cypress_runner.js:168584:10)
at next (http://localhost:8080/__cypress/runner/cypress_runner.js:168727:16)
at http://localhost:8080/__cypress/runner/cypress_runner.js:168756:18
I have no idea why this problem occures. Any help or hints are greatly appreceated.
EDIT:
The relevant extract from the html:
<pd-combobox
v-model-pd="v$.personFutureAttributes?.language?.$model"
data-cy="personalAttributes-language"
:items.prop="languageItems"
:placeholder="$t('global.combobox.placeholder')"
:selectable="true"
:error="v$.personFutureAttributes?.language.$error"
@blur="v$.personFutureAttributes?.language.$touch"
@pd-combobox="updatePersonAttributes($event, 'language')"
/>