From ddadd89c64fca44c2fe106fafed77c8cb5d676d8 Mon Sep 17 00:00:00 2001 From: konrad Date: Thu, 21 Jan 2021 22:33:16 +0000 Subject: [PATCH] Move all create views to better looking popups (#383) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/383 Co-authored-by: konrad Co-committed-by: konrad --- .drone.yml | 1 + cypress/integration/list/list.spec.js | 8 +- cypress/integration/list/namespaces.spec.js | 4 +- cypress/integration/sharing/team.spec.js | 4 +- src/components/home/contentAuth.vue | 9 +- src/components/home/navigation.vue | 3 +- src/components/misc/card.vue | 12 ++- src/components/misc/create.vue | 55 ++++++++++++ src/components/modal/modal.vue | 10 ++- src/router/index.js | 20 +++-- src/store/index.js | 5 -- src/store/mutation-types.js | 1 - src/views/labels/NewLabel.vue | 92 ++++++++++++--------- src/views/list/NewList.vue | 74 +++++++++-------- src/views/namespaces/NewNamespace.vue | 80 ++++++++++-------- src/views/teams/NewTeam.vue | 76 +++++++++-------- 16 files changed, 278 insertions(+), 176 deletions(-) create mode 100644 src/components/misc/create.vue diff --git a/.drone.yml b/.drone.yml index e4acea4a..efaeb805 100644 --- a/.drone.yml +++ b/.drone.yml @@ -95,6 +95,7 @@ steps: CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB YARN_CACHE_FOLDER: .cache/yarn/ CYPRESS_CACHE_FOLDER: .cache/cypress/ + CYPRESS_DEFAULT_COMMAND_TIMEOUT: 10000 commands: - sed -i 's/localhost/api/g' public/index.html - yarn serve & npx wait-on http://localhost:8080 diff --git a/cypress/integration/list/list.spec.js b/cypress/integration/list/list.spec.js index 99cf178d..a27358be 100644 --- a/cypress/integration/list/list.spec.js +++ b/cypress/integration/list/list.spec.js @@ -25,12 +25,12 @@ describe('Lists', () => { .click() cy.url() .should('contain', '/namespaces/1/list') - cy.get('h3') + cy.get('.card-header-title') .contains('Create a new list') cy.get('input.input') .type('New List') cy.get('.button') - .contains('Add') + .contains('Create') .click() cy.wait(1000) // Waiting until the request to create the new list is done @@ -142,9 +142,8 @@ describe('Lists', () => { }) cy.visit('/lists/1/table') - cy.get('.table-view table.table a') + cy.get('.table-view table.table') .contains(tasks[0].title) - .first() .click() cy.url() @@ -364,7 +363,6 @@ describe('Lists', () => { cy.get('.kanban .bucket .tasks .task') .contains(tasks[0].title) - .first() .click() cy.url() diff --git a/cypress/integration/list/namespaces.spec.js b/cypress/integration/list/namespaces.spec.js index 6d3b33d3..9dba7b43 100644 --- a/cypress/integration/list/namespaces.spec.js +++ b/cypress/integration/list/namespaces.spec.js @@ -26,12 +26,12 @@ describe('Namepaces', () => { .click() cy.url() .should('contain', '/namespaces/new') - cy.get('h3') + cy.get('.card-header-title') .should('contain', 'Create a new namespace') cy.get('input.input') .type('New Namespace') cy.get('.button') - .contains('Add') + .contains('Create') .click() cy.url() .should('contain', '/namespaces') diff --git a/cypress/integration/sharing/team.spec.js b/cypress/integration/sharing/team.spec.js index 5f9b4804..0359af91 100644 --- a/cypress/integration/sharing/team.spec.js +++ b/cypress/integration/sharing/team.spec.js @@ -15,12 +15,12 @@ describe('Team', () => { .click() cy.url() .should('contain', '/teams/new') - cy.get('h3') + cy.get('.card-header-title') .contains('Create a new team') cy.get('input.input') .type(newTeamName) cy.get('.button') - .contains('Add') + .contains('Create') .click() cy.get('.fullpage') diff --git a/src/components/home/contentAuth.vue b/src/components/home/contentAuth.vue index b49c55ca..d9a784ce 100644 --- a/src/components/home/contentAuth.vue +++ b/src/components/home/contentAuth.vue @@ -12,7 +12,6 @@
+ + + @@ -33,7 +36,7 @@ diff --git a/src/components/misc/create.vue b/src/components/misc/create.vue new file mode 100644 index 00000000..121286bb --- /dev/null +++ b/src/components/misc/create.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 6d33c063..1c74e59b 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -1,8 +1,8 @@