Improve consistency of the layout (#386)
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/386 Co-authored-by: konrad <konrad@kola-entertainments.de> Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -361,10 +361,7 @@ describe('Lists', () => {
|
||||
})
|
||||
cy.visit('/lists/1/kanban')
|
||||
|
||||
cy.get('.kanban .bucket .tasks')
|
||||
.should('contain', tasks[0].title)
|
||||
|
||||
cy.get('.kanban .bucket .tasks .task')
|
||||
cy.getAttached('.kanban .bucket .tasks .task')
|
||||
.contains(tasks[0].title)
|
||||
.click()
|
||||
|
||||
|
@ -23,8 +23,6 @@ describe('Team', () => {
|
||||
.contains('Create')
|
||||
.click()
|
||||
|
||||
cy.get('.fullpage')
|
||||
.should('not.exist')
|
||||
cy.url()
|
||||
.should('contain', '/edit')
|
||||
cy.get('input#teamtext')
|
||||
|
17
cypress/support/commands.js
Normal file
17
cypress/support/commands.js
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* getAttached(selector)
|
||||
* getAttached(selectorFn)
|
||||
*
|
||||
* Waits until the selector finds an attached element, then yields it (wrapped).
|
||||
* selectorFn, if provided, is passed $(document). Don't use cy methods inside selectorFn.
|
||||
*
|
||||
* Source: https://github.com/cypress-io/cypress/issues/5743#issuecomment-650421731
|
||||
*/
|
||||
Cypress.Commands.add('getAttached', selector => {
|
||||
const getElement = typeof selector === 'function' ? selector : $d => $d.find(selector);
|
||||
let $el = null;
|
||||
return cy.document().should($d => {
|
||||
$el = getElement(Cypress.$($d));
|
||||
expect(Cypress.dom.isDetached($el)).to.be.false;
|
||||
}).then(() => cy.wrap($el));
|
||||
});
|
@ -1,2 +1,3 @@
|
||||
|
||||
import './commands'
|
||||
import 'cypress-file-upload'
|
||||
|
Reference in New Issue
Block a user