Proposal: new QDialog helper commands
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cypress, typescript
- Ambito
- testing-qa
Direzione di ricerca
Start with the existing withinDialog entry point and the portal-related commands that use Cypress.$('body'). Check how Cypress resolves cy.root(), cy.window(), and cy.document() inside and outside within contexts. Done means the proposed dialog helpers cover escape, backdrop, persistent, and convenience use cases, including seamless and backdrop-free dialogs.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We're considering adding some new helper commands related to QDialog
closeDialogViaEscKey
function closeDialogViaEscKey () {
// Official way to escape `within` context
// https://docs.cypress.io/api/commands/within#Temporarily-escape
return cy.root().closest('body').type('{esc}')
}
Limitation: this only works in withinDialog context, as when using it outside it .root() will yeld "html" tag and Cypress won't be able to find anything with .closest('body') since it only searches upwards
We should find a way to make it work both inside and outside a within context
I tried with cy.window() and cy.document() already, which I recalled worked fine in the past, but it seems like they changed that behavior
Maybe by using the Cypress.$('body') shortcut that we already use in portal-related commands?
Even if it's an internal and undocumented feature AFAIK
closeDialogViaBackdrop
function closeDialogViaBackdrop () {
return cy.get('.q-dialog__backdrop').click({ force: true })
}
assertPersistentDialogExists
function assertPersistentDialogExists () {
cy.get('.q-dialog').should('not.have.attr', 'aria-modal', 'false')
}
This should be called automatically after the callback function of withinDialog completes, if persistent is set to true
Unluckily, this actually doesn't work all the times and has a few limitations we need to address
In particular, it doesn't address seamless dialogs use case (which always have 'aria-modal' equal to false) and dialogs without backdrop, which are equally not considered modals, and thus have 'aria-modal' equal to false
We should find a more reliable way to check for persistent dialogs, possibly even add a custom dedicated class into Quasar core for QDialog
withinPersistentDialog
Just a convenience method to avoid the more verbose form of withinDialog
Before
cy.withinDialog({
persistent: true,
fn: () => {
// ...
}
})
After
cy.withinPersistentDialog(() => {
// ...
})
- Lingua principale
- TypeScript
- Stelle
- 184
- Fork
- 67
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quasarframework/quasar-testing
-
Support for Cypress 16Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Automatically scaffold vitest-eslint-config and provide guidance on how to set it up properlyAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Proposal: Improve portal dependent components (e.g. QSelect , QButtonGroup etc) testing experienceAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
Tutte le issue di quasarframework/quasar-testing
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
tenstorrent/ttnn-visualizer#2526 ·
I maintainer di solito rispondono entro 1 giorno
-
trySessionCache calls /get-session twice when minting session_data (cache miss or expired cookie)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
neondatabase/neon-js#301 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
tashfeenahmed/freellmapi#2305 ·
I maintainer di solito rispondono entro 1 giorno