diff --git a/.drone.yml b/.drone.yml index a7522020..05010825 100644 --- a/.drone.yml +++ b/.drone.yml @@ -120,7 +120,7 @@ steps: from_secret: cypress_project_key commands: - sed -i 's/localhost/api/g' dist/index.html - - yarn serve:dist & npx wait-on http://localhost:5000 + - yarn serve:dist & npx wait-on http://localhost:4173 - yarn test:frontend --browser chrome --record depends_on: - dependencies diff --git a/cypress.json b/cypress.json index 28fd022c..48eb6ac5 100644 --- a/cypress.json +++ b/cypress.json @@ -1,5 +1,5 @@ { - "baseUrl": "http://localhost:5000", + "baseUrl": "http://localhost:4173", "env": { "API_URL": "http://localhost:3456/api/v1", "TEST_SECRET": "averyLongSecretToSe33dtheDB" diff --git a/cypress/integration/list/list-view-kanban.spec.js b/cypress/integration/list/list-view-kanban.spec.js index 52d67282..68268304 100644 --- a/cypress/integration/list/list-view-kanban.spec.js +++ b/cypress/integration/list/list-view-kanban.spec.js @@ -132,7 +132,7 @@ describe('List View Kanban', () => { cy.getSettled('.kanban .bucket .tasks .task') .contains(tasks[0].title) .first() - .drag('.kanban .bucket:nth-child(2) .tasks .dropper') + .drag('.kanban .bucket:nth-child(2) .tasks') cy.get('.kanban .bucket:nth-child(2) .tasks') .should('contain', tasks[0].title) @@ -176,7 +176,7 @@ describe('List View Kanban', () => { .click() cy.get('.task-view .action-buttons .button', { timeout: 3000 }) - .contains('Move task') + .contains('Move') .click() cy.get('.task-view .content.details .field .multiselect.control .input-wrapper input') .type(`${lists[1].title}{enter}`) diff --git a/cypress/integration/task/task.spec.js b/cypress/integration/task/task.spec.js index 62343c91..29ade1d2 100644 --- a/cypress/integration/task/task.spec.js +++ b/cypress/integration/task/task.spec.js @@ -210,7 +210,7 @@ describe('Task', () => { cy.visit(`/tasks/${tasks[0].id}`) cy.get('.task-view .action-buttons .button') - .contains('Move task') + .contains('Move') .click() cy.get('.task-view .content.details .field .multiselect.control .input-wrapper input') .type(`${lists[1].title}{enter}`) @@ -237,7 +237,7 @@ describe('Task', () => { cy.get('.task-view .action-buttons .button') .should('be.visible') - .contains('Delete task') + .contains('Delete') .click() cy.get('.modal-mask .modal-container .modal-content .header') .should('contain', 'Delete this task') @@ -317,7 +317,7 @@ describe('Task', () => { cy.visit(`/tasks/${tasks[0].id}`) cy.get('.task-view .action-buttons .button') - .contains('Add labels') + .contains('Add Labels') .should('be.visible') .click() cy.get('.task-view .details.labels-list .multiselect input') @@ -344,7 +344,7 @@ describe('Task', () => { cy.visit(`/tasks/${tasks[0].id}`) cy.get('.task-view .action-buttons .button') - .contains('Add labels') + .contains('Add Labels') .click() cy.get('.task-view .details.labels-list .multiselect input') .type(labels[0].title) diff --git a/cypress/integration/user/logout.spec.js b/cypress/integration/user/logout.spec.js index fbbc7088..1a22e21e 100644 --- a/cypress/integration/user/logout.spec.js +++ b/cypress/integration/user/logout.spec.js @@ -6,7 +6,7 @@ describe('Log out', () => { cy.get('.navbar .user .username') .click() - cy.get('.navbar .user .dropdown-menu a.dropdown-item') + cy.get('.navbar .user .dropdown-menu .dropdown-item') .contains('Logout') .click() diff --git a/package.json b/package.json index 9adfbbbe..1ecd5367 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "serve": "vite", "serve:dist-dev": "node scripts/serve-dist.js", - "serve:dist": "vite preview", + "serve:dist": "vite preview --port 4173", "build": "vite build && workbox copyLibraries dist/", "build:modern-only": "BUILD_MODERN_ONLY=true vite build && workbox copyLibraries dist/", "build:dev": "vite build -m development --outDir dist-dev/", @@ -20,18 +20,18 @@ "dependencies": { "@github/hotkey": "2.0.0", "@kyvg/vue3-notification": "2.3.4", - "@sentry/tracing": "6.17.4", - "@sentry/vue": "6.17.4", + "@sentry/tracing": "6.17.9", + "@sentry/vue": "6.17.9", "@types/is-touch-device": "1.0.0", - "@vue/compat": "3.2.29", - "@vueuse/core": "7.5.5", - "@vueuse/router": "7.5.5", + "@vue/compat": "3.2.31", + "@vueuse/core": "7.6.2", + "@vueuse/router": "7.6.2", "bulma-css-variables": "0.9.33", "camel-case": "4.1.2", "codemirror": "5.65.1", "copy-to-clipboard": "3.3.1", "date-fns": "2.28.0", - "dompurify": "2.3.5", + "dompurify": "2.3.6", "easymde": "2.16.1", "flatpickr": "4.6.9", "flexsearch": "0.7.21", @@ -44,8 +44,8 @@ "snake-case": "3.0.4", "ufo": "0.7.10", "v-tooltip": "4.0.0-beta.17", - "vue": "3.2.29", - "vue-advanced-cropper": "2.8.0", + "vue": "3.2.31", + "vue-advanced-cropper": "2.8.1", "vue-drag-resize": "2.0.3", "vue-flatpickr-component": "9.0.5", "vue-i18n": "9.2.0-beta.30", @@ -56,41 +56,40 @@ }, "devDependencies": { "@4tw/cypress-drag-drop": "2.1.0", - "@faker-js/faker": "6.0.0-alpha.5", - "@fortawesome/fontawesome-svg-core": "1.2.36", + "@faker-js/faker": "6.0.0-alpha.7", + "@fortawesome/fontawesome-svg-core": "1.3.0", "@fortawesome/free-regular-svg-icons": "5.15.4", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/vue-fontawesome": "3.0.0-5", "@types/flexsearch": "0.7.2", - "@typescript-eslint/eslint-plugin": "5.10.2", - "@typescript-eslint/parser": "5.10.2", - "@vitejs/plugin-legacy": "1.6.4", - "@vitejs/plugin-vue": "2.1.0", + "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/parser": "5.12.0", + "@vitejs/plugin-legacy": "1.7.1", + "@vitejs/plugin-vue": "2.2.2", "@vue/eslint-config-typescript": "10.0.0", "autoprefixer": "10.4.2", - "axios": "0.25.0", - "browserslist": "4.19.1", - "caniuse-lite": "1.0.30001307", - "cypress": "9.4.1", - "esbuild": "0.14.18", - "eslint": "8.8.0", + "axios": "0.26.0", + "browserslist": "4.19.3", + "caniuse-lite": "1.0.30001312", + "cypress": "9.5.0", + "esbuild": "0.14.23", + "eslint": "8.9.0", "eslint-plugin-vue": "8.4.1", - "express": "4.17.2", - "happy-dom": "2.31.1", - "netlify-cli": "8.15.0", + "express": "4.17.3", + "happy-dom": "2.39.1", + "netlify-cli": "8.16.1", "postcss": "8.4.6", - "postcss-preset-env": "7.3.1", - "rollup": "2.67.0", + "postcss-preset-env": "7.4.1", + "rollup": "2.67.3", "rollup-plugin-visualizer": "5.5.4", - "sass": "1.49.7", - "slugify": "1.6.5", + "sass": "1.49.8", "typescript": "4.5.5", - "vite": "2.7.13", + "vite": "2.8.4", "vite-plugin-pwa": "0.11.13", "vite-svg-loader": "3.1.2", - "vitest": "0.2.7", - "vue-tsc": "0.31.1", - "wait-on": "6.0.0", + "vitest": "0.4.2", + "vue-tsc": "0.31.4", + "wait-on": "6.0.1", "workbox-cli": "6.4.2" }, "eslintConfig": { diff --git a/scripts/deploy-preview-netlify.js b/scripts/deploy-preview-netlify.js index b2dd2336..11eac4e3 100644 --- a/scripts/deploy-preview-netlify.js +++ b/scripts/deploy-preview-netlify.js @@ -1,20 +1,24 @@ -const slugify = require('slugify') const {exec} = require('child_process') const axios = require('axios') const BOT_USER_ID = 513 const giteaToken = process.env.GITEA_TOKEN const siteId = process.env.NETLIFY_SITE_ID -const branchSlug = slugify(process.env.DRONE_SOURCE_BRANCH) +const branchSlug = String(process.env.DRONE_SOURCE_BRANCH) + .trim() + .normalize('NFKD') + .toLowerCase() + .replace(/[.\s/]/g, '-') + .replace(/[^A-Za-z\d-]/g, '') const prNumber = process.env.DRONE_PULL_REQUEST const prIssueCommentsUrl = `https://kolaente.dev/api/v1/repos/vikunja/frontend/issues/${prNumber}/comments` -const alias = `${prNumber}-${branchSlug}` +const alias = `${prNumber}-${branchSlug}`.substring(0,37) const fullPreviewUrl = `https://${alias}--vikunja-frontend-preview.netlify.app` const promiseExec = cmd => { return new Promise((resolve, reject) => { - exec(cmd, (error, stdout, stderr) => { + exec(cmd, (error, stdout) => { if (error) { reject(error) return diff --git a/scripts/deploy-preview-netlify.js.sha384 b/scripts/deploy-preview-netlify.js.sha384 index fe5f72f1..03ac0646 100644 --- a/scripts/deploy-preview-netlify.js.sha384 +++ b/scripts/deploy-preview-netlify.js.sha384 @@ -1 +1 @@ -55ce0faaa2c1919341617ccfaeccbb6029ac12107964ff488985cff13dd952f1a991df3ab0d4b0705deb761e508e6434 ./scripts/deploy-preview-netlify.js +bb46342a0a08105b340ba7976cff9d80ef89901120ec0639669caa70bb7d2dbc43e78b1f635a7654ab2456e8358c98a4 ./scripts/deploy-preview-netlify.js diff --git a/scripts/serve-dist.js b/scripts/serve-dist.js index e0303dd7..f6e092e5 100644 --- a/scripts/serve-dist.js +++ b/scripts/serve-dist.js @@ -3,7 +3,7 @@ const express = require('express') const app = express() const p = path.join(__dirname, '..', 'dist-dev') -const port = 5000 +const port = 4173 app.use(express.static(p)) // Handle urls set by the frontend diff --git a/src/App.vue b/src/App.vue index 5ab3635f..4080a6cc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@