Closed khteh closed 8 months ago
Can you create a repro, as I already requested you on other issues?
I know nothing about your environment and components, without a repro I have no means to help you
Updated initial post
We have helpers you can use to select options within a QSelect
See https://github.com/quasarframework/quasar-testing/tree/dev/packages/e2e-cypress#automatic-override-of-cypress-commands See https://github.com/quasarframework/quasar-testing/blob/dev/packages/e2e-cypress/src/templates/typescript/src/components/___tests__/QuasarSelect.cy.ts See https://github.com/quasarframework/quasar/pull/16636/files#diff-fc1b210818906cc73332385c5aa82910eb0a31105c2179c241a1bd3719394d30
Please try using the helpers we provide, which just mirror the helpers provided by Cypress really, and let us know if you still hit the issues you're hitting using your custom code
No luck:
(1) cy.dataCy
fails to locate the named QSelect element in the component.
cy.withinSelectMenu({
persistent: true,
fn: () => {
//cy.get('.q-item[role=option]').contains("Option 1").click().click()
cy.dataCy('multidropdown-setting-4').select('Option 1');
},
})
(2) Is there any sample for cy.withinSelectMenu({
? I don't find it in the list of URLs that you provided earlier!
The following code snippet:
cy.withinSelectMenu({
persistent: true,
fn: () => {
cy.contains('Option 1').click()
},
})
results in the following validation error:
And the following code
cy.dataCy('multidropdown-setting-4').select('Option 1');
the following error:
Software version
OS: Ununtu 23.10 Node: v21.5.0 NPM: 10.3.0 Any other software related to your bug:
What did you get as the error?
(1) Why double
click().click()
in the firstwithinSelectMenu
? (2) Result ofclick()
inwithinSelectMenu
is not persistent. At least this is what is observed after the firstwithinSelectMenu
(3) The order of selected result is random / does not match the order of multipleclick()
s inwithinSelectMenu
should be "Option 1, Option 3". However, what I get is "Option 4, Option 1"
Reproduction https://github.com/khteh/quasar.git: https://github.com/khteh/quasar/blob/master/src/components/AutoGenerate/AutoGenerate.vue https://github.com/khteh/quasar/blob/master/src/uiElements/MultiDropDownSetting.vue https://github.com/khteh/quasar/blob/master/test/cypress/components/AutoGenerate.cy.ts
What were you expecting?
Expect the selection done in previous
withinSelectMenu
to remain selected.What steps did you take, to get the error?