1
0

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:
konrad
2021-01-23 17:18:09 +00:00
parent b2098d65fd
commit d1a2eefca6
54 changed files with 307 additions and 446 deletions

View File

@ -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()

View File

@ -23,8 +23,6 @@ describe('Team', () => {
.contains('Create')
.click()
cy.get('.fullpage')
.should('not.exist')
cy.url()
.should('contain', '/edit')
cy.get('input#teamtext')

View 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));
});

View File

@ -1,2 +1,3 @@
import './commands'
import 'cypress-file-upload'