Compare commits
3 Commits
main
...
swap-drag-
Author | SHA1 | Date | |
---|---|---|---|
fbad973e99 | |||
4083042f49 | |||
1fdd6ae7e4 |
548
.drone.yml
|
@ -1,299 +1,119 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
name: testing
|
||||||
name: build
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
include:
|
exclude:
|
||||||
- main
|
- master
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
services:
|
|
||||||
- name: api
|
|
||||||
image: vikunja/api:unstable
|
|
||||||
environment:
|
|
||||||
VIKUNJA_SERVICE_TESTINGTOKEN: averyLongSecretToSe33dtheDB
|
|
||||||
VIKUNJA_LOG_LEVEL: DEBUG
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Disabled until we figure out why it is so slow
|
|
||||||
# - name: restore-cache
|
|
||||||
# image: meltwater/drone-cache:dev
|
|
||||||
# pull: always
|
|
||||||
# environment:
|
|
||||||
# AWS_ACCESS_KEY_ID:
|
|
||||||
# from_secret: cache_aws_access_key_id
|
|
||||||
# AWS_SECRET_ACCESS_KEY:
|
|
||||||
# from_secret: cache_aws_secret_access_key
|
|
||||||
# settings:
|
|
||||||
# debug: true
|
|
||||||
# restore: true
|
|
||||||
# bucket: kolaente.dev-drone-dependency-cache
|
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
|
||||||
# region: fr-par
|
|
||||||
# path_style: true
|
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
|
||||||
# mount:
|
|
||||||
# - .cache
|
|
||||||
|
|
||||||
- name: dependencies
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
CYPRESS_CACHE_FOLDER: .cache/cypress
|
|
||||||
commands:
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm install --fetch-timeout 100000
|
|
||||||
# depends_on:
|
|
||||||
# - restore-cache
|
|
||||||
|
|
||||||
- name: lint
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
commands:
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm run lint
|
|
||||||
depends_on:
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- name: build-prod
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
commands:
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm run build
|
|
||||||
depends_on:
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- name: test-unit
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm run test:unit
|
|
||||||
depends_on:
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- name: typecheck
|
|
||||||
failure: ignore
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
commands:
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm run typecheck
|
|
||||||
depends_on:
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- name: test-frontend
|
|
||||||
image: cypress/browsers:node18.12.0-chrome107
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
CYPRESS_API_URL: http://api:3456/api/v1
|
|
||||||
CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB
|
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
CYPRESS_CACHE_FOLDER: .cache/cypress
|
|
||||||
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
|
|
||||||
CYPRESS_RECORD_KEY:
|
|
||||||
from_secret: cypress_project_key
|
|
||||||
commands:
|
|
||||||
- sed -i 's/localhost/api/g' dist/index.html
|
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
|
||||||
- pnpm cypress install
|
|
||||||
- pnpm run test:e2e-record
|
|
||||||
depends_on:
|
|
||||||
- build-prod
|
|
||||||
|
|
||||||
# - name: rebuild-cache
|
|
||||||
# image: meltwater/drone-cache:dev
|
|
||||||
# pull: always
|
|
||||||
# environment:
|
|
||||||
# AWS_ACCESS_KEY_ID:
|
|
||||||
# from_secret: cache_aws_access_key_id
|
|
||||||
# AWS_SECRET_ACCESS_KEY:
|
|
||||||
# from_secret: cache_aws_secret_access_key
|
|
||||||
# settings:
|
|
||||||
# rebuild: true
|
|
||||||
# bucket: kolaente.dev-drone-dependency-cache
|
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
|
||||||
# region: fr-par
|
|
||||||
# path_style: true
|
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
|
||||||
# mount:
|
|
||||||
# - .cache
|
|
||||||
# depends_on:
|
|
||||||
# - dependencies
|
|
||||||
|
|
||||||
- name: deploy-preview
|
|
||||||
image: node:18-alpine
|
|
||||||
pull: always
|
|
||||||
environment:
|
|
||||||
NETLIFY_AUTH_TOKEN:
|
|
||||||
from_secret: netlify_auth_token
|
|
||||||
NETLIFY_SITE_ID:
|
|
||||||
from_secret: netlify_site_id
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
commands:
|
|
||||||
- cp -r dist dist-preview
|
|
||||||
# Override the default api url used for preview
|
|
||||||
- sed -i 's|http://localhost:3456|https://try.vikunja.io|g' dist-preview/index.html
|
|
||||||
- apk add --no-cache perl-utils
|
|
||||||
# create via:
|
|
||||||
# `shasum -a 384 ./scripts/deploy-preview-netlify.mjs > ./scripts/deploy-preview-netlify.mjs.sha384`
|
|
||||||
- shasum -a 384 -c ./scripts/deploy-preview-netlify.mjs.sha384
|
|
||||||
- node ./scripts/deploy-preview-netlify.mjs
|
|
||||||
depends_on:
|
|
||||||
- build-prod
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: release-latest
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
|
||||||
image: docker:git
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
|
|
||||||
# - name: restore-cache
|
|
||||||
# image: meltwater/drone-cache:dev
|
|
||||||
# pull: always
|
|
||||||
# environment:
|
|
||||||
# AWS_ACCESS_KEY_ID:
|
|
||||||
# from_secret: cache_aws_access_key_id
|
|
||||||
# AWS_SECRET_ACCESS_KEY:
|
|
||||||
# from_secret: cache_aws_secret_access_key
|
|
||||||
# settings:
|
|
||||||
# restore: true
|
|
||||||
# bucket: kolaente.dev-drone-dependency-cache
|
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
|
||||||
# region: fr-par
|
|
||||||
# path_style: true
|
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
|
||||||
# mount:
|
|
||||||
# - .cache
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: node:18-alpine
|
image: node:11-alpine
|
||||||
pull: always
|
pull: true
|
||||||
environment:
|
group: build-static
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
commands:
|
commands:
|
||||||
- apk add git
|
- apk add yarn
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
- yarn
|
||||||
- pnpm install --fetch-timeout 100000 --frozen-lockfile
|
- yarn run lint
|
||||||
- pnpm run lint
|
- yarn run build
|
||||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
|
||||||
- pnpm run build
|
---
|
||||||
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
kind: pipeline
|
||||||
# depends_on:
|
name: release-latest
|
||||||
# - restore-cache
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:11-alpine
|
||||||
|
pull: true
|
||||||
|
group: build-static
|
||||||
|
commands:
|
||||||
|
- apk add yarn
|
||||||
|
- yarn
|
||||||
|
- yarn run lint
|
||||||
|
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /drone/src/public/config.json" # Override config
|
||||||
|
- yarn run build
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
image: kolaente/zip
|
image: kolaente/zip
|
||||||
pull: always
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- cd dist
|
- cd dist
|
||||||
- zip -r ../vikunja-frontend-unstable.zip *
|
- zip -r ../vikunja-frontend-master.zip *
|
||||||
- cd ..
|
- cd ..
|
||||||
depends_on: [ build ]
|
depends_on: [ build ]
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/s3
|
image: plugins/s3:1
|
||||||
pull: always
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
bucket: vikunja-releases
|
bucket: vikunja-frontend
|
||||||
access_key:
|
access_key:
|
||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
secret_key:
|
secret_key:
|
||||||
from_secret: aws_secret_access_key
|
from_secret: aws_secret_access_key
|
||||||
endpoint: https://s3.fr-par.scw.cloud
|
endpoint: https://storage.kolaente.de
|
||||||
region: fr-par
|
|
||||||
path_style: true
|
path_style: true
|
||||||
source: vikunja-frontend-unstable.zip
|
source: vikunja-frontend-master.zip
|
||||||
target: /frontend/
|
|
||||||
depends_on: [ static ]
|
depends_on: [ static ]
|
||||||
|
|
||||||
|
# Build the docker image and push it to docker hub
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: vikunja/frontend
|
||||||
|
auto_tag: true
|
||||||
|
depends_on: [ static ]
|
||||||
|
|
||||||
|
# Update the instance on try.vikunja.io
|
||||||
|
- name: rancher
|
||||||
|
image: peloton/drone-rancher
|
||||||
|
settings:
|
||||||
|
url: http://server01.kolaente.de:8080/v1
|
||||||
|
access_key:
|
||||||
|
from_secret: RANCHER_ACCESS_KEY
|
||||||
|
secret_key:
|
||||||
|
from_secret: RANCHER_SECRET_KEY
|
||||||
|
service: vikunja-dev/frontend
|
||||||
|
docker_image: vikunja/frontend
|
||||||
|
confirm: true
|
||||||
|
depends_on: [ docker ]
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
|
||||||
name: release-version
|
name: release-version
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: fetch-tags
|
|
||||||
image: docker:git
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
|
|
||||||
# - name: restore-cache
|
|
||||||
# image: meltwater/drone-cache:dev
|
|
||||||
# pull: always
|
|
||||||
# environment:
|
|
||||||
# AWS_ACCESS_KEY_ID:
|
|
||||||
# from_secret: cache_aws_access_key_id
|
|
||||||
# AWS_SECRET_ACCESS_KEY:
|
|
||||||
# from_secret: cache_aws_secret_access_key
|
|
||||||
# settings:
|
|
||||||
# restore: true
|
|
||||||
# bucket: kolaente.dev-drone-dependency-cache
|
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
|
||||||
# region: fr-par
|
|
||||||
# path_style: true
|
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
|
||||||
# mount:
|
|
||||||
# - .cache
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: node:18-alpine
|
image: node:11-alpine
|
||||||
pull: always
|
pull: true
|
||||||
environment:
|
group: build-static
|
||||||
PNPM_CACHE_FOLDER: .cache/pnpm
|
|
||||||
commands:
|
commands:
|
||||||
- apk add git
|
- apk add yarn
|
||||||
- corepack enable && pnpm config set store-dir .cache/pnpm
|
- yarn
|
||||||
- pnpm install --fetch-timeout 100000 --frozen-lockfile
|
- yarn run lint
|
||||||
- pnpm run lint
|
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /drone/src/public/config.json" # Override config
|
||||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
- yarn run build
|
||||||
- pnpm run build
|
|
||||||
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
|
||||||
# depends_on:
|
|
||||||
# - restore-cache
|
|
||||||
|
|
||||||
- name: static
|
- name: static
|
||||||
image: kolaente/zip
|
image: kolaente/zip
|
||||||
pull: always
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- cd dist
|
- cd dist
|
||||||
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
||||||
|
@ -301,226 +121,28 @@ steps:
|
||||||
depends_on: [ build ]
|
depends_on: [ build ]
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/s3
|
image: plugins/s3:1
|
||||||
pull: always
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
bucket: vikunja-releases
|
bucket: vikunja-frontend
|
||||||
access_key:
|
access_key:
|
||||||
from_secret: aws_access_key_id
|
from_secret: aws_access_key_id
|
||||||
secret_key:
|
secret_key:
|
||||||
from_secret: aws_secret_access_key
|
from_secret: aws_secret_access_key
|
||||||
endpoint: https://s3.fr-par.scw.cloud
|
endpoint: https://storage.kolaente.de
|
||||||
region: fr-par
|
|
||||||
path_style: true
|
path_style: true
|
||||||
source: vikunja-frontend-${DRONE_TAG##v}.zip
|
source: vikunja-frontend-${DRONE_TAG##v}.zip
|
||||||
target: /frontend/
|
|
||||||
depends_on: [ static ]
|
depends_on: [ static ]
|
||||||
|
|
||||||
---
|
# Build the docker image and push it to docker hub
|
||||||
kind: pipeline
|
- name: docker
|
||||||
type: docker
|
image: plugins/docker
|
||||||
name: trigger-desktop-update
|
pull: true
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- release-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: trigger
|
|
||||||
image: plugins/downstream
|
|
||||||
settings:
|
|
||||||
server: https://drone.kolaente.de
|
|
||||||
token:
|
|
||||||
from_secret: drone_token
|
|
||||||
repositories:
|
|
||||||
- vikunja/desktop@main
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: docker-release
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- release-latest
|
|
||||||
- release-version
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- "refs/tags/**"
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- cron
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: fetch-tags
|
|
||||||
image: docker:git
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
|
|
||||||
- name: docker-unstable
|
|
||||||
image: thegeeklab/drone-docker-buildx
|
|
||||||
privileged: true
|
|
||||||
pull: always
|
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
repo: vikunja/frontend
|
repo: vikunja/frontend
|
||||||
tags: unstable
|
auto_tag: true
|
||||||
build_args:
|
depends_on: [ static ]
|
||||||
- USE_RELEASE=true
|
|
||||||
- RELEASE_VERSION=unstable
|
|
||||||
platforms:
|
|
||||||
- linux/386
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm/v6
|
|
||||||
- linux/arm/v7
|
|
||||||
- linux/arm64/v8
|
|
||||||
depends_on: [ fetch-tags ]
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
|
|
||||||
- name: generate-tags
|
|
||||||
image: thegeeklab/docker-autotag
|
|
||||||
environment:
|
|
||||||
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
|
|
||||||
DOCKER_AUTOTAG_EXTRA_TAGS: latest
|
|
||||||
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
|
|
||||||
depends_on: [ fetch-tags ]
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- "refs/tags/**"
|
|
||||||
|
|
||||||
- name: docker-release
|
|
||||||
image: thegeeklab/drone-docker-buildx
|
|
||||||
privileged: true
|
|
||||||
pull: always
|
|
||||||
settings:
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
repo: vikunja/frontend
|
|
||||||
build_args:
|
|
||||||
- USE_RELEASE=true
|
|
||||||
- RELEASE_VERSION=${DRONE_TAG##v}
|
|
||||||
platforms:
|
|
||||||
- linux/386
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm/v6
|
|
||||||
- linux/arm/v7
|
|
||||||
- linux/arm64/v8
|
|
||||||
depends_on: [ generate-tags ]
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- "refs/tags/**"
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: notify
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- "refs/tags/**"
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- cron
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
- release-version
|
|
||||||
- release-latest
|
|
||||||
- trigger-desktop-update
|
|
||||||
- docker-release
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: notify
|
|
||||||
image: plugins/matrix
|
|
||||||
settings:
|
|
||||||
homeserver: https://matrix.org
|
|
||||||
roomid: WqBDCxzghKcNflkErL:matrix.org
|
|
||||||
username:
|
|
||||||
from_secret: matrix_username
|
|
||||||
password:
|
|
||||||
from_secret: matrix_password
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: update-translations
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- cron
|
|
||||||
cron:
|
|
||||||
- update_translations
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: download
|
|
||||||
pull: always
|
|
||||||
image: jonasfranz/crowdin
|
|
||||||
settings:
|
|
||||||
download: true
|
|
||||||
export_dir: src/i18n/lang/
|
|
||||||
ignore_branch: true
|
|
||||||
project_identifier: vikunja
|
|
||||||
environment:
|
|
||||||
CROWDIN_KEY:
|
|
||||||
from_secret: crowdin_key
|
|
||||||
|
|
||||||
- name: move-files
|
|
||||||
pull: always
|
|
||||||
image: bash
|
|
||||||
depends_on:
|
|
||||||
- download
|
|
||||||
commands:
|
|
||||||
- mv src/i18n/lang/*/*.json src/i18n/lang
|
|
||||||
|
|
||||||
- name: push
|
|
||||||
pull: always
|
|
||||||
image: appleboy/drone-git-push
|
|
||||||
depends_on:
|
|
||||||
- move-files
|
|
||||||
settings:
|
|
||||||
author_email: "frederik@vikunja.io"
|
|
||||||
author_name: Frederick [Bot]
|
|
||||||
branch: main
|
|
||||||
commit: true
|
|
||||||
commit_message: "[skip ci] Updated translations via Crowdin"
|
|
||||||
remote: "ssh://git@kolaente.dev:9022/vikunja/frontend.git"
|
|
||||||
ssh_key:
|
|
||||||
from_secret: translation_git_push_ssh_key
|
|
||||||
|
|
||||||
- name: upload
|
|
||||||
pull: always
|
|
||||||
image: jonasfranz/crowdin
|
|
||||||
depends_on:
|
|
||||||
- clone
|
|
||||||
settings:
|
|
||||||
files:
|
|
||||||
en.json: src/i18n/lang/en.json
|
|
||||||
ignore_branch: true
|
|
||||||
project_identifier: vikunja
|
|
||||||
environment:
|
|
||||||
CROWDIN_KEY:
|
|
||||||
from_secret: crowdin_key
|
|
||||||
---
|
|
||||||
kind: signature
|
|
||||||
hmac: 971875b90c7bb1649d1b00d022d0b594ba9b68f927bf8f0dbe840190816d676b
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
# EditorConfig is awesome: https://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = tab
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[*.vue]
|
|
||||||
indent_style = tab
|
|
||||||
|
|
||||||
[*.{yaml,yml}]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.json]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{scss,css}]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[.nvmrc]
|
|
||||||
insert_final_newline = false
|
|
|
@ -1,13 +0,0 @@
|
||||||
# (1) Duplicate this file and remove the '.example' suffix.
|
|
||||||
# Naming this file '.env.local' is a Vite convention to prevent accidentally
|
|
||||||
# submitting to git.
|
|
||||||
# For more info see: https://vitejs.dev/guide/env-and-mode.html#env-files
|
|
||||||
|
|
||||||
# (2) Comment in and adjust the values as needed.
|
|
||||||
|
|
||||||
# VITE_IS_ONLINE=true
|
|
||||||
# VITE_WORKBOX_DEBUG=false
|
|
||||||
# SENTRY_AUTH_TOKEN=YOUR_TOKEN
|
|
||||||
# SENTRY_ORG=vikunja
|
|
||||||
# SENTRY_PROJECT=frontend-oss
|
|
||||||
# VIKUNJA_FRONTEND_BASE=/custom-subpath
|
|
|
@ -1,58 +0,0 @@
|
||||||
/* eslint-env node */
|
|
||||||
require("@rushstack/eslint-patch/modern-module-resolution")
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
'root': true,
|
|
||||||
'env': {
|
|
||||||
'browser': true,
|
|
||||||
'es2022': true,
|
|
||||||
'node': true,
|
|
||||||
'vue/setup-compiler-macros': true,
|
|
||||||
},
|
|
||||||
'extends': [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:vue/vue3-essential',
|
|
||||||
'@vue/eslint-config-typescript/recommended',
|
|
||||||
],
|
|
||||||
'rules': {
|
|
||||||
'vue/html-quotes': [
|
|
||||||
'error',
|
|
||||||
'double',
|
|
||||||
],
|
|
||||||
'quotes': [
|
|
||||||
'error',
|
|
||||||
'single',
|
|
||||||
],
|
|
||||||
'comma-dangle': [
|
|
||||||
'error',
|
|
||||||
'always-multiline',
|
|
||||||
],
|
|
||||||
'semi': [
|
|
||||||
'error',
|
|
||||||
'never',
|
|
||||||
],
|
|
||||||
|
|
||||||
// see https://segmentfault.com/q/1010000040813116/a-1020000041134455 (original in chinese)
|
|
||||||
'no-unused-vars': 'off',
|
|
||||||
'@typescript-eslint/no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
|
|
||||||
|
|
||||||
'vue/multi-word-component-names': 0,
|
|
||||||
// disabled until we have support for reactivityTransform
|
|
||||||
// See https://github.com/vuejs/eslint-plugin-vue/issues/1948
|
|
||||||
// see also setting in `vite.config`
|
|
||||||
'vue/no-setup-props-destructure': 0,
|
|
||||||
},
|
|
||||||
'parser': 'vue-eslint-parser',
|
|
||||||
'parserOptions': {
|
|
||||||
'parser': '@typescript-eslint/parser',
|
|
||||||
'ecmaVersion': 2022,
|
|
||||||
'sourceType': 'module',
|
|
||||||
},
|
|
||||||
'ignorePatterns': [
|
|
||||||
'*.test.*',
|
|
||||||
'cypress/*',
|
|
||||||
],
|
|
||||||
'globals': {
|
|
||||||
'defineProps': 'readonly',
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
<!--
|
|
||||||
|
|
||||||
Please fill out this issue template to report a bug.
|
|
||||||
If you want to propose a new feature, please open a discussion thread in the forum: https://community.vikunja.io
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Version information:**
|
|
||||||
|
|
||||||
Frontend Version:
|
|
||||||
API Version:
|
|
||||||
Browser and OS Version:
|
|
||||||
|
|
||||||
**Steps to reproduce:**
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Add clear steps to reproduce the bug. Provide screenshots where applicable.
|
|
||||||
-->
|
|
||||||
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
...
|
|
||||||
|
|
||||||
**Expected behavior:**
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Describe what happened.
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Actual behavior:**
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Describe what happened instead.
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Checklist:**
|
|
||||||
|
|
||||||
* [ ] I have provided all required information
|
|
||||||
* [ ] I am using the latest release or the latest unstable build
|
|
||||||
* [ ] I was able to reproduce the bug on [try](https://try.vikunja.io)
|
|
3
.github/FUNDING.yml
vendored
|
@ -1,3 +0,0 @@
|
||||||
github: kolaente
|
|
||||||
open_collective: vikunja
|
|
||||||
custom: ["https://vikunja.cloud", "https://www.buymeacoffee.com/kolaente"]
|
|
59
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
|
@ -1,59 +0,0 @@
|
||||||
name: Bug Report
|
|
||||||
description: Found something you weren't expecting? Report it here!
|
|
||||||
labels:
|
|
||||||
- kind/bug
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
NOTE: If your issue is a security concern, please send an email to security@vikunja.io instead of opening a public issue.
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Please fill out this issue template to report a bug.
|
|
||||||
|
|
||||||
1. If you want to propose a new feature, please open a discussion thread in the forum: https://community.vikunja.io
|
|
||||||
2. Please ask questions or configuration/deploy problems on our [Matrix Room](https://matrix.to/#/#vikunja:matrix.org) or forum (https://community.vikunja.io).
|
|
||||||
3. Make sure you are using the latest release and
|
|
||||||
take a moment to check that your issue hasn't been reported before.
|
|
||||||
4. Please give all relevant information below for bug reports, because
|
|
||||||
incomplete details will be handled as an invalid report and closed.
|
|
||||||
- type: textarea
|
|
||||||
id: description
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: |
|
|
||||||
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below).
|
|
||||||
- type: input
|
|
||||||
id: frontend-version
|
|
||||||
attributes:
|
|
||||||
label: Vikunja Frontend Version
|
|
||||||
description: Vikunja frontend version (or commit reference) of your instance
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: api-version
|
|
||||||
attributes:
|
|
||||||
label: Vikunja API Version
|
|
||||||
description: Vikunja API version (or commit reference) of your instance
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: browser-version
|
|
||||||
attributes:
|
|
||||||
label: Browser and version
|
|
||||||
description: If your issue is related to a frontend problem, please provide the browser and version you used to reproduce it.
|
|
||||||
- type: dropdown
|
|
||||||
id: can-reproduce
|
|
||||||
attributes:
|
|
||||||
label: Can you reproduce the bug on the Vikunja demo site?
|
|
||||||
options:
|
|
||||||
- "Yes"
|
|
||||||
- "No"
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: screenshots
|
|
||||||
attributes:
|
|
||||||
label: Screenshots
|
|
||||||
description: If this issue involves the Web Interface, please provide one or more screenshots
|
|
17
.github/ISSUE_TEMPLATE/config.yml
vendored
|
@ -1,17 +0,0 @@
|
||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: API issues
|
|
||||||
url: https://code.vikunja.io/api/issues
|
|
||||||
about: This is the frontend repo. Please open api-related bug reports and discussions in the api 0repo. Not sure if your issue is frontend or api? Ask in Matrix or the forum first.
|
|
||||||
- name: Forum
|
|
||||||
url: https://community.vikunja.io/
|
|
||||||
about: Feature Requests, Questions, configuration or deployment problems should be discussed in the forum.
|
|
||||||
- name: Security-related issues
|
|
||||||
url: https://vikunja.io/contact/#security
|
|
||||||
about: For security concerns, please send a mail to security@vikunja.io instead of opening a public issue.
|
|
||||||
- name: Chat on Matrix
|
|
||||||
url: https://matrix.to/#/#vikunja:matrix.org
|
|
||||||
about: Please ask any quick questions here.
|
|
||||||
- name: Translations
|
|
||||||
url: https://crowdin.com/project/vikunja
|
|
||||||
about: Any problems or requests for new languages about translations should be handled in crowdin.
|
|
35
.gitignore
vendored
|
@ -1,41 +1,22 @@
|
||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
lerna-debug.log*
|
|
||||||
stats.html
|
|
||||||
|
|
||||||
node_modules
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/dist*
|
node_modules
|
||||||
coverage
|
/dist
|
||||||
*.zip
|
*.zip
|
||||||
.direnv/
|
|
||||||
|
|
||||||
# Test files
|
|
||||||
cypress/screenshots
|
|
||||||
cypress/videos
|
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.vscode
|
|
||||||
.idea
|
.idea
|
||||||
|
.vscode
|
||||||
*.suo
|
*.suo
|
||||||
*.ntvs*
|
*.ntvs*
|
||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw*
|
*.sw*
|
||||||
!rollup.sw.js
|
|
||||||
|
|
||||||
|
|
||||||
# Local Netlify folder
|
|
||||||
.netlify
|
|
||||||
|
|
||||||
# histoire
|
|
||||||
.histoire
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"codezombiech.gitignore",
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"editorconfig.editorconfig",
|
|
||||||
"vue.volar",
|
|
||||||
"vue.vscode-typescript-vue-plugin",
|
|
||||||
"lokalise.i18n-ally",
|
|
||||||
"mgmcdermott.vscode-language-babel",
|
|
||||||
"mikestead.dotenv",
|
|
||||||
"Syler.sass-indented"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
"eslint.packageManager": "pnpm",
|
|
||||||
"editor.formatOnSave": false,
|
|
||||||
"editor.codeActionsOnSave": {
|
|
||||||
"source.fixAll": true
|
|
||||||
},
|
|
||||||
"eslint.format.enable": true,
|
|
||||||
"[javascript]": {
|
|
||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
||||||
},
|
|
||||||
"[typescript]": {
|
|
||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
||||||
},
|
|
||||||
|
|
||||||
// https://eslint.vuejs.org/user-guide/#editor-integrations
|
|
||||||
"eslint.validate": [
|
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"vue"
|
|
||||||
],
|
|
||||||
// i18n ally
|
|
||||||
"i18n-ally.localesPaths": [
|
|
||||||
"src/i18n/lang"
|
|
||||||
],
|
|
||||||
"i18n-ally.sortKeys": true,
|
|
||||||
"i18n-ally.keepFulfilled": true,
|
|
||||||
"i18n-ally.keystyle": "nested"
|
|
||||||
}
|
|
4520
CHANGELOG.md
75
Dockerfile
|
@ -1,70 +1,13 @@
|
||||||
# syntax=docker/dockerfile:1
|
FROM nginx
|
||||||
# ┬─┐┬ ┐o┬ ┬─┐
|
|
||||||
# │─││ │││ │ │
|
|
||||||
# ┘─┘┘─┘┘┘─┘┘─┘
|
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
|
MAINTAINER maintainers@vikunja.io
|
||||||
|
|
||||||
WORKDIR /build
|
RUN apt-get update && apt-get install -y apt-utils openssl && \
|
||||||
|
mkdir -p /etc/nginx/ssl && \
|
||||||
|
openssl genrsa -out /etc/nginx/ssl/dummy.key 2048 && \
|
||||||
|
openssl req -new -key /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.csr -subj "/C=DE/L=Berlin/O=Vikunja/CN=Vikunja Snakeoil" && \
|
||||||
|
openssl x509 -req -days 3650 -in /etc/nginx/ssl/dummy.csr -signkey /etc/nginx/ssl/dummy.key -out /etc/nginx/ssl/dummy.crt
|
||||||
|
|
||||||
ARG USE_RELEASE=false
|
ADD nginx.conf /etc/nginx/nginx.conf
|
||||||
ARG RELEASE_VERSION=main
|
|
||||||
ENV PNPM_CACHE_FOLDER .cache/pnpm/
|
|
||||||
|
|
||||||
COPY package.json ./
|
COPY dist /usr/share/nginx/html
|
||||||
COPY pnpm-lock.yaml ./
|
|
||||||
|
|
||||||
RUN if [ "$USE_RELEASE" != true ]; then \
|
|
||||||
# https://pnpm.io/installation#using-corepack
|
|
||||||
corepack enable && \
|
|
||||||
pnpm install; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
COPY . ./
|
|
||||||
|
|
||||||
RUN if [ "$USE_RELEASE" != true ]; then \
|
|
||||||
apk add --no-cache --virtual .build-deps git jq && \
|
|
||||||
git describe --tags --always --abbrev=10 | sed 's/-/+/; s/^v//; s/-g/-/' | \
|
|
||||||
xargs -0 -I{} jq -Mcnr --arg version {} '{VERSION:$version}' | \
|
|
||||||
tee src/version.json && \
|
|
||||||
apk del .build-deps; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUN if [ "$USE_RELEASE" = true ]; then \
|
|
||||||
wget "https://dl.vikunja.io/frontend/vikunja-frontend-${RELEASE_VERSION}.zip" -O frontend-release.zip && \
|
|
||||||
unzip frontend-release.zip -d dist/; \
|
|
||||||
else \
|
|
||||||
# we don't use corepack prepare here by intend since
|
|
||||||
# we have renovate to keep our dependencies up to date
|
|
||||||
# Build the frontend
|
|
||||||
pnpm run build; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ┌┐┐┌─┐o┌┐┐┐ │
|
|
||||||
# ││││ ┬││││┌┼┘
|
|
||||||
# ┘└┘┘─┘┘┘└┘┘ └
|
|
||||||
|
|
||||||
FROM nginx:stable-alpine AS runner
|
|
||||||
WORKDIR /usr/share/nginx/html
|
|
||||||
LABEL maintainer="maintainers@vikunja.io"
|
|
||||||
|
|
||||||
ENV VIKUNJA_HTTP_PORT 80
|
|
||||||
ENV VIKUNJA_HTTP2_PORT 81
|
|
||||||
ENV VIKUNJA_LOG_FORMAT main
|
|
||||||
ENV VIKUNJA_API_URL /api/v1
|
|
||||||
ENV VIKUNJA_SENTRY_ENABLED false
|
|
||||||
ENV VIKUNJA_SENTRY_DSN https://85694a2d757547cbbc90cd4b55c5a18d@o1047380.ingest.sentry.io/6024480
|
|
||||||
|
|
||||||
COPY docker/injector.sh /docker-entrypoint.d/50-injector.sh
|
|
||||||
COPY docker/ipv6-disable.sh /docker-entrypoint.d/60-ipv6-disable.sh
|
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
|
||||||
COPY docker/templates/. /etc/nginx/templates/
|
|
||||||
# copy compiled files from stage 1
|
|
||||||
COPY --from=builder /build/dist ./
|
|
||||||
# manage permissions
|
|
||||||
RUN chmod 0755 /docker-entrypoint.d/*.sh /etc/nginx/templates && \
|
|
||||||
chmod -R 0644 /etc/nginx/nginx.conf && \
|
|
||||||
chown -R nginx:nginx ./ /etc/nginx/conf.d /etc/nginx/templates && \
|
|
||||||
rm -f /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
|
|
||||||
# unprivileged user
|
|
||||||
USER nginx
|
|
818
LICENSE
|
@ -1,661 +1,165 @@
|
||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
Version 3, 19 November 2007
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
software and other kinds of works, specifically designed to ensure
|
License, supplemented by the additional permissions listed below.
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
0. Additional Definitions.
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
share and change all versions of a program--to make sure it remains free
|
General Public License.
|
||||||
software for all its users.
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
When we speak of free software, we are referring to freedom, not
|
other than an Application or a Combined Work as defined below.
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
An "Application" is any work that makes use of an interface provided
|
||||||
them if you wish), that you receive source code or can get it if you
|
by the Library, but which is not otherwise based on the Library.
|
||||||
want it, that you can change the software or use pieces of it in new
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
free programs, and that you know you can do these things.
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
Application with the Library. The particular version of the Library
|
||||||
you this License which gives you legal permission to copy, distribute
|
with which the Combined Work was made is also called the "Linked
|
||||||
and/or modify the software.
|
Version".
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
improvements made in alternate versions of the program, if they
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
receive widespread use, become available for other developers to
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
incorporate. Many developers of free software are heartened and
|
based on the Application, and not on the Linked Version.
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
The GNU General Public License permits making a modified version and
|
object code and/or source code for the Application, including any data
|
||||||
letting the public access it on a server without ever releasing its
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
source code to the public.
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
provide the source code of the modified version running there to the
|
without being bound by section 3 of the GNU GPL.
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
2. Conveying Modified Versions.
|
||||||
code of the modified version.
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
An older license, called the Affero General Public License and
|
facility refers to a function or data to be supplied by an Application
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
that uses the facility (other than as an argument passed when the
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
facility is invoked), then you may convey a copy of the modified
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
version:
|
||||||
this license.
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
The precise terms and conditions for copying, distribution and
|
ensure that, in the event an Application does not supply the
|
||||||
modification follow.
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
0. Definitions.
|
this License applicable to that copy.
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
The object code form of an Application may incorporate material from
|
||||||
works, such as semiconductor masks.
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
material is not limited to numerical parameters, data structure
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
"recipients" may be individuals or organizations.
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
a) Give prominent notice with each copy of the object code that the
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
Library is used in it and that the Library and its use are
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
covered by this License.
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
A "covered work" means either the unmodified Program or a work based
|
document.
|
||||||
on the Program.
|
|
||||||
|
4. Combined Works.
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
You may convey a Combined Work under terms of your choice that,
|
||||||
infringement under applicable copyright law, except executing it on a
|
taken together, effectively do not restrict modification of the
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
portions of the Library contained in the Combined Work and reverse
|
||||||
distribution (with or without modification), making available to the
|
engineering for debugging such modifications, if you also do each of
|
||||||
public, and in some countries other activities as well.
|
the following:
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
the Library is used in it and that the Library and its use are
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
covered by this License.
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
to the extent that it includes a convenient and prominently visible
|
document.
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
c) For a Combined Work that displays copyright notices during
|
||||||
extent that warranties are provided), that licensees may convey the
|
execution, include the copyright notice for the Library among
|
||||||
work under this License, and how to view a copy of this License. If
|
these notices, as well as a reference directing the user to the
|
||||||
the interface presents a list of user commands or options, such as a
|
copies of the GNU GPL and this license document.
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
d) Do one of the following:
|
||||||
1. Source Code.
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
The "source code" for a work means the preferred form of the work
|
License, and the Corresponding Application Code in a form
|
||||||
for making modifications to it. "Object code" means any non-source
|
suitable for, and under terms that permit, the user to
|
||||||
form of a work.
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
A "Standard Interface" means an interface that either is an official
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
standard defined by a recognized standards body, or, in the case of
|
Corresponding Source.
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
The "System Libraries" of an executable work include anything, other
|
a copy of the Library already present on the user's computer
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
system, and (b) will operate properly with a modified version
|
||||||
packaging a Major Component, but which is not part of that Major
|
of the Library that is interface-compatible with the Linked
|
||||||
Component, and (b) serves only to enable use of the work with that
|
Version.
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
"Major Component", in this context, means a major essential component
|
be required to provide such information under section 6 of the
|
||||||
(kernel, window system, and so on) of the specific operating system
|
GNU GPL, and only to the extent that such information is
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
necessary to install and execute a modified version of the
|
||||||
produce the work, or an object code interpreter used to run it.
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
The "Corresponding Source" for a work in object code form means all
|
you use option 4d0, the Installation Information must accompany
|
||||||
the source code needed to generate, install, and (for an executable
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
work) run the object code and to modify the work, including scripts to
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
control those activities. However, it does not include the work's
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
System Libraries, or general-purpose tools or generally available free
|
for conveying Corresponding Source.)
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
5. Combined Libraries.
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
You may place library facilities that are a work based on the
|
||||||
linked subprograms that the work is specifically designed to require,
|
Library side by side in a single library together with other library
|
||||||
such as by intimate data communication or control flow between those
|
facilities that are not Applications and are not covered by this
|
||||||
subprograms and other parts of the work.
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
a) Accompany the combined library with a copy of the same work based
|
||||||
Source.
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
2. Basic Permissions.
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
permission to run the unmodified Program. The output from running a
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
covered work is covered by this License only if the output, given its
|
versions will be similar in spirit to the present version, but may
|
||||||
content, constitutes a covered work. This License acknowledges your
|
differ in detail to address new problems or concerns.
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
You may make, run and propagate covered works that you do not
|
Library as you received it specifies that a certain numbered version
|
||||||
convey, without conditions so long as your license otherwise remains
|
of the GNU Lesser General Public License "or any later version"
|
||||||
in force. You may convey covered works to others for the sole purpose
|
applies to it, you have the option of following the terms and
|
||||||
of having them make modifications exclusively for you, or provide you
|
conditions either of that published version or of any later version
|
||||||
with facilities for running those works, provided that you comply with
|
published by the Free Software Foundation. If the Library as you
|
||||||
the terms of this License in conveying all material for which you do
|
received it does not specify a version number of the GNU Lesser
|
||||||
not control copyright. Those thus making or running the covered works
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
for you must do so exclusively on your behalf, under your direction
|
General Public License ever published by the Free Software Foundation.
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
Conveying under any other circumstances is permitted solely under
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
permanent authorization for you to choose that version for the
|
||||||
makes it unnecessary.
|
Library.
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published
|
|
||||||
by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
44
README.md
|
@ -3,51 +3,27 @@
|
||||||
> The todo app to organize your life.
|
> The todo app to organize your life.
|
||||||
|
|
||||||
[![Build Status](https://drone.kolaente.de/api/badges/vikunja/frontend/status.svg)](https://drone.kolaente.de/vikunja/frontend)
|
[![Build Status](https://drone.kolaente.de/api/badges/vikunja/frontend/status.svg)](https://drone.kolaente.de/vikunja/frontend)
|
||||||
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](LICENSE)
|
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](LICENSE)
|
||||||
[![Download](https://img.shields.io/badge/download-v0.20.3-brightgreen.svg)](https://dl.vikunja.io)
|
[![Download](https://img.shields.io/badge/download-v0.8-brightgreen.svg)](https://storage.kolaente.de/minio/vikunja/)
|
||||||
[![Translation](https://badges.crowdin.net/vikunja/localized.svg)](https://crowdin.com/project/vikunja)
|
|
||||||
|
|
||||||
This is the web frontend for Vikunja, written in Vue.js.
|
This is the web frontend for Vikunja, written in Vue.js.
|
||||||
|
|
||||||
Take a look at [our roadmap](https://my.vikunja.cloud/share/UrdhKPqumxDXUbYpEGJLSIyNTwAnbBzVlwdDpRbv/auth) (hosted on Vikunja!) for a list of things we're currently working on!
|
|
||||||
|
|
||||||
## Security Reports
|
|
||||||
|
|
||||||
If you find any security-related issues you don't want to disclose publicly, please use [the contact information on our website](https://vikunja.io/contact/#security).
|
|
||||||
|
|
||||||
## Docker
|
|
||||||
|
|
||||||
There is a [docker image available](https://hub.docker.com/r/vikunja/api) with support for http/2 and aggressive caching enabled.
|
|
||||||
In order to build it from sources run the command below. (Docker >= v19.03)
|
|
||||||
|
|
||||||
```shell
|
|
||||||
export DOCKER_BUILDKIT=1
|
|
||||||
docker build -t vikunja/frontend .
|
|
||||||
```
|
|
||||||
|
|
||||||
Refer to Refer [to multi-platform documentation](https://docs.docker.com/build/building/multi-platform/) in order to build for the different platform.
|
|
||||||
|
|
||||||
## Project setup
|
## Project setup
|
||||||
|
```
|
||||||
```shell
|
yarn install
|
||||||
pnpm install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
```shell
|
yarn run serve
|
||||||
pnpm run serve
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
```shell
|
yarn run build
|
||||||
pnpm run build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
### Lints and fixes files
|
||||||
|
|
||||||
```shell
|
|
||||||
pnpm run lint
|
|
||||||
```
|
```
|
||||||
|
yarn run lint
|
||||||
|
```
|
||||||
|
|
5
babel.config.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/app'
|
||||||
|
]
|
||||||
|
}
|
59
cliff.toml
|
@ -1,59 +0,0 @@
|
||||||
[changelog]
|
|
||||||
body = """
|
|
||||||
{% if version %}\
|
|
||||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
|
||||||
{% else %}\
|
|
||||||
## [unreleased]
|
|
||||||
{% endif %}\
|
|
||||||
|
|
||||||
|
|
||||||
{% for group, commits in commits | group_by(attribute="group") %}
|
|
||||||
### {{ group | upper_first }}
|
|
||||||
{% for commit in commits
|
|
||||||
| filter(attribute="scope")
|
|
||||||
| sort(attribute="scope") %}
|
|
||||||
* *({{commit.scope}})* {{ commit.message | upper_first }}
|
|
||||||
{%- if commit.breaking %}
|
|
||||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- for commit in commits %}
|
|
||||||
{%- if commit.scope -%}
|
|
||||||
{% else -%}
|
|
||||||
* {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
|
||||||
{% if commit.breaking -%}
|
|
||||||
{% raw %} {% endraw %}- **BREAKING**: {{commit.breaking_description}}
|
|
||||||
{% endif -%}
|
|
||||||
{% endif -%}
|
|
||||||
{% endfor -%}
|
|
||||||
{% raw %}\n{% endraw %}\
|
|
||||||
{% endfor %}\n
|
|
||||||
|
|
||||||
"""
|
|
||||||
#{% for group, commits in commits | group_by(attribute="group") %}
|
|
||||||
# ### {{ group | upper_first }}
|
|
||||||
# {% for commit in commits %}\
|
|
||||||
# - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))
|
|
||||||
# {% endfor %}\
|
|
||||||
#{% endfor %}\n
|
|
||||||
# remove the leading and trailing whitespace from the template
|
|
||||||
trim = true
|
|
||||||
|
|
||||||
[git]
|
|
||||||
conventional_commits = true
|
|
||||||
filter_unconventional = false
|
|
||||||
commit_parsers = [
|
|
||||||
{ message = ".*(deps).*", group = "Dependencies"},
|
|
||||||
{ message = "^feat", group = "Features"},
|
|
||||||
{ message = "^fix", group = "Bug Fixes"},
|
|
||||||
{ message = "^doc", group = "Documentation"},
|
|
||||||
{ message = "^perf", group = "Performance"},
|
|
||||||
{ message = "^refactor", group = "Refactor"},
|
|
||||||
{ message = "^style", group = "Styling"},
|
|
||||||
{ message = "^test", group = "Testing"},
|
|
||||||
{ message = "^chore\\(release\\): prepare for", skip = true},
|
|
||||||
{ message = "^chore", group = "Miscellaneous Tasks"},
|
|
||||||
{ body = ".*security", group = "Security"},
|
|
||||||
{ message = ".*", group = "Other", default_scope = "other"}, # Everything that's not a conventional commit goes into the "Other" category
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
import {defineConfig} from 'cypress'
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
env: {
|
|
||||||
API_URL: 'http://localhost:3456/api/v1',
|
|
||||||
TEST_SECRET: 'averyLongSecretToSe33dtheDB',
|
|
||||||
},
|
|
||||||
video: false,
|
|
||||||
retries: {
|
|
||||||
runMode: 2,
|
|
||||||
},
|
|
||||||
projectId: '181c7x',
|
|
||||||
e2e: {
|
|
||||||
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
|
||||||
baseUrl: 'http://127.0.0.1:4173',
|
|
||||||
experimentalRunAllSpecs: true,
|
|
||||||
// testIsolation: false,
|
|
||||||
},
|
|
||||||
component: {
|
|
||||||
devServer: {
|
|
||||||
framework: 'vue',
|
|
||||||
bundler: 'vite',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
viewportWidth: 1600,
|
|
||||||
viewportHeight: 900,
|
|
||||||
})
|
|
|
@ -1,48 +0,0 @@
|
||||||
# Frontend Testing With Cypress
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
* Enable the [seeder api endpoint](https://vikunja.io/docs/config-options/#testingtoken). You'll then need to add the testingtoken in `cypress.json` or set the `CYPRESS_TEST_SECRET` environment variable.
|
|
||||||
* Basic configuration happens in the `cypress.json` file
|
|
||||||
* Overridable with [env](https://docs.cypress.io/guides/guides/environment-variables.html#Option-3-CYPRESS)
|
|
||||||
* Override base url with `CYPRESS_BASE_URL`
|
|
||||||
|
|
||||||
## Fixtures
|
|
||||||
|
|
||||||
We're using the [test endpoint](https://vikunja.io/docs/config-options/#testingtoken) of the vikunja api to
|
|
||||||
seed the database with test data before running the tests.
|
|
||||||
This ensures better reproducability of tests.
|
|
||||||
|
|
||||||
## Running The Tests Locally
|
|
||||||
|
|
||||||
### Using Docker
|
|
||||||
|
|
||||||
The easiest way to run all frontend tests locally is by using the `docker-compose` file in this repository.
|
|
||||||
It uses the same configuration as the CI.
|
|
||||||
|
|
||||||
To use it, run
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, once all containers are started, run
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker-compose run cypress bash
|
|
||||||
```
|
|
||||||
|
|
||||||
to get a shell inside the cypress container.
|
|
||||||
In that shell you can then execute the tests with
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pnpm run test:e2e
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using The Cypress Dashboard
|
|
||||||
|
|
||||||
To open the Cypress Dashboard and run tests from there, run
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pnpm run test:e2e:dev
|
|
||||||
```
|
|
|
@ -1,20 +0,0 @@
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
|
||||||
api:
|
|
||||||
image: vikunja/api:unstable
|
|
||||||
environment:
|
|
||||||
VIKUNJA_LOG_LEVEL: DEBUG
|
|
||||||
VIKUNJA_SERVICE_TESTINGTOKEN: averyLongSecretToSe33dtheDB
|
|
||||||
ports:
|
|
||||||
- 3456:3456
|
|
||||||
cypress:
|
|
||||||
image: cypress/browsers:node18.12.0-chrome107
|
|
||||||
volumes:
|
|
||||||
- ..:/project
|
|
||||||
- $HOME/.cache:/home/node/.cache/
|
|
||||||
user: node
|
|
||||||
working_dir: /project
|
|
||||||
environment:
|
|
||||||
CYPRESS_API_URL: http://api:3456/api/v1
|
|
||||||
CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB
|
|
|
@ -1,57 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {prepareLists} from './prepareLists'
|
|
||||||
|
|
||||||
describe('List History', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
prepareLists()
|
|
||||||
|
|
||||||
it('should show a list history on the home page', () => {
|
|
||||||
cy.intercept(Cypress.env('API_URL') + '/namespaces*').as('loadNamespaces')
|
|
||||||
cy.intercept(Cypress.env('API_URL') + '/lists/*').as('loadList')
|
|
||||||
|
|
||||||
const lists = ListFactory.create(6)
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.get('body')
|
|
||||||
.should('not.contain', 'Last viewed')
|
|
||||||
|
|
||||||
cy.visit(`/lists/${lists[0].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
cy.visit(`/lists/${lists[1].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
cy.visit(`/lists/${lists[2].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
cy.visit(`/lists/${lists[3].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
cy.visit(`/lists/${lists[4].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
cy.visit(`/lists/${lists[5].id}`)
|
|
||||||
cy.wait('@loadNamespaces')
|
|
||||||
cy.wait('@loadList')
|
|
||||||
|
|
||||||
// cy.visit('/')
|
|
||||||
// cy.wait('@loadNamespaces')
|
|
||||||
// Not using cy.visit here to work around the redirect issue fixed in #1337
|
|
||||||
cy.get('nav.menu.top-menu a')
|
|
||||||
.contains('Overview')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('body')
|
|
||||||
.should('contain', 'Last viewed')
|
|
||||||
cy.get('[data-cy="listCardGrid"]')
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
.should('contain', lists[1].title)
|
|
||||||
.should('contain', lists[2].title)
|
|
||||||
.should('contain', lists[3].title)
|
|
||||||
.should('contain', lists[4].title)
|
|
||||||
.should('contain', lists[5].title)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,126 +0,0 @@
|
||||||
import {formatISO, format} from 'date-fns'
|
|
||||||
|
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {prepareLists} from './prepareLists'
|
|
||||||
|
|
||||||
describe('List View Gantt', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
prepareLists()
|
|
||||||
|
|
||||||
it('Hides tasks with no dates', () => {
|
|
||||||
const tasks = TaskFactory.create(1)
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.g-gantt-rows-container')
|
|
||||||
.should('not.contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows tasks from the current and next month', () => {
|
|
||||||
const now = Date.UTC(2022, 8, 25)
|
|
||||||
cy.clock(now, ['Date'])
|
|
||||||
|
|
||||||
const nextMonth = new Date(now)
|
|
||||||
nextMonth.setDate(1)
|
|
||||||
nextMonth.setMonth(9)
|
|
||||||
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.g-timeunits-container')
|
|
||||||
.should('contain', format(now, 'MMMM'))
|
|
||||||
.should('contain', format(nextMonth, 'MMMM'))
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows tasks with dates', () => {
|
|
||||||
const now = new Date()
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
start_date: now.toISOString(),
|
|
||||||
end_date: new Date(new Date(now).setDate(now.getDate() + 4)).toISOString(),
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.g-gantt-rows-container')
|
|
||||||
.should('not.be.empty')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows tasks with no dates after enabling them', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
start_date: null,
|
|
||||||
end_date: null,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.gantt-options .fancycheckbox')
|
|
||||||
.contains('Show tasks which don\'t have dates set')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.g-gantt-rows-container')
|
|
||||||
.should('not.be.empty')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Drags a task around', () => {
|
|
||||||
cy.intercept(Cypress.env('API_URL') + '/tasks/*').as('taskUpdate')
|
|
||||||
|
|
||||||
const now = new Date()
|
|
||||||
TaskFactory.create(1, {
|
|
||||||
start_date: now.toISOString(),
|
|
||||||
end_date: new Date(new Date(now).setDate(now.getDate() + 4)).toISOString(),
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.g-gantt-rows-container .g-gantt-row .g-gantt-row-bars-container div .g-gantt-bar')
|
|
||||||
.first()
|
|
||||||
.trigger('mousedown', {which: 1})
|
|
||||||
.trigger('mousemove', {clientX: 500, clientY: 0})
|
|
||||||
.trigger('mouseup', {force: true})
|
|
||||||
cy.wait('@taskUpdate')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should change the query parameters when selecting a date range', () => {
|
|
||||||
const now = Date.UTC(2022, 10, 9)
|
|
||||||
cy.clock(now, ['Date'])
|
|
||||||
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.list-gantt .gantt-options .field .control input.input.form-control')
|
|
||||||
.click()
|
|
||||||
cy.get('.flatpickr-calendar .flatpickr-innerContainer .dayContainer .flatpickr-day')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.flatpickr-calendar .flatpickr-innerContainer .dayContainer .flatpickr-day')
|
|
||||||
.last()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url().should('contain', 'dateFrom=2022-09-25')
|
|
||||||
cy.url().should('contain', 'dateTo=2022-11-05')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should change the date range based on date query parameters', () => {
|
|
||||||
cy.visit('/lists/1/gantt?dateFrom=2022-09-25&dateTo=2022-11-05')
|
|
||||||
|
|
||||||
cy.get('.g-timeunits-container')
|
|
||||||
.should('contain', 'September 2022')
|
|
||||||
.should('contain', 'October 2022')
|
|
||||||
.should('contain', 'November 2022')
|
|
||||||
cy.get('.list-gantt .gantt-options .field .control input.input.form-control')
|
|
||||||
.should('have.value', '25 Sep 2022 to 5 Nov 2022')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should open a task when double clicked on it', () => {
|
|
||||||
const now = new Date()
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
start_date: formatISO(now),
|
|
||||||
end_date: formatISO(now.setDate(now.getDate() + 4)),
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/gantt')
|
|
||||||
|
|
||||||
cy.get('.gantt-container .g-gantt-chart .g-gantt-row-bars-container .g-gantt-bar')
|
|
||||||
.dblclick()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', `/tasks/${tasks[0].id}`)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,241 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {BucketFactory} from '../../factories/bucket'
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {prepareLists} from './prepareLists'
|
|
||||||
|
|
||||||
describe('List View Kanban', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
prepareLists()
|
|
||||||
|
|
||||||
let buckets
|
|
||||||
beforeEach(() => {
|
|
||||||
buckets = BucketFactory.create(2)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows all buckets with their tasks', () => {
|
|
||||||
const data = TaskFactory.create(10, {
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .title')
|
|
||||||
.contains(buckets[0].title)
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.kanban .bucket .title')
|
|
||||||
.contains(buckets[1].title)
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.kanban .bucket')
|
|
||||||
.first()
|
|
||||||
.should('contain', data[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add a new task to a bucket', () => {
|
|
||||||
TaskFactory.create(2, {
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket')
|
|
||||||
.contains(buckets[0].title)
|
|
||||||
.get('.bucket-footer .button')
|
|
||||||
.contains('Add another task')
|
|
||||||
.click()
|
|
||||||
cy.get('.kanban .bucket')
|
|
||||||
.contains(buckets[0].title)
|
|
||||||
.get('.bucket-footer .field .control input.input')
|
|
||||||
.type('New Task{enter}')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket')
|
|
||||||
.first()
|
|
||||||
.should('contain', 'New Task')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can create a new bucket', () => {
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket.new-bucket .button')
|
|
||||||
.click()
|
|
||||||
cy.get('.kanban .bucket.new-bucket input.input')
|
|
||||||
.type('New Bucket{enter}')
|
|
||||||
|
|
||||||
cy.wait(1000) // Wait for the request to finish
|
|
||||||
cy.get('.kanban .bucket .title')
|
|
||||||
.contains('New Bucket')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can set a bucket limit', () => {
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-trigger')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-menu .dropdown-item')
|
|
||||||
.contains('Limit: Not Set')
|
|
||||||
.click()
|
|
||||||
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-menu .dropdown-item .field input.input')
|
|
||||||
.first()
|
|
||||||
.type(3)
|
|
||||||
cy.get('[data-cy="setBucketLimit"]')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .bucket-header span.limit')
|
|
||||||
.contains('0/3')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can rename a bucket', () => {
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .bucket-header .title')
|
|
||||||
.first()
|
|
||||||
.type('{selectall}New Bucket Title{enter}')
|
|
||||||
cy.get('.kanban .bucket .bucket-header .title')
|
|
||||||
.first()
|
|
||||||
.should('contain', 'New Bucket Title')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can delete a bucket', () => {
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-trigger')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-menu .dropdown-item')
|
|
||||||
.contains('Delete')
|
|
||||||
.click()
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .header')
|
|
||||||
.should('contain', 'Delete the bucket')
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .actions .button')
|
|
||||||
.contains('Do it!')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .title')
|
|
||||||
.contains(buckets[0].title)
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('.kanban .bucket .title')
|
|
||||||
.contains(buckets[1].title)
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can drag tasks around', () => {
|
|
||||||
const tasks = TaskFactory.create(2, {
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .tasks .task')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.first()
|
|
||||||
.drag('.kanban .bucket:nth-child(2) .tasks')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket:nth-child(2) .tasks')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
cy.get('.kanban .bucket:nth-child(1) .tasks')
|
|
||||||
.should('not.contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should navigate to the task when the task card is clicked', () => {
|
|
||||||
const tasks = TaskFactory.create(5, {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .tasks .task')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', `/tasks/${tasks[0].id}`, { timeout: 1000 })
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should remove a task from the kanban board when moving it to another list', () => {
|
|
||||||
const lists = ListFactory.create(2)
|
|
||||||
BucketFactory.create(2, {
|
|
||||||
list_id: '{increment}',
|
|
||||||
})
|
|
||||||
const tasks = TaskFactory.create(5, {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
const task = tasks[0]
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .tasks .task')
|
|
||||||
.contains(task.title)
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button', { timeout: 3000 })
|
|
||||||
.contains('Move')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .content.details .field .multiselect.control .input-wrapper input')
|
|
||||||
.type(`${lists[1].title}{enter}`)
|
|
||||||
// The requests happen with a 200ms timeout. Because of that, the results are not yet there when cypress
|
|
||||||
// presses enter and we can't simulate pressing on enter to select the item.
|
|
||||||
cy.get('.task-view .content.details .field .multiselect.control .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification', { timeout: 1000 })
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.go('back')
|
|
||||||
cy.get('.kanban .bucket')
|
|
||||||
.should('not.contain', task.title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows a button to filter the kanban board', () => {
|
|
||||||
const data = TaskFactory.create(10, {
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.list-kanban .filter-container .base-button')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should remove a task from the board when deleting it', () => {
|
|
||||||
const lists = ListFactory.create(1)
|
|
||||||
const buckets = BucketFactory.create(2, {
|
|
||||||
list_id: lists[0].id,
|
|
||||||
})
|
|
||||||
const tasks = TaskFactory.create(5, {
|
|
||||||
list_id: 1,
|
|
||||||
bucket_id: buckets[0].id,
|
|
||||||
})
|
|
||||||
const task = tasks[0]
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .tasks .task')
|
|
||||||
.contains(task.title)
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.should('be.visible')
|
|
||||||
.contains('Delete')
|
|
||||||
.click()
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .header')
|
|
||||||
.should('contain', 'Delete this task')
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .actions .button')
|
|
||||||
.contains('Do it!')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
|
|
||||||
cy.get('.kanban .bucket .tasks')
|
|
||||||
.should('not.contain', task.title)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,110 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {UserListFactory} from '../../factories/users_list'
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {UserFactory} from '../../factories/user'
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {prepareLists} from './prepareLists'
|
|
||||||
|
|
||||||
describe('List View List', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
prepareLists()
|
|
||||||
|
|
||||||
it('Should be an empty list', () => {
|
|
||||||
cy.visit('/lists/1')
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/lists/1/list')
|
|
||||||
cy.get('.list-title')
|
|
||||||
.should('contain', 'First List')
|
|
||||||
cy.get('.list-title-dropdown')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('p')
|
|
||||||
.contains('This list is currently empty.')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should create a new task', () => {
|
|
||||||
const newTaskTitle = 'New task'
|
|
||||||
|
|
||||||
cy.visit('/lists/1')
|
|
||||||
cy.get('.task-add textarea')
|
|
||||||
.type(newTaskTitle+'{enter}')
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('contain.text', newTaskTitle)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should navigate to the task when the title is clicked', () => {
|
|
||||||
const tasks = TaskFactory.create(5, {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
|
|
||||||
cy.get('.tasks .task .tasktext')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', `/tasks/${tasks[0].id}`)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should not see any elements for a list which is shared read only', () => {
|
|
||||||
UserFactory.create(2)
|
|
||||||
UserListFactory.create(1, {
|
|
||||||
list_id: 2,
|
|
||||||
user_id: 1,
|
|
||||||
right: 0,
|
|
||||||
})
|
|
||||||
const lists = ListFactory.create(2, {
|
|
||||||
owner_id: '{increment}',
|
|
||||||
namespace_id: '{increment}',
|
|
||||||
})
|
|
||||||
cy.visit(`/lists/${lists[1].id}/`)
|
|
||||||
|
|
||||||
cy.get('.list-title-wrapper .icon')
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('input.input[placeholder="Add a new task..."')
|
|
||||||
.should('not.exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should only show the color of a list in the navigation and not in the list view', () => {
|
|
||||||
const lists = ListFactory.create(1, {
|
|
||||||
hex_color: '00db60',
|
|
||||||
})
|
|
||||||
TaskFactory.create(10, {
|
|
||||||
list_id: lists[0].id,
|
|
||||||
})
|
|
||||||
cy.visit(`/lists/${lists[0].id}/`)
|
|
||||||
|
|
||||||
cy.get('.menu-list li .list-menu-link .color-bubble')
|
|
||||||
.should('have.css', 'background-color', 'rgb(0, 219, 96)')
|
|
||||||
cy.get('.tasks .color-bubble')
|
|
||||||
.should('not.exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should paginate for > 50 tasks', () => {
|
|
||||||
const tasks = TaskFactory.create(100, {
|
|
||||||
id: '{increment}',
|
|
||||||
title: i => `task${i}`,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('contain', tasks[1].title)
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('not.contain', tasks[99].title)
|
|
||||||
|
|
||||||
cy.get('.card-content .pagination .pagination-link')
|
|
||||||
.contains('2')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '?page=2')
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('contain', tasks[99].title)
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('not.contain', tasks[1].title)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,54 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
|
|
||||||
describe('List View Table', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
it('Should show a table with tasks', () => {
|
|
||||||
const tasks = TaskFactory.create(1)
|
|
||||||
cy.visit('/lists/1/table')
|
|
||||||
|
|
||||||
cy.get('.list-table table.table')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.list-table table.table')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should have working column switches', () => {
|
|
||||||
TaskFactory.create(1)
|
|
||||||
cy.visit('/lists/1/table')
|
|
||||||
|
|
||||||
cy.get('.list-table .filter-container .items .button')
|
|
||||||
.contains('Columns')
|
|
||||||
.click()
|
|
||||||
cy.get('.list-table .filter-container .card.columns-filter .card-content .fancycheckbox .check')
|
|
||||||
.contains('Priority')
|
|
||||||
.click()
|
|
||||||
cy.get('.list-table .filter-container .card.columns-filter .card-content .fancycheckbox .check')
|
|
||||||
.contains('Done')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.list-table table.table th')
|
|
||||||
.contains('Priority')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.list-table table.table th')
|
|
||||||
.contains('Done')
|
|
||||||
.should('not.exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should navigate to the task when the title is clicked', () => {
|
|
||||||
const tasks = TaskFactory.create(5, {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit('/lists/1/table')
|
|
||||||
|
|
||||||
cy.get('.list-table table.table')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', `/tasks/${tasks[0].id}`)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,122 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {prepareLists} from './prepareLists'
|
|
||||||
|
|
||||||
describe('Lists', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
let lists
|
|
||||||
prepareLists((newLists) => (lists = newLists))
|
|
||||||
|
|
||||||
it('Should create a new list', () => {
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('.namespace-title .dropdown-trigger')
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-title .dropdown .dropdown-item')
|
|
||||||
.contains('New list')
|
|
||||||
.click()
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/lists/new/1')
|
|
||||||
cy.get('.card-header-title')
|
|
||||||
.contains('New list')
|
|
||||||
cy.get('input.input')
|
|
||||||
.type('New List')
|
|
||||||
cy.get('.button')
|
|
||||||
.contains('Create')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification', { timeout: 1000 }) // Waiting until the request to create the new list is done
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/lists/')
|
|
||||||
cy.get('.list-title')
|
|
||||||
.should('contain', 'New List')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should redirect to a specific list view after visited', () => {
|
|
||||||
cy.visit('/lists/1/kanban')
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/lists/1/kanban')
|
|
||||||
cy.visit('/lists/1')
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/lists/1/kanban')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should rename the list in all places', () => {
|
|
||||||
TaskFactory.create(5, {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
const newListName = 'New list name'
|
|
||||||
|
|
||||||
cy.visit('/lists/1')
|
|
||||||
cy.get('.list-title')
|
|
||||||
.should('contain', 'First List')
|
|
||||||
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list li:first-child .dropdown .menu-list-dropdown-trigger')
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list li:first-child .dropdown .dropdown-content')
|
|
||||||
.contains('Edit')
|
|
||||||
.click()
|
|
||||||
cy.get('#title')
|
|
||||||
.type(`{selectall}${newListName}`)
|
|
||||||
cy.get('footer.card-footer .button')
|
|
||||||
.contains('Save')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.list-title')
|
|
||||||
.should('contain', newListName)
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list li:first-child')
|
|
||||||
.should('contain', newListName)
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('.card-content')
|
|
||||||
.should('contain', newListName)
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should remove a list', () => {
|
|
||||||
cy.visit(`/lists/${lists[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list li:first-child .dropdown .menu-list-dropdown-trigger')
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list li:first-child .dropdown .dropdown-content')
|
|
||||||
.contains('Delete')
|
|
||||||
.click()
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/settings/delete')
|
|
||||||
cy.get('[data-cy="modalPrimary"]')
|
|
||||||
.contains('Do it')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list')
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
cy.location('pathname')
|
|
||||||
.should('equal', '/')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should archive a list', () => {
|
|
||||||
cy.visit(`/lists/${lists[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.list-title-dropdown')
|
|
||||||
.click()
|
|
||||||
cy.get('.list-title-dropdown .dropdown-menu .dropdown-item')
|
|
||||||
.contains('Archive')
|
|
||||||
.click()
|
|
||||||
cy.get('.modal-content')
|
|
||||||
.should('contain.text', 'Archive this list')
|
|
||||||
cy.get('.modal-content [data-cy=modalPrimary]')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .menu-list')
|
|
||||||
.should('not.contain', lists[0].title)
|
|
||||||
cy.get('main.app-content')
|
|
||||||
.should('contain.text', 'This list is archived. It is not possible to create new or edit tasks for it.')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,145 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {NamespaceFactory} from '../../factories/namespace'
|
|
||||||
|
|
||||||
describe('Namepaces', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
let namespaces
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
namespaces = NamespaceFactory.create(1)
|
|
||||||
ListFactory.create(1)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should be all there', () => {
|
|
||||||
cy.visit('/namespaces')
|
|
||||||
cy.get('[data-cy="namespace-title"]')
|
|
||||||
.should('contain', namespaces[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should create a new Namespace', () => {
|
|
||||||
const newNamespaceTitle = 'New Namespace'
|
|
||||||
|
|
||||||
cy.visit('/namespaces')
|
|
||||||
cy.get('[data-cy="new-namespace"]')
|
|
||||||
.should('contain', 'New namespace')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/namespaces/new')
|
|
||||||
cy.get('.card-header-title')
|
|
||||||
.should('contain', 'New namespace')
|
|
||||||
cy.get('input.input')
|
|
||||||
.type(newNamespaceTitle)
|
|
||||||
cy.get('.button')
|
|
||||||
.contains('Create')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.namespace-container')
|
|
||||||
.should('contain', newNamespaceTitle)
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/namespaces')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should rename the namespace all places', () => {
|
|
||||||
const newNamespaces = NamespaceFactory.create(5)
|
|
||||||
const newNamespaceName = 'New namespace name'
|
|
||||||
|
|
||||||
cy.visit('/namespaces')
|
|
||||||
|
|
||||||
cy.get(`.namespace-container .menu.namespaces-lists .namespace-title:contains(${newNamespaces[0].title}) .dropdown .dropdown-trigger`)
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .namespace-title .dropdown .dropdown-content')
|
|
||||||
.contains('Edit')
|
|
||||||
.click()
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/settings/edit')
|
|
||||||
cy.get('#namespacetext')
|
|
||||||
.invoke('val')
|
|
||||||
.should('equal', newNamespaces[0].title) // wait until the namespace data is loaded
|
|
||||||
cy.get('#namespacetext')
|
|
||||||
.type(`{selectall}${newNamespaceName}`)
|
|
||||||
cy.get('footer.card-footer .button')
|
|
||||||
.contains('Save')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification', { timeout: 1000 })
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists')
|
|
||||||
.should('contain', newNamespaceName)
|
|
||||||
.should('not.contain', newNamespaces[0].title)
|
|
||||||
cy.get('[data-cy="namespaces-list"]')
|
|
||||||
.should('contain', newNamespaceName)
|
|
||||||
.should('not.contain', newNamespaces[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should remove a namespace when deleting it', () => {
|
|
||||||
const newNamespaces = NamespaceFactory.create(5)
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
cy.get(`.namespace-container .menu.namespaces-lists .namespace-title:contains(${newNamespaces[0].title}) .dropdown .dropdown-trigger`)
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists .namespace-title .dropdown .dropdown-content')
|
|
||||||
.contains('Delete')
|
|
||||||
.click()
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/settings/delete')
|
|
||||||
cy.get('[data-cy="modalPrimary"]')
|
|
||||||
.contains('Do it')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.namespace-container .menu.namespaces-lists')
|
|
||||||
.should('not.contain', newNamespaces[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should not show archived lists & namespaces if the filter is not checked', () => {
|
|
||||||
const n = NamespaceFactory.create(1, {
|
|
||||||
id: 2,
|
|
||||||
is_archived: true,
|
|
||||||
}, false)
|
|
||||||
ListFactory.create(1, {
|
|
||||||
id: 2,
|
|
||||||
namespace_id: n[0].id,
|
|
||||||
}, false)
|
|
||||||
|
|
||||||
ListFactory.create(1, {
|
|
||||||
id: 3,
|
|
||||||
is_archived: true,
|
|
||||||
}, false)
|
|
||||||
|
|
||||||
// Initial
|
|
||||||
cy.visit('/namespaces')
|
|
||||||
cy.get('.namespace')
|
|
||||||
.should('not.contain', 'Archived')
|
|
||||||
|
|
||||||
// Show archived
|
|
||||||
cy.get('[data-cy="show-archived-check"] label.check span')
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
cy.get('[data-cy="show-archived-check"] input')
|
|
||||||
.should('be.checked')
|
|
||||||
cy.get('.namespace')
|
|
||||||
.should('contain', 'Archived')
|
|
||||||
|
|
||||||
// Don't show archived
|
|
||||||
cy.get('[data-cy="show-archived-check"] label.check span')
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
cy.get('[data-cy="show-archived-check"] input')
|
|
||||||
.should('not.be.checked')
|
|
||||||
|
|
||||||
// Second time visiting after unchecking
|
|
||||||
cy.visit('/namespaces')
|
|
||||||
cy.get('[data-cy="show-archived-check"] input')
|
|
||||||
.should('not.be.checked')
|
|
||||||
cy.get('.namespace')
|
|
||||||
.should('not.contain', 'Archived')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,19 +0,0 @@
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {NamespaceFactory} from '../../factories/namespace'
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
|
|
||||||
export function createLists() {
|
|
||||||
NamespaceFactory.create(1)
|
|
||||||
const lists = ListFactory.create(1, {
|
|
||||||
title: 'First List'
|
|
||||||
})
|
|
||||||
TaskFactory.truncate()
|
|
||||||
return lists
|
|
||||||
}
|
|
||||||
|
|
||||||
export function prepareLists(setLists = (...args: any[]) => {}) {
|
|
||||||
beforeEach(() => {
|
|
||||||
const lists = createLists()
|
|
||||||
setLists(lists)
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {NamespaceFactory} from '../../factories/namespace'
|
|
||||||
import {UserListFactory} from '../../factories/users_list'
|
|
||||||
|
|
||||||
describe('Editor', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
NamespaceFactory.create(1)
|
|
||||||
ListFactory.create(1)
|
|
||||||
TaskFactory.truncate()
|
|
||||||
UserListFactory.truncate()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Has a preview with checkable checkboxes', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
description: `# Test Heading
|
|
||||||
* Bullet 1
|
|
||||||
* Bullet 2
|
|
||||||
|
|
||||||
* [ ] Checklist
|
|
||||||
* [x] Checklist checked
|
|
||||||
`,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
cy.get('input[type=checkbox][data-checkbox-num=0]')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .details.content.description h3 span.is-small.has-text-success')
|
|
||||||
.contains('Saved!')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.preview.content')
|
|
||||||
.should('contain', 'Test Heading')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,35 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
describe('The Menu', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit('/')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Is visible by default on desktop', () => {
|
|
||||||
cy.get('.namespace-container')
|
|
||||||
.should('have.class', 'is-active')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can be hidden on desktop', () => {
|
|
||||||
cy.get('button.menu-show-button:visible')
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container')
|
|
||||||
.should('not.have.class', 'is-active')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Is hidden by default on mobile', () => {
|
|
||||||
cy.viewport('iphone-8')
|
|
||||||
cy.get('.namespace-container')
|
|
||||||
.should('not.have.class', 'is-active')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Is can be shown on mobile', () => {
|
|
||||||
cy.viewport('iphone-8')
|
|
||||||
cy.get('button.menu-show-button:visible')
|
|
||||||
.click()
|
|
||||||
cy.get('.namespace-container')
|
|
||||||
.should('have.class', 'is-active')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,25 +0,0 @@
|
||||||
import {LinkShareFactory} from '../../factories/link_sharing'
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
|
|
||||||
describe('Link shares', () => {
|
|
||||||
it('Can view a link share', () => {
|
|
||||||
const lists = ListFactory.create(1)
|
|
||||||
const tasks = TaskFactory.create(10, {
|
|
||||||
list_id: lists[0].id
|
|
||||||
})
|
|
||||||
const linkShares = LinkShareFactory.create(1, {
|
|
||||||
list_id: lists[0].id,
|
|
||||||
right: 0,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/share/${linkShares[0].hash}/auth`)
|
|
||||||
|
|
||||||
cy.get('h1.title')
|
|
||||||
.should('contain', lists[0].title)
|
|
||||||
cy.get('input.input[placeholder="Add a new task..."')
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('.tasks')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,131 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TeamFactory} from '../../factories/team'
|
|
||||||
import {TeamMemberFactory} from '../../factories/team_member'
|
|
||||||
import {UserFactory} from '../../factories/user'
|
|
||||||
|
|
||||||
describe('Team', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
it('Creates a new team', () => {
|
|
||||||
TeamFactory.truncate()
|
|
||||||
cy.visit('/teams')
|
|
||||||
|
|
||||||
const newTeamName = 'New Team'
|
|
||||||
|
|
||||||
cy.get('a.button')
|
|
||||||
.contains('Create a new team')
|
|
||||||
.click()
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/teams/new')
|
|
||||||
cy.get('.card-header-title')
|
|
||||||
.contains('Create a new team')
|
|
||||||
cy.get('input.input')
|
|
||||||
.type(newTeamName)
|
|
||||||
cy.get('.button')
|
|
||||||
.contains('Create')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/edit')
|
|
||||||
cy.get('input#teamtext')
|
|
||||||
.should('have.value', newTeamName)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows all teams', () => {
|
|
||||||
TeamMemberFactory.create(10, {
|
|
||||||
team_id: '{increment}',
|
|
||||||
})
|
|
||||||
const teams = TeamFactory.create(10, {
|
|
||||||
id: '{increment}',
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit('/teams')
|
|
||||||
|
|
||||||
cy.get('.teams.box')
|
|
||||||
.should('not.be.empty')
|
|
||||||
teams.forEach(t => {
|
|
||||||
cy.get('.teams.box')
|
|
||||||
.should('contain', t.name)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Allows an admin to edit the team', () => {
|
|
||||||
TeamMemberFactory.create(1, {
|
|
||||||
team_id: 1,
|
|
||||||
admin: true,
|
|
||||||
})
|
|
||||||
const teams = TeamFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit('/teams/1/edit')
|
|
||||||
cy.get('.card input.input')
|
|
||||||
.first()
|
|
||||||
.type('{selectall}New Team Name')
|
|
||||||
|
|
||||||
cy.get('.card .button')
|
|
||||||
.contains('Save')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('table.table td')
|
|
||||||
.contains('Admin')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Does not allow a normal user to edit the team', () => {
|
|
||||||
TeamMemberFactory.create(1, {
|
|
||||||
team_id: 1,
|
|
||||||
admin: false,
|
|
||||||
})
|
|
||||||
const teams = TeamFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit('/teams/1/edit')
|
|
||||||
cy.get('.card input.input')
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('table.table td')
|
|
||||||
.contains('Member')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Allows an admin to add members to the team', () => {
|
|
||||||
TeamMemberFactory.create(1, {
|
|
||||||
team_id: 1,
|
|
||||||
admin: true,
|
|
||||||
})
|
|
||||||
TeamFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
const users = UserFactory.create(5)
|
|
||||||
|
|
||||||
cy.visit('/teams/1/edit')
|
|
||||||
cy.get('.card')
|
|
||||||
.contains('Team Members')
|
|
||||||
.get('.card-content .multiselect .input-wrapper input')
|
|
||||||
.type(users[1].username)
|
|
||||||
cy.get('.card')
|
|
||||||
.contains('Team Members')
|
|
||||||
.get('.card-content .multiselect .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.card')
|
|
||||||
.contains('Team Members')
|
|
||||||
.get('.card-content .button')
|
|
||||||
.contains('Add to team')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('table.table td')
|
|
||||||
.contains('Admin')
|
|
||||||
.should('exist')
|
|
||||||
cy.get('table.table tr')
|
|
||||||
.should('contain', users[1].username)
|
|
||||||
.should('contain', 'Member')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,153 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {seed} from '../../support/seed'
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {NamespaceFactory} from '../../factories/namespace'
|
|
||||||
import {BucketFactory} from '../../factories/bucket'
|
|
||||||
import {updateUserSettings} from '../../support/updateUserSettings'
|
|
||||||
|
|
||||||
function seedTasks(numberOfTasks = 50, startDueDate = new Date()) {
|
|
||||||
NamespaceFactory.create(1)
|
|
||||||
const list = ListFactory.create()[0]
|
|
||||||
BucketFactory.create(1, {
|
|
||||||
list_id: list.id,
|
|
||||||
})
|
|
||||||
const tasks = []
|
|
||||||
let dueDate = startDueDate
|
|
||||||
for (let i = 0; i < numberOfTasks; i++) {
|
|
||||||
const now = new Date()
|
|
||||||
dueDate = new Date(new Date(dueDate).setDate(dueDate.getDate() + 2))
|
|
||||||
tasks.push({
|
|
||||||
id: i + 1,
|
|
||||||
list_id: list.id,
|
|
||||||
done: false,
|
|
||||||
created_by_id: 1,
|
|
||||||
title: 'Test Task ' + i,
|
|
||||||
index: i + 1,
|
|
||||||
due_date: dueDate.toISOString(),
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
seed(TaskFactory.table, tasks)
|
|
||||||
return {tasks, list}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Home Page Task Overview', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
it('Should show tasks with a near due date first on the home page overview', () => {
|
|
||||||
const taskCount = 50
|
|
||||||
const {tasks} = seedTasks(taskCount)
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.each(([task], index) => {
|
|
||||||
expect(task.innerText).to.contain(tasks[index].title)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should show overdue tasks first, then show other tasks', () => {
|
|
||||||
const now = new Date()
|
|
||||||
const oldDate = new Date(new Date(now).setDate(now.getDate() - 14))
|
|
||||||
const taskCount = 50
|
|
||||||
const {tasks} = seedTasks(taskCount, oldDate)
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.each(([task], index) => {
|
|
||||||
expect(task.innerText).to.contain(tasks[index].title)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should show a new task with a very soon due date at the top', () => {
|
|
||||||
const {tasks} = seedTasks()
|
|
||||||
const newTaskTitle = 'New Task'
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
TaskFactory.create(1, {
|
|
||||||
id: 999,
|
|
||||||
title: newTaskTitle,
|
|
||||||
due_date: new Date().toISOString(),
|
|
||||||
}, false)
|
|
||||||
|
|
||||||
cy.visit(`/lists/${tasks[0].list_id}/list`)
|
|
||||||
cy.get('.tasks .task')
|
|
||||||
.first()
|
|
||||||
.should('contain.text', newTaskTitle)
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.first()
|
|
||||||
.should('contain.text', newTaskTitle)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should not show a new task without a date at the bottom when there are > 50 tasks', () => {
|
|
||||||
// We're not using the api here to create the task in order to verify the flow
|
|
||||||
const {tasks} = seedTasks(100)
|
|
||||||
const newTaskTitle = 'New Task'
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
cy.visit(`/lists/${tasks[0].list_id}/list`)
|
|
||||||
cy.get('.task-add textarea')
|
|
||||||
.type(newTaskTitle+'{enter}')
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.last()
|
|
||||||
.should('not.contain.text', newTaskTitle)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should show a new task without a date at the bottom when there are < 50 tasks', () => {
|
|
||||||
seedTasks(40)
|
|
||||||
const newTaskTitle = 'New Task'
|
|
||||||
TaskFactory.create(1, {
|
|
||||||
id: 999,
|
|
||||||
title: newTaskTitle,
|
|
||||||
}, false)
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.last()
|
|
||||||
.should('contain.text', newTaskTitle)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should show a task without a due date added via default list at the bottom', () => {
|
|
||||||
const {list} = seedTasks(40)
|
|
||||||
updateUserSettings({
|
|
||||||
default_list_id: list.id,
|
|
||||||
overdue_tasks_reminders_time: '9:00',
|
|
||||||
})
|
|
||||||
|
|
||||||
const newTaskTitle = 'New Task'
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
cy.get('.add-task-textarea')
|
|
||||||
.type(`${newTaskTitle}{enter}`)
|
|
||||||
|
|
||||||
cy.get('[data-cy="showTasks"] .card .task')
|
|
||||||
.last()
|
|
||||||
.should('contain.text', newTaskTitle)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should show the cta buttons for new list when there are no tasks', () => {
|
|
||||||
TaskFactory.truncate()
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
cy.get('.home.app-content .content')
|
|
||||||
.should('contain.text', 'You can create a new list for your new tasks:')
|
|
||||||
.should('contain.text', 'Or import your lists and tasks from other services into Vikunja:')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should not show the cta buttons for new list when there are tasks', () => {
|
|
||||||
seedTasks()
|
|
||||||
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
cy.get('.home.app-content .content')
|
|
||||||
.should('not.contain.text', 'You can create a new list for your new tasks:')
|
|
||||||
.should('not.contain.text', 'Or import your lists and tasks from other services into Vikunja:')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,581 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
import {TaskFactory} from '../../factories/task'
|
|
||||||
import {ListFactory} from '../../factories/list'
|
|
||||||
import {TaskCommentFactory} from '../../factories/task_comment'
|
|
||||||
import {UserFactory} from '../../factories/user'
|
|
||||||
import {NamespaceFactory} from '../../factories/namespace'
|
|
||||||
import {UserListFactory} from '../../factories/users_list'
|
|
||||||
import {TaskAssigneeFactory} from '../../factories/task_assignee'
|
|
||||||
import {LabelFactory} from '../../factories/labels'
|
|
||||||
import {LabelTaskFactory} from '../../factories/label_task'
|
|
||||||
import {BucketFactory} from '../../factories/bucket'
|
|
||||||
|
|
||||||
import {TaskAttachmentFactory} from '../../factories/task_attachments'
|
|
||||||
|
|
||||||
function addLabelToTaskAndVerify(labelTitle: string) {
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Add Labels')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect input')
|
|
||||||
.type(labelTitle)
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification', { timeout: 4000 })
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .input-wrapper span.tag')
|
|
||||||
.should('exist')
|
|
||||||
.should('contain', labelTitle)
|
|
||||||
}
|
|
||||||
|
|
||||||
function uploadAttachmentAndVerify(taskId: number) {
|
|
||||||
cy.intercept(`${Cypress.env('API_URL')}/tasks/${taskId}/attachments`).as('uploadAttachment')
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Add Attachments')
|
|
||||||
.click()
|
|
||||||
cy.get('input[type=file]', {timeout: 1000})
|
|
||||||
.selectFile('cypress/fixtures/image.jpg', {force: true}) // The input is not visible, but on purpose
|
|
||||||
cy.wait('@uploadAttachment')
|
|
||||||
|
|
||||||
cy.get('.attachments .attachments .files a.attachment')
|
|
||||||
.should('exist')
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Task', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
let namespaces
|
|
||||||
let lists
|
|
||||||
let buckets
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
// UserFactory.create(1)
|
|
||||||
namespaces = NamespaceFactory.create(1)
|
|
||||||
lists = ListFactory.create(1)
|
|
||||||
buckets = BucketFactory.create(1, {
|
|
||||||
list_id: lists[0].id,
|
|
||||||
})
|
|
||||||
TaskFactory.truncate()
|
|
||||||
UserListFactory.truncate()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should be created new', () => {
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
cy.get('.input[placeholder="Add a new task…"')
|
|
||||||
.type('New Task')
|
|
||||||
cy.get('.button')
|
|
||||||
.contains('Add')
|
|
||||||
.click()
|
|
||||||
cy.get('.tasks .task .tasktext')
|
|
||||||
.first()
|
|
||||||
.should('contain', 'New Task')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Inserts new tasks at the top of the list', () => {
|
|
||||||
TaskFactory.create(1)
|
|
||||||
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
cy.get('.list-is-empty-notice')
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('.input[placeholder="Add a new task…"')
|
|
||||||
.type('New Task')
|
|
||||||
cy.get('.button')
|
|
||||||
.contains('Add')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.wait(1000) // Wait for the request
|
|
||||||
cy.get('.tasks .task .tasktext')
|
|
||||||
.first()
|
|
||||||
.should('contain', 'New Task')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Marks a task as done', () => {
|
|
||||||
TaskFactory.create(1)
|
|
||||||
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
cy.get('.tasks .task .fancycheckbox label.check')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add a task to favorites', () => {
|
|
||||||
TaskFactory.create(1)
|
|
||||||
|
|
||||||
cy.visit('/lists/1/list')
|
|
||||||
cy.get('.tasks .task .favorite')
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
cy.get('.menu.namespaces-lists')
|
|
||||||
.should('contain', 'Favorites')
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('Task Detail View', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
TaskCommentFactory.truncate()
|
|
||||||
LabelTaskFactory.truncate()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows all task details', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
index: 1,
|
|
||||||
description: 'Lorem ipsum dolor sit amet.'
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view h1.title.input')
|
|
||||||
.should('contain', tasks[0].title)
|
|
||||||
cy.get('.task-view h1.title.task-id')
|
|
||||||
.should('contain', '#1')
|
|
||||||
cy.get('.task-view h6.subtitle')
|
|
||||||
.should('contain', namespaces[0].title)
|
|
||||||
.should('contain', lists[0].title)
|
|
||||||
cy.get('.task-view .details.content.description')
|
|
||||||
.should('contain', tasks[0].description)
|
|
||||||
cy.get('.task-view .action-buttons p.created')
|
|
||||||
.should('contain', 'Created')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows a done label for done tasks', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
index: 1,
|
|
||||||
done: true,
|
|
||||||
done_at: new Date().toISOString()
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .heading .is-done')
|
|
||||||
.should('be.visible')
|
|
||||||
.should('contain', 'Done')
|
|
||||||
cy.get('.task-view .action-buttons p.created')
|
|
||||||
.scrollIntoView()
|
|
||||||
.should('be.visible')
|
|
||||||
.should('contain', 'Done')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can mark a task as done', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
done: false,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Mark task done!')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .heading .is-done')
|
|
||||||
.should('exist')
|
|
||||||
.should('contain', 'Done')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.should('contain', 'Mark as undone')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Shows a task identifier since the list has one', () => {
|
|
||||||
const lists = ListFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
identifier: 'TEST',
|
|
||||||
})
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: lists[0].id,
|
|
||||||
index: 1,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view h1.title.task-id')
|
|
||||||
.should('contain', `${lists[0].identifier}-${tasks[0].index}`)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can edit the description', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
description: 'Lorem ipsum dolor sit amet.'
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .details.content.description .editor button')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .details.content.description .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll')
|
|
||||||
.type('{selectall}New Description')
|
|
||||||
cy.get('[data-cy="saveEditor"]')
|
|
||||||
.contains('Save')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .details.content.description h3 span.is-small.has-text-success')
|
|
||||||
.contains('Saved!')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add a new comment', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .comments .media.comment .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll')
|
|
||||||
.should('be.visible')
|
|
||||||
.type('{selectall}New Comment')
|
|
||||||
cy.get('.task-view .comments .media.comment .button:not([disabled])')
|
|
||||||
.contains('Comment')
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .comments .media.comment .editor')
|
|
||||||
.should('contain', 'New Comment')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can move a task to another list', () => {
|
|
||||||
const lists = ListFactory.create(2)
|
|
||||||
BucketFactory.create(2, {
|
|
||||||
list_id: '{increment}'
|
|
||||||
})
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: lists[0].id,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Move')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .content.details .field .multiselect.control .input-wrapper input')
|
|
||||||
.type(`${lists[1].title}{enter}`)
|
|
||||||
// The requests happen with a 200ms timeout. Because of that, the results are not yet there when cypress
|
|
||||||
// presses enter and we can't simulate pressing on enter to select the item.
|
|
||||||
cy.get('.task-view .content.details .field .multiselect.control .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view h6.subtitle')
|
|
||||||
.should('contain', namespaces[0].title)
|
|
||||||
.should('contain', lists[1].title)
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can delete a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.should('be.visible')
|
|
||||||
.contains('Delete')
|
|
||||||
.click()
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .header')
|
|
||||||
.should('contain', 'Delete this task')
|
|
||||||
cy.get('.modal-mask .modal-container .modal-content .actions .button')
|
|
||||||
.contains('Do it!')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.url()
|
|
||||||
.should('contain', `/lists/${tasks[0].list_id}/`)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add an assignee to a task', () => {
|
|
||||||
const users = UserFactory.create(5)
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
UserListFactory.create(5, {
|
|
||||||
list_id: 1,
|
|
||||||
user_id: '{increment}',
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('[data-cy="taskDetail.assign"]')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .column.assignees .multiselect input')
|
|
||||||
.type(users[1].username)
|
|
||||||
cy.get('.task-view .column.assignees .multiselect .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .column.assignees .multiselect .input-wrapper span.assignee')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can remove an assignee from a task', () => {
|
|
||||||
const users = UserFactory.create(2)
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
UserListFactory.create(5, {
|
|
||||||
list_id: 1,
|
|
||||||
user_id: '{increment}',
|
|
||||||
})
|
|
||||||
TaskAssigneeFactory.create(1, {
|
|
||||||
task_id: tasks[0].id,
|
|
||||||
user_id: users[1].id,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .column.assignees .multiselect .input-wrapper span.assignee')
|
|
||||||
.get('.remove-assignee')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .column.assignees .multiselect .input-wrapper span.assignee')
|
|
||||||
.should('not.exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add a new label to a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
LabelFactory.truncate()
|
|
||||||
const newLabelText = 'some new label'
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Add Labels')
|
|
||||||
.should('be.visible')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect input')
|
|
||||||
.type(newLabelText)
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .search-results')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .input-wrapper span.tag')
|
|
||||||
.should('exist')
|
|
||||||
.should('contain', newLabelText)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add an existing label to a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
const labels = LabelFactory.create(1)
|
|
||||||
LabelTaskFactory.truncate()
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
addLabelToTaskAndVerify(labels[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add a label to a task and it shows up on the kanban board afterwards', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: lists[0].id,
|
|
||||||
bucket_id: buckets[0].id,
|
|
||||||
})
|
|
||||||
const labels = LabelFactory.create(1)
|
|
||||||
LabelTaskFactory.truncate()
|
|
||||||
|
|
||||||
cy.visit(`/lists/${lists[0].id}/kanban`)
|
|
||||||
|
|
||||||
cy.get('.bucket .task')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.click()
|
|
||||||
|
|
||||||
addLabelToTaskAndVerify(labels[0].title)
|
|
||||||
|
|
||||||
cy.get('.modal-content .close')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.bucket .task')
|
|
||||||
.should('contain.text', labels[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can remove a label from a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: 1,
|
|
||||||
})
|
|
||||||
const labels = LabelFactory.create(1)
|
|
||||||
LabelTaskFactory.create(1, {
|
|
||||||
task_id: tasks[0].id,
|
|
||||||
label_id: labels[0].id,
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .input-wrapper')
|
|
||||||
.should('be.visible')
|
|
||||||
.should('contain', labels[0].title)
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .input-wrapper')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.get('[data-cy="taskDetail.removeLabel"]')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.task-view .details.labels-list .multiselect .input-wrapper')
|
|
||||||
.should('not.contain', labels[0].title)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can set a due date for a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
done: false,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Set Due Date')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Due Date')
|
|
||||||
.get('.date-input .datepicker .show')
|
|
||||||
.click()
|
|
||||||
cy.get('.datepicker .datepicker-popup button')
|
|
||||||
.contains('Tomorrow')
|
|
||||||
.click()
|
|
||||||
cy.get('[data-cy="closeDatepicker"]')
|
|
||||||
.contains('Confirm')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Due Date')
|
|
||||||
.get('.date-input .datepicker-popup')
|
|
||||||
.should('not.exist')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can set a priority for a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Set Priority')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Priority')
|
|
||||||
.get('.select select')
|
|
||||||
.select('Urgent')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Priority')
|
|
||||||
.get('.select select')
|
|
||||||
.should('have.value', '4')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can set the progress for a task', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .action-buttons .button')
|
|
||||||
.contains('Set Progress')
|
|
||||||
.click()
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Progress')
|
|
||||||
.get('.select select')
|
|
||||||
.select('50%')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
|
|
||||||
cy.wait(200)
|
|
||||||
|
|
||||||
cy.get('.task-view .columns.details .column')
|
|
||||||
.contains('Progress')
|
|
||||||
.get('.select select')
|
|
||||||
.should('be.visible')
|
|
||||||
.should('have.value', '0.5')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add an attachment to a task', () => {
|
|
||||||
TaskAttachmentFactory.truncate()
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
uploadAttachmentAndVerify(tasks[0].id)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can add an attachment to a task and see it appearing on kanban', () => {
|
|
||||||
TaskAttachmentFactory.truncate()
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
list_id: lists[0].id,
|
|
||||||
bucket_id: buckets[0].id,
|
|
||||||
})
|
|
||||||
const labels = LabelFactory.create(1)
|
|
||||||
LabelTaskFactory.truncate()
|
|
||||||
|
|
||||||
cy.visit(`/lists/${lists[0].id}/kanban`)
|
|
||||||
|
|
||||||
cy.get('.bucket .task')
|
|
||||||
.contains(tasks[0].title)
|
|
||||||
.click()
|
|
||||||
|
|
||||||
uploadAttachmentAndVerify(tasks[0].id)
|
|
||||||
|
|
||||||
cy.get('.modal-content .close')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.bucket .task .footer .icon svg.fa-paperclip')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Can check items off a checklist', () => {
|
|
||||||
const tasks = TaskFactory.create(1, {
|
|
||||||
id: 1,
|
|
||||||
description: `
|
|
||||||
This is a checklist:
|
|
||||||
|
|
||||||
* [ ] one item
|
|
||||||
* [ ] another item
|
|
||||||
* [ ] third item
|
|
||||||
* [ ] fourth item
|
|
||||||
* [x] and this one is already done
|
|
||||||
`,
|
|
||||||
})
|
|
||||||
cy.visit(`/tasks/${tasks[0].id}`)
|
|
||||||
|
|
||||||
cy.get('.task-view .checklist-summary')
|
|
||||||
.should('contain.text', '1 of 5 tasks')
|
|
||||||
cy.get('.editor .content ul > li input[type=checkbox]')
|
|
||||||
.eq(2)
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.editor .content ul > li input[type=checkbox]')
|
|
||||||
.eq(2)
|
|
||||||
.should('be.checked')
|
|
||||||
cy.get('.editor .content input[type=checkbox]')
|
|
||||||
.should('have.length', 5)
|
|
||||||
cy.get('.task-view .checklist-summary')
|
|
||||||
.should('contain.text', '2 of 5 tasks')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "@vue/tsconfig/tsconfig.web.json",
|
|
||||||
"include": ["./**/*", "../support/**/*", "../factories/**/*"],
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": ".",
|
|
||||||
"isolatedModules": false,
|
|
||||||
"target": "ES2015",
|
|
||||||
"lib": ["ESNext", "dom"],
|
|
||||||
"types": ["cypress"]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
import {UserFactory} from '../../factories/user'
|
|
||||||
|
|
||||||
const testAndAssertFailed = fixture => {
|
|
||||||
cy.visit('/login')
|
|
||||||
cy.get('input[id=username]').type(fixture.username)
|
|
||||||
cy.get('input[id=password]').type(fixture.password)
|
|
||||||
cy.get('.button').contains('Login').click()
|
|
||||||
|
|
||||||
cy.wait(5000) // It can take waaaayy too long to log the user in
|
|
||||||
cy.url().should('include', '/')
|
|
||||||
cy.get('div.message.danger').contains('Wrong username or password.')
|
|
||||||
}
|
|
||||||
|
|
||||||
const username = 'test'
|
|
||||||
|
|
||||||
context('Login', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
UserFactory.create(1, {username})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should log in with the right credentials', () => {
|
|
||||||
const fixture = {
|
|
||||||
username: 'test',
|
|
||||||
password: '1234',
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.visit('/login')
|
|
||||||
cy.get('input[id=username]').type(fixture.username)
|
|
||||||
cy.get('input[id=password]').type(fixture.password)
|
|
||||||
cy.get('.button').contains('Login').click()
|
|
||||||
cy.url().should('include', '/')
|
|
||||||
cy.clock(1625656161057) // 13:00
|
|
||||||
cy.get('h2').should('contain', `Hi ${fixture.username}!`)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with a bad password', () => {
|
|
||||||
const fixture = {
|
|
||||||
username: 'test',
|
|
||||||
password: '123456',
|
|
||||||
}
|
|
||||||
|
|
||||||
testAndAssertFailed(fixture)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should fail with a bad username', () => {
|
|
||||||
const fixture = {
|
|
||||||
username: 'loremipsum',
|
|
||||||
password: '1234',
|
|
||||||
}
|
|
||||||
|
|
||||||
testAndAssertFailed(fixture)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should redirect to /login when no user is logged in', () => {
|
|
||||||
cy.visit('/')
|
|
||||||
cy.url().should('include', '/login')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,46 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
import {createLists} from '../list/prepareLists'
|
|
||||||
|
|
||||||
function logout() {
|
|
||||||
cy.get('.navbar .username-dropdown-trigger')
|
|
||||||
.click()
|
|
||||||
cy.get('.navbar .dropdown-item')
|
|
||||||
.contains('Logout')
|
|
||||||
.click()
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Log out', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
it('Logs the user out', () => {
|
|
||||||
cy.visit('/')
|
|
||||||
|
|
||||||
expect(localStorage.getItem('token')).to.not.eq(null)
|
|
||||||
|
|
||||||
logout()
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/login')
|
|
||||||
.then(() => {
|
|
||||||
expect(localStorage.getItem('token')).to.eq(null)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it.skip('Should clear the list history after logging the user out', () => {
|
|
||||||
const lists = createLists()
|
|
||||||
cy.visit(`/lists/${lists[0].id}`)
|
|
||||||
.then(() => {
|
|
||||||
expect(localStorage.getItem('listHistory')).to.not.eq(null)
|
|
||||||
})
|
|
||||||
|
|
||||||
logout()
|
|
||||||
|
|
||||||
cy.wait(1000) // This makes re-loading of the list and associated entities (and the resulting error) visible
|
|
||||||
|
|
||||||
cy.url()
|
|
||||||
.should('contain', '/login')
|
|
||||||
.then(() => {
|
|
||||||
expect(localStorage.getItem('listHistory')).to.eq(null)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,48 +0,0 @@
|
||||||
// This test assumes no mailer is set up and all users are activated immediately.
|
|
||||||
|
|
||||||
import {UserFactory} from '../../factories/user'
|
|
||||||
|
|
||||||
context('Registration', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
UserFactory.create(1, {
|
|
||||||
username: 'test',
|
|
||||||
})
|
|
||||||
cy.visit('/', {
|
|
||||||
onBeforeLoad(win) {
|
|
||||||
win.localStorage.removeItem('token')
|
|
||||||
},
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Should work without issues', () => {
|
|
||||||
const fixture = {
|
|
||||||
username: 'testuser',
|
|
||||||
password: '123456',
|
|
||||||
email: 'testuser@example.com',
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.visit('/register')
|
|
||||||
cy.get('#username').type(fixture.username)
|
|
||||||
cy.get('#email').type(fixture.email)
|
|
||||||
cy.get('#password').type(fixture.password)
|
|
||||||
cy.get('#register-submit').click()
|
|
||||||
cy.url().should('include', '/')
|
|
||||||
cy.clock(1625656161057) // 13:00
|
|
||||||
cy.get('h2').should('contain', `Hi ${fixture.username}!`)
|
|
||||||
})
|
|
||||||
|
|
||||||
it.only('Should fail', () => {
|
|
||||||
const fixture = {
|
|
||||||
username: 'test',
|
|
||||||
password: '123456',
|
|
||||||
email: 'testuser@example.com',
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.visit('/register')
|
|
||||||
cy.get('#username').type(fixture.username)
|
|
||||||
cy.get('#email').type(fixture.email)
|
|
||||||
cy.get('#password').type(fixture.password)
|
|
||||||
cy.get('#register-submit').click()
|
|
||||||
cy.get('div.message.danger').contains('A user with this username already exists.')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,43 +0,0 @@
|
||||||
import {createFakeUserAndLogin} from '../../support/authenticateUser'
|
|
||||||
|
|
||||||
describe('User Settings', () => {
|
|
||||||
createFakeUserAndLogin()
|
|
||||||
|
|
||||||
it('Changes the user avatar', () => {
|
|
||||||
cy.intercept(`${Cypress.env('API_URL')}/user/settings/avatar/upload`).as('uploadAvatar')
|
|
||||||
|
|
||||||
cy.visit('/user/settings/avatar')
|
|
||||||
|
|
||||||
cy.get('input[name=avatarProvider][value=upload]')
|
|
||||||
.click()
|
|
||||||
cy.get('input[type=file]', {timeout: 1000})
|
|
||||||
.selectFile('cypress/fixtures/image.jpg', {force: true}) // The input is not visible, but on purpose
|
|
||||||
cy.get('.vue-handler-wrapper.vue-handler-wrapper--south .vue-simple-handler.vue-simple-handler--south')
|
|
||||||
.trigger('mousedown', {which: 1})
|
|
||||||
.trigger('mousemove', {clientY: 100})
|
|
||||||
.trigger('mouseup')
|
|
||||||
cy.get('[data-cy="uploadAvatar"]')
|
|
||||||
.contains('Upload Avatar')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.wait('@uploadAvatar')
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Updates the name', () => {
|
|
||||||
cy.visit('/user/settings/general')
|
|
||||||
|
|
||||||
cy.get('.general-settings .control input.input')
|
|
||||||
.first()
|
|
||||||
.type('Lorem Ipsum')
|
|
||||||
cy.get('[data-cy="saveGeneralSettings"]')
|
|
||||||
.contains('Save')
|
|
||||||
.click()
|
|
||||||
|
|
||||||
cy.get('.global-notification')
|
|
||||||
.should('contain', 'Success')
|
|
||||||
cy.get('.navbar .username-dropdown-trigger .username')
|
|
||||||
.should('contain', 'Lorem Ipsum')
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -1,19 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class BucketFactory extends Factory {
|
|
||||||
static table = 'buckets'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
title: faker.lorem.words(3),
|
|
||||||
list_id: 1,
|
|
||||||
created_by_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class LabelTaskFactory extends Factory {
|
|
||||||
static table = 'label_tasks'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
task_id: 1,
|
|
||||||
label_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class LabelFactory extends Factory {
|
|
||||||
static table = 'labels'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
title: faker.lorem.words(2),
|
|
||||||
description: faker.lorem.text(10),
|
|
||||||
hex_color: (Math.random()*0xFFFFFF<<0).toString(16), // random 6-digit hex number
|
|
||||||
created_by_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
|
|
||||||
export class LinkShareFactory extends Factory {
|
|
||||||
static table = 'link_shares'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
hash: faker.random.word(32),
|
|
||||||
list_id: 1,
|
|
||||||
right: 0,
|
|
||||||
sharing_type: 0,
|
|
||||||
shared_by_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
|
|
||||||
export class ListFactory extends Factory {
|
|
||||||
static table = 'lists'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
title: faker.lorem.words(3),
|
|
||||||
owner_id: 1,
|
|
||||||
namespace_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class NamespaceFactory extends Factory {
|
|
||||||
static table = 'namespaces'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
title: faker.lorem.words(3),
|
|
||||||
owner_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TaskFactory extends Factory {
|
|
||||||
static table = 'tasks'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
title: faker.lorem.words(3),
|
|
||||||
done: false,
|
|
||||||
list_id: 1,
|
|
||||||
created_by_id: 1,
|
|
||||||
index: '{increment}',
|
|
||||||
position: '{increment}',
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TaskAssigneeFactory extends Factory {
|
|
||||||
static table = 'task_assignees'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
task_id: 1,
|
|
||||||
user_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TaskAttachmentFactory extends Factory {
|
|
||||||
static table = 'task_attachments'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
task_id: 1,
|
|
||||||
file_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TaskCommentFactory extends Factory {
|
|
||||||
static table = 'task_comments'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
comment: faker.lorem.text(3),
|
|
||||||
author_id: 1,
|
|
||||||
task_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TeamFactory extends Factory {
|
|
||||||
static table = 'teams'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: faker.lorem.words(3),
|
|
||||||
created_by_id: 1,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class TeamMemberFactory extends Factory {
|
|
||||||
static table = 'team_members'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
return {
|
|
||||||
team_id: 1,
|
|
||||||
user_id: 1,
|
|
||||||
admin: false,
|
|
||||||
created: new Date().toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
import {faker} from '@faker-js/faker'
|
|
||||||
|
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class UserFactory extends Factory {
|
|
||||||
static table = 'users'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
username: faker.lorem.word(10) + faker.datatype.uuid(),
|
|
||||||
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234
|
|
||||||
status: 0,
|
|
||||||
issuer: 'local',
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
import {Factory} from '../support/factory'
|
|
||||||
|
|
||||||
export class UserListFactory extends Factory {
|
|
||||||
static table = 'users_lists'
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: '{increment}',
|
|
||||||
list_id: 1,
|
|
||||||
user_id: 1,
|
|
||||||
right: 0,
|
|
||||||
created: now.toISOString(),
|
|
||||||
updated: now.toISOString(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 872 KiB |
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
// This authenticates a user and puts the token in local storage which allows us to perform authenticated requests.
|
|
||||||
// Built after https://github.com/cypress-io/cypress-example-recipes/tree/bd2d6ffb33214884cab343d38e7f9e6ebffb323f/examples/logging-in__jwt
|
|
||||||
|
|
||||||
import {UserFactory} from '../factories/user'
|
|
||||||
|
|
||||||
export function login(user, cacheAcrossSpecs = false) {
|
|
||||||
if (!user) {
|
|
||||||
throw new Error('Needs user')
|
|
||||||
}
|
|
||||||
// Caching session when logging in via page visit
|
|
||||||
cy.session(`user__${user.username}`, () => {
|
|
||||||
cy.request('POST', `${Cypress.env('API_URL')}/login`, {
|
|
||||||
username: user.username,
|
|
||||||
password: '1234',
|
|
||||||
}).then(({ body }) => {
|
|
||||||
window.localStorage.setItem('token', body.token)
|
|
||||||
})
|
|
||||||
}, {
|
|
||||||
cacheAcrossSpecs,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createFakeUserAndLogin() {
|
|
||||||
let user
|
|
||||||
before(() => {
|
|
||||||
user = UserFactory.create(1)[0]
|
|
||||||
})
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
login(user, true)
|
|
||||||
})
|
|
||||||
|
|
||||||
return user
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
/// <reference types="cypress" />
|
|
||||||
// ***********************************************
|
|
||||||
// This example commands.ts shows you how to
|
|
||||||
// create various custom commands and overwrite
|
|
||||||
// existing commands.
|
|
||||||
//
|
|
||||||
// For more comprehensive examples of custom
|
|
||||||
// commands please read more here:
|
|
||||||
// https://on.cypress.io/custom-commands
|
|
||||||
// ***********************************************
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a parent command --
|
|
||||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a child command --
|
|
||||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a dual command --
|
|
||||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This will overwrite an existing command --
|
|
||||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
||||||
//
|
|
||||||
// declare global {
|
|
||||||
// namespace Cypress {
|
|
||||||
// interface Chainable {
|
|
||||||
// login(email: string, password: string): Chainable<void>
|
|
||||||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
||||||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
||||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
|
@ -1,12 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
||||||
<title>Components App</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div data-cy-root></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,29 +0,0 @@
|
||||||
// ***********************************************************
|
|
||||||
// This example support/component.ts is processed and
|
|
||||||
// loaded automatically before your test files.
|
|
||||||
//
|
|
||||||
// This is a great place to put global configuration and
|
|
||||||
// behavior that modifies Cypress.
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off
|
|
||||||
// automatically serving support files with the
|
|
||||||
// 'supportFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/configuration
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
|
||||||
import './commands'
|
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
|
||||||
// require('./commands')
|
|
||||||
|
|
||||||
import { mount } from 'cypress/vue'
|
|
||||||
// Ensure global styles are loaded
|
|
||||||
import '../../src/styles/global.scss';
|
|
||||||
|
|
||||||
Cypress.Commands.add('mount', mount)
|
|
||||||
|
|
||||||
// Example use:
|
|
||||||
// cy.mount(MyComponent)
|
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
import './commands'
|
|
||||||
import '@4tw/cypress-drag-drop'
|
|
||||||
|
|
||||||
// see https://github.com/cypress-io/cypress/issues/702#issuecomment-587127275
|
|
||||||
Cypress.on('window:before:load', (win) => {
|
|
||||||
// disable service workers
|
|
||||||
// @ts-ignore
|
|
||||||
delete win.navigator.__proto__.ServiceWorker
|
|
||||||
})
|
|
|
@ -1,52 +0,0 @@
|
||||||
import {seed} from './seed'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A factory makes it easy to seed the database with data.
|
|
||||||
*/
|
|
||||||
export class Factory {
|
|
||||||
static table = null
|
|
||||||
|
|
||||||
static factory() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Seeds a bunch of fake data into the database.
|
|
||||||
*
|
|
||||||
* Takes an override object as its single argument which will override the data from the factory.
|
|
||||||
* If the value of one of the override fields is `{increment}` that value will be replaced with an incrementing
|
|
||||||
* number through all created entities.
|
|
||||||
*
|
|
||||||
* @param override
|
|
||||||
* @returns {[]}
|
|
||||||
*/
|
|
||||||
static create(count = 1, override = {}, truncate = true) {
|
|
||||||
const data = []
|
|
||||||
|
|
||||||
for (let i = 1; i <= count; i++) {
|
|
||||||
const entry = {
|
|
||||||
...this.factory(),
|
|
||||||
...override,
|
|
||||||
}
|
|
||||||
for (const e in entry) {
|
|
||||||
if(typeof entry[e] === 'function') {
|
|
||||||
entry[e] = entry[e](i)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if (entry[e] === '{increment}') {
|
|
||||||
entry[e] = i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data.push(entry)
|
|
||||||
}
|
|
||||||
|
|
||||||
seed(this.table, data, truncate)
|
|
||||||
|
|
||||||
return data
|
|
||||||
}
|
|
||||||
|
|
||||||
static truncate() {
|
|
||||||
seed(this.table, null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/**
|
|
||||||
* Seeds a db table with data. If a data object is provided as the second argument, it will load the fixtures
|
|
||||||
* file for the table and merge the data from it with the passed data. This allows you to override specific
|
|
||||||
* fields of the fixtures without having to redeclare the whole fixture.
|
|
||||||
*
|
|
||||||
* Passing null as the second argument empties the table.
|
|
||||||
*
|
|
||||||
* @param table
|
|
||||||
* @param data
|
|
||||||
*/
|
|
||||||
export function seed(table, data = {}, truncate = true) {
|
|
||||||
if (data === null) {
|
|
||||||
data = []
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.request({
|
|
||||||
method: 'PATCH',
|
|
||||||
url: `${Cypress.env('API_URL')}/test/${table}?truncate=${truncate ? 'true' : 'false'}`,
|
|
||||||
headers: {
|
|
||||||
'Authorization': Cypress.env('TEST_SECRET'),
|
|
||||||
},
|
|
||||||
body: data,
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
export function updateUserSettings(settings) {
|
|
||||||
const token = `Bearer ${window.localStorage.getItem('token')}`
|
|
||||||
|
|
||||||
return cy.request({
|
|
||||||
method: 'GET',
|
|
||||||
url: `${Cypress.env('API_URL')}/user`,
|
|
||||||
headers: {
|
|
||||||
'Authorization': token,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.its('body')
|
|
||||||
.then(oldSettings => {
|
|
||||||
return cy.request({
|
|
||||||
method: 'POST',
|
|
||||||
url: `${Cypress.env('API_URL')}/user/settings/general`,
|
|
||||||
headers: {
|
|
||||||
'Authorization': token,
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
...oldSettings,
|
|
||||||
...settings,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "info: API URL is $VIKUNJA_API_URL"
|
|
||||||
echo "info: Sentry enabled: $VIKUNJA_SENTRY_ENABLED"
|
|
||||||
|
|
||||||
# Escape the variable to prevent sed from complaining
|
|
||||||
VIKUNJA_API_URL="$(echo "$VIKUNJA_API_URL" | sed -r 's/([:;])/\\\1/g')"
|
|
||||||
VIKUNJA_SENTRY_DSN="$(echo "$VIKUNJA_SENTRY_DSN" | sed -r 's/([:;])/\\\1/g')"
|
|
||||||
|
|
||||||
sed -ri "s:^(\s*window.API_URL\s*=)\s*.+:\1 '${VIKUNJA_API_URL}':g" /usr/share/nginx/html/index.html
|
|
||||||
sed -ri "s:^(\s*window.SENTRY_ENABLED\s*=)\s*.+:\1 ${VIKUNJA_SENTRY_ENABLED}:g" /usr/share/nginx/html/index.html
|
|
||||||
sed -ri "s:^(\s*window.SENTRY_DSN\s*=)\s*.+:\1 '${VIKUNJA_SENTRY_DSN}':g" /usr/share/nginx/html/index.html
|
|
||||||
|
|
||||||
date -uIseconds | xargs echo 'info: started at'
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
|
||||||
echo "info: IPv6 is not available! Removing IPv6 listen configuration"
|
|
||||||
find /etc/nginx/conf.d -name '*.conf' -type f | \
|
|
||||||
while IFS= read -r CONFIG; do
|
|
||||||
sed -r '/^\s*listen\s*\[::\]:.+$/d' "$CONFIG" > "$CONFIG.temp"
|
|
||||||
if ! diff -U 5 "$CONFIG" "$CONFIG.temp" > "$CONFIG.diff"; then
|
|
||||||
echo "info: Removing IPv6 lines from $CONFIG" | \
|
|
||||||
cat - "$CONFIG.diff"
|
|
||||||
echo "# IPv6 is disabled because /proc/net/if_inet6 was not found" | \
|
|
||||||
cat - "$CONFIG.temp" > "$CONFIG"
|
|
||||||
else
|
|
||||||
echo "info: Skipping $CONFIG because it does not have IPv6 listen"
|
|
||||||
fi
|
|
||||||
rm -f "$CONFIG.temp" "$CONFIG.diff"
|
|
||||||
done
|
|
||||||
fi
|
|
|
@ -1,112 +0,0 @@
|
||||||
# Generated by nginxconfig.io
|
|
||||||
# https://www.digitalocean.com/community/tools/nginx?domains.0.server.domain=localhost&domains.0.server.documentRoot=%2Fusr%2Fshare%2Fnginx%2Fhtml&domains.0.server.cdnSubdomain=true&domains.0.https.https=false&domains.0.php.php=false&domains.0.routing.index=index.html&domains.0.routing.fallbackHtml=true&domains.0.routing.fallbackPhp=false&global.performance.assetsExpiration=1d&global.performance.mediaExpiration=1d&global.performance.svgExpiration=1d&global.performance.fontsExpiration=1d&global.logging.accessLog=%2Fdev%2Fstdout&global.logging.errorLog=%2Fdev%2Fstderr%20warn&global.logging.logNotFound=true&global.nginx.user=nginx&global.nginx.pid=%2Fvar%2Frun%2Fnginx.pid&global.nginx.clientMaxBodySize=50&global.docker.dockerfile=true&global.tools.modularizedStructure=false&global.tools.symlinkVhost=false
|
|
||||||
# and then edited manually ;)
|
|
||||||
|
|
||||||
pid /tmp/nginx.pid;
|
|
||||||
worker_processes auto;
|
|
||||||
worker_rlimit_nofile 65535;
|
|
||||||
|
|
||||||
events {
|
|
||||||
multi_accept on;
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
charset utf-8;
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
server_tokens off;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
types_hash_bucket_size 64;
|
|
||||||
|
|
||||||
# rootless
|
|
||||||
client_body_temp_path /tmp/client_temp;
|
|
||||||
proxy_temp_path /tmp/proxy_temp_path;
|
|
||||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
|
||||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
|
||||||
scgi_temp_path /tmp/scgi_temp;
|
|
||||||
|
|
||||||
# MIME
|
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
types {
|
|
||||||
application/manifest+json webmanifest;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
log_format json escape=json
|
|
||||||
'{'
|
|
||||||
'"bytes_sent": "$bytes_sent",'
|
|
||||||
'"http_user_agent": "$http_user_agent",'
|
|
||||||
'"nginx_version": "$nginx_version",'
|
|
||||||
'"query_string": "$query_string",'
|
|
||||||
'"realip_remote_addr": "$realip_remote_addr",'
|
|
||||||
'"remote_addr": "$remote_addr",'
|
|
||||||
'"remote_user": "$remote_user",'
|
|
||||||
'"request_length": "$request_length",'
|
|
||||||
'"request_method": "$request_method",'
|
|
||||||
'"request_time": "$request_time",'
|
|
||||||
'"server_addr": "$server_addr",'
|
|
||||||
'"server_port": "$server_port",'
|
|
||||||
'"server_protocol": "$server_protocol",'
|
|
||||||
'"status": "$status",'
|
|
||||||
'"time_local": "$time_local",'
|
|
||||||
'"uri": "$uri"'
|
|
||||||
'}';
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
access_log /dev/stdout main;
|
|
||||||
error_log /dev/stderr warn;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
|
||||||
|
|
||||||
# compression
|
|
||||||
gzip on;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_buffers 16 8k;
|
|
||||||
gzip_http_version 1.1;
|
|
||||||
gzip_min_length 256;
|
|
||||||
gzip_types
|
|
||||||
text/plain
|
|
||||||
text/css
|
|
||||||
application/json
|
|
||||||
application/x-javascript
|
|
||||||
application/javascript
|
|
||||||
text/xml
|
|
||||||
application/xml
|
|
||||||
application/xml+rss
|
|
||||||
text/javascript
|
|
||||||
application/vnd.ms-fontobject
|
|
||||||
application/x-font-ttf
|
|
||||||
font/opentype
|
|
||||||
image/svg+xml
|
|
||||||
image/x-icon
|
|
||||||
audio/wav;
|
|
||||||
|
|
||||||
map_hash_max_size 128;
|
|
||||||
map_hash_bucket_size 128;
|
|
||||||
|
|
||||||
map $sent_http_content_type $expires {
|
|
||||||
default off;
|
|
||||||
text/css max;
|
|
||||||
application/javascript max;
|
|
||||||
text/javascript max;
|
|
||||||
application/vnd.ms-fontobject max;
|
|
||||||
application/x-font-ttf max;
|
|
||||||
font/opentype max;
|
|
||||||
font/woff2 max;
|
|
||||||
image/svg+xml max;
|
|
||||||
image/x-icon max;
|
|
||||||
audio/wav max;
|
|
||||||
~images/ max;
|
|
||||||
~font/ max;
|
|
||||||
}
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
server {
|
|
||||||
listen ${VIKUNJA_HTTP_PORT};
|
|
||||||
listen [::]:${VIKUNJA_HTTP_PORT};
|
|
||||||
## Needed when behind HAProxy with SSL termination + HTTP/2 support
|
|
||||||
listen ${VIKUNJA_HTTP2_PORT} default_server http2 proxy_protocol;
|
|
||||||
listen [::]:${VIKUNJA_HTTP2_PORT} default_server http2 proxy_protocol;
|
|
||||||
|
|
||||||
server_name _;
|
|
||||||
expires $expires;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
access_log /dev/stdout ${VIKUNJA_LOG_FORMAT};
|
|
||||||
# security headers
|
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
|
||||||
add_header Content-Security-Policy "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always;
|
|
||||||
add_header Permissions-Policy "interest-cohort=()" always;
|
|
||||||
|
|
||||||
# . files
|
|
||||||
location ~ /\.(?!well-known) {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
|
|
||||||
# assume that everything else is handled by the application router, by injecting the index.html.
|
|
||||||
location / {
|
|
||||||
autoindex off;
|
|
||||||
expires off;
|
|
||||||
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
|
|
||||||
try_files $uri /index.html =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# favicon.ico
|
|
||||||
location = /favicon.ico {
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# robots.txt
|
|
||||||
location = /robots.txt {
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
expires -1; # no-cache
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /ready {
|
|
||||||
return 200 "";
|
|
||||||
access_log off;
|
|
||||||
expires -1; # no-cache
|
|
||||||
}
|
|
||||||
|
|
||||||
# all assets contain hash in filename, cache forever
|
|
||||||
location ^~ /assets/ {
|
|
||||||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
|
|
||||||
try_files $uri =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# all workbox scripts are compiled with hash in filename, cache forever3
|
|
||||||
location ^~ /workbox- {
|
|
||||||
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
|
|
||||||
try_files $uri =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# assets, media
|
|
||||||
location ~* .(txt|webmanifest|css|js|mjs|map|svg|jpg|jpeg|png|ico|ttf|woff|woff2|wav)$ {
|
|
||||||
try_files $uri $uri/ =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html { }
|
|
||||||
|
|
||||||
}
|
|
9
env.config.d.ts
vendored
|
@ -1,9 +0,0 @@
|
||||||
declare module 'postcss-easings' {
|
|
||||||
import postcssEasings from 'postcss-easings'
|
|
||||||
export default postcssEasings
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module 'postcss-easing-gradients' {
|
|
||||||
import postcssEasingGradients from 'postcss-easing-gradients'
|
|
||||||
export default postcssEasingGradients
|
|
||||||
}
|
|
12
env.d.ts
vendored
|
@ -1,12 +0,0 @@
|
||||||
/// <reference types="vite/client" />
|
|
||||||
/// <reference types="vite-svg-loader" />
|
|
||||||
/// <reference types="cypress" />
|
|
||||||
/// <reference types="@histoire/plugin-vue/components" />
|
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
|
||||||
readonly VITE_IS_ONLINE: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImportMeta {
|
|
||||||
readonly env: ImportMetaEnv
|
|
||||||
}
|
|
25
flake.lock
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1664753041,
|
|
||||||
"narHash": "sha256-0ogaD8PaGHluARFeupofvk1Nq9gpVeZdlFM0Kcwguys=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a62844b302507c7531ad68a86cb7aa54704c9cb4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
10
flake.nix
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
description = "Vikunja frontend dev environment";
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
|
||||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
in {
|
|
||||||
defaultPackage.x86_64-linux =
|
|
||||||
pkgs.mkShell { buildInputs = [ pkgs.nodePackages.pnpm pkgs.cypress pkgs.git-cliff ]; };
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
import {defineConfig, defaultColors} from 'histoire'
|
|
||||||
import {HstVue} from '@histoire/plugin-vue'
|
|
||||||
import {HstScreenshot} from '@histoire/plugin-screenshot'
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
setupFile: './src/histoire.setup.ts',
|
|
||||||
storyIgnored: [
|
|
||||||
'**/node_modules/**',
|
|
||||||
'**/dist/**',
|
|
||||||
// see https://kolaente.dev/vikunja/frontend/pulls/2724#issuecomment-42012
|
|
||||||
'**/.direnv/**',
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
HstVue(),
|
|
||||||
HstScreenshot({
|
|
||||||
// Options here
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
title: 'Vikunja',
|
|
||||||
colors: {
|
|
||||||
// https://histoire.dev/guide/config.html#builtin-colors
|
|
||||||
gray: defaultColors.zinc,
|
|
||||||
primary: defaultColors.cyan,
|
|
||||||
},
|
|
||||||
// logo: {
|
|
||||||
// square: './img/square.png',
|
|
||||||
// light: './img/light.png',
|
|
||||||
// dark: './img/dark.png',
|
|
||||||
// },
|
|
||||||
// logoHref: 'https://acme.com',
|
|
||||||
// favicon: './favicon.ico',
|
|
||||||
},
|
|
||||||
})
|
|
32
index.html
|
@ -1,32 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
||||||
<title>Vikunja</title>
|
|
||||||
<meta name="description" content="Vikunja (/vɪˈkuːnjə/) - The to-do app to organize your life.">
|
|
||||||
<meta name="theme-color" content="#1973ff"/>
|
|
||||||
|
|
||||||
<link rel="icon" href="/favicon.ico">
|
|
||||||
<link rel="apple-touch-icon" href="/images/icons/apple-touch-icon-180x180.png"/>
|
|
||||||
<!--__vite-plugin-inject-preload__-->
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>
|
|
||||||
<strong>We're sorry but Vikunja doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
||||||
</noscript>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="module" src="/src/main.ts"></script>
|
|
||||||
<script>
|
|
||||||
//
|
|
||||||
// This variable points the frontend to the api.
|
|
||||||
// It has to be the full url, including the last /api/v1 part and port.
|
|
||||||
// You can change this if your api is not reachable on the same port as the frontend.
|
|
||||||
window.API_URL = 'http://localhost:3456/api/v1'
|
|
||||||
// Enable error tracking with sentry. If this is set to true, will send anonymized data to
|
|
||||||
// our sentry instance to notify us of potential problems.
|
|
||||||
window.SENTRY_ENABLED = false
|
|
||||||
window.SENTRY_DSN = 'https://85694a2d757547cbbc90cd4b55c5a18d@o1047380.ingest.sentry.io/6024480'
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
15
netlify.toml
|
@ -1,15 +0,0 @@
|
||||||
[build]
|
|
||||||
command = "pnpm run build"
|
|
||||||
publish = "dist-preview"
|
|
||||||
|
|
||||||
[[redirects]]
|
|
||||||
from = "/*"
|
|
||||||
to = "/index.html"
|
|
||||||
status = 200
|
|
||||||
|
|
||||||
[[headers]]
|
|
||||||
for = "/*"
|
|
||||||
[headers.values]
|
|
||||||
X-Frame-Options = "DENY"
|
|
||||||
X-XSS-Protection = "1; mode=block"
|
|
||||||
X-Robots-Tag = "noindex"
|
|
60
nginx.conf
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
user nginx;
|
||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
#tcp_nopush on;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_min_length 256;
|
||||||
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
|
||||||
|
listen 443 default_server ssl http2;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
ssl_certificate /etc/nginx/ssl/dummy.crt;
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/dummy.key;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
try_files $uri $uri/ /;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 10 KiB |
|
@ -1,149 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
||||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
||||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="16.000000pt" height="16.000000pt" viewBox="0 0 16.000000 16.000000"
|
|
||||||
preserveAspectRatio="xMidYMid meet">
|
|
||||||
<metadata>
|
|
||||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
|
||||||
</metadata>
|
|
||||||
<g transform="translate(0.000000,16.000000) scale(0.000320,-0.000320)"
|
|
||||||
fill="#000000" stroke="none">
|
|
||||||
<path d="M18 46618 c45 -75 122 -207 122 -211 0 -2 25 -45 55 -95 30 -50 55
|
|
||||||
-96 55 -102 0 -5 5 -10 10 -10 6 0 10 -4 10 -9 0 -5 73 -135 161 -288 89 -153
|
|
||||||
173 -298 187 -323 14 -25 32 -57 41 -72 88 -149 187 -324 189 -335 2 -7 8 -13
|
|
||||||
13 -13 5 0 9 -4 9 -10 0 -5 46 -89 103 -187 175 -302 490 -846 507 -876 8 -16
|
|
||||||
20 -36 25 -45 28 -46 290 -498 339 -585 13 -23 74 -129 136 -236 61 -107 123
|
|
||||||
-215 137 -240 14 -25 29 -50 33 -56 5 -5 23 -37 40 -70 18 -33 38 -67 44 -75
|
|
||||||
11 -16 21 -33 63 -109 14 -25 29 -50 33 -56 4 -5 21 -35 38 -65 55 -100 261
|
|
||||||
-455 269 -465 4 -5 14 -21 20 -35 15 -29 41 -75 103 -180 24 -41 52 -88 60
|
|
||||||
-105 9 -16 57 -100 107 -185 112 -193 362 -626 380 -660 8 -14 23 -38 33 -55
|
|
||||||
11 -16 23 -37 27 -45 4 -8 26 -46 48 -85 23 -38 53 -90 67 -115 46 -81 64
|
|
||||||
-113 178 -310 62 -107 121 -210 132 -227 37 -67 56 -99 85 -148 16 -27 32 -57
|
|
||||||
36 -65 4 -8 15 -27 25 -42 9 -15 53 -89 96 -165 44 -76 177 -307 296 -513 120
|
|
||||||
-206 268 -463 330 -570 131 -227 117 -203 200 -348 36 -62 73 -125 82 -140 10
|
|
||||||
-15 21 -34 25 -42 4 -8 20 -37 36 -65 17 -27 38 -65 48 -82 49 -85 64 -111 87
|
|
||||||
-153 13 -25 28 -49 32 -55 4 -5 78 -134 165 -285 87 -151 166 -288 176 -305
|
|
||||||
10 -16 26 -43 35 -59 9 -17 125 -217 257 -445 132 -229 253 -441 270 -471 17
|
|
||||||
-30 45 -79 64 -108 18 -29 33 -54 33 -57 0 -2 20 -37 44 -77 24 -40 123 -212
|
|
||||||
221 -383 97 -170 190 -330 205 -355 16 -25 39 -65 53 -90 13 -25 81 -144 152
|
|
||||||
-265 70 -121 137 -238 150 -260 12 -22 37 -65 55 -95 18 -30 43 -73 55 -95 12
|
|
||||||
-22 48 -85 80 -140 77 -132 163 -280 190 -330 13 -22 71 -123 130 -225 59
|
|
||||||
-102 116 -199 126 -217 10 -17 29 -50 43 -72 15 -22 26 -43 26 -45 0 -2 27
|
|
||||||
-50 60 -106 33 -56 60 -103 60 -105 0 -2 55 -98 90 -155 8 -14 182 -316 239
|
|
||||||
-414 13 -22 45 -79 72 -124 27 -46 49 -86 49 -89 0 -2 14 -24 30 -48 16 -24
|
|
||||||
30 -46 30 -49 0 -5 74 -135 100 -176 5 -8 24 -42 43 -75 50 -88 58 -101 262
|
|
||||||
-455 104 -179 199 -345 213 -370 14 -25 28 -49 32 -55 4 -5 17 -26 28 -45 10
|
|
||||||
-19 62 -109 114 -200 114 -197 133 -230 170 -295 16 -27 33 -57 38 -65 17 -28
|
|
||||||
96 -165 103 -180 4 -8 16 -28 26 -45 10 -16 77 -131 148 -255 72 -124 181
|
|
||||||
-313 243 -420 62 -107 121 -209 131 -227 35 -62 323 -560 392 -678 38 -66 83
|
|
||||||
-145 100 -175 16 -30 33 -59 37 -65 4 -5 17 -27 29 -47 34 -61 56 -100 90
|
|
||||||
-156 17 -29 31 -55 31 -57 0 -2 17 -32 39 -67 21 -35 134 -229 251 -433 117
|
|
||||||
-203 235 -407 261 -451 27 -45 49 -85 49 -88 0 -4 8 -19 19 -34 15 -21 200
|
|
||||||
-341 309 -533 10 -19 33 -58 51 -87 17 -29 31 -54 31 -56 0 -2 25 -44 55 -94
|
|
||||||
30 -50 55 -95 55 -98 0 -4 6 -15 14 -23 7 -9 27 -41 43 -71 17 -30 170 -297
|
|
||||||
342 -594 171 -296 311 -542 311 -547 0 -5 5 -9 10 -9 6 0 10 -4 10 -10 0 -5
|
|
||||||
22 -47 49 -92 27 -46 58 -99 68 -118 24 -43 81 -140 93 -160 5 -8 66 -114 135
|
|
||||||
-235 69 -121 130 -227 135 -235 12 -21 259 -447 283 -490 10 -19 28 -47 38
|
|
||||||
-62 11 -14 19 -29 19 -32 0 -3 37 -69 83 -148 99 -170 305 -526 337 -583 13
|
|
||||||
-22 31 -53 41 -70 11 -16 22 -37 26 -45 7 -14 82 -146 103 -180 14 -24 181
|
|
||||||
-311 205 -355 13 -22 46 -80 75 -130 29 -49 64 -110 78 -135 14 -25 51 -88 82
|
|
||||||
-140 31 -52 59 -102 63 -110 4 -8 18 -33 31 -55 205 -353 284 -489 309 -535
|
|
||||||
17 -30 45 -78 62 -106 18 -28 36 -60 39 -72 4 -12 12 -22 17 -22 5 0 9 -4 9
|
|
||||||
-10 0 -5 109 -197 241 -427 133 -230 250 -431 259 -448 51 -90 222 -385 280
|
|
||||||
-485 37 -63 78 -135 92 -160 14 -25 67 -117 118 -205 51 -88 101 -175 111
|
|
||||||
-193 34 -58 55 -95 149 -257 51 -88 101 -173 110 -190 9 -16 76 -131 147 -255
|
|
||||||
72 -124 140 -241 151 -260 61 -108 281 -489 355 -615 38 -66 77 -133 87 -150
|
|
||||||
35 -63 91 -161 100 -175 14 -23 99 -169 128 -220 54 -97 135 -235 142 -245 4
|
|
||||||
-5 20 -32 35 -60 26 -48 238 -416 276 -480 10 -16 26 -46 37 -65 30 -53 382
|
|
||||||
-661 403 -695 10 -16 22 -37 26 -45 4 -8 26 -48 50 -88 24 -41 43 -75 43 -77
|
|
||||||
0 -2 22 -40 50 -85 27 -45 50 -84 50 -86 0 -3 38 -69 83 -147 84 -142 302
|
|
||||||
-520 340 -587 10 -19 34 -60 52 -90 18 -30 44 -75 57 -100 14 -25 45 -79 70
|
|
||||||
-120 25 -41 56 -96 70 -121 14 -25 77 -133 138 -240 62 -107 122 -210 132
|
|
||||||
-229 25 -43 310 -535 337 -581 11 -19 26 -45 34 -59 17 -32 238 -414 266 -460
|
|
||||||
11 -19 24 -41 28 -49 3 -7 75 -133 160 -278 84 -146 153 -269 153 -274 0 -5 5
|
|
||||||
-9 10 -9 6 0 10 -4 10 -10 0 -5 82 -150 181 -322 182 -314 201 -346 240 -415
|
|
||||||
12 -21 80 -139 152 -263 71 -124 141 -245 155 -270 14 -25 28 -49 32 -55 6 -8
|
|
||||||
145 -248 220 -380 37 -66 209 -362 229 -395 11 -19 24 -42 28 -49 4 -8 67
|
|
||||||
-118 140 -243 73 -125 133 -230 133 -233 0 -2 15 -28 33 -57 19 -29 47 -78 64
|
|
||||||
-108 17 -30 53 -93 79 -139 53 -90 82 -141 157 -272 82 -142 115 -199 381
|
|
||||||
-659 142 -245 268 -463 281 -485 12 -22 71 -125 132 -230 60 -104 172 -298
|
|
||||||
248 -430 76 -132 146 -253 156 -270 11 -16 22 -36 26 -44 3 -8 30 -54 60 -103
|
|
||||||
29 -49 53 -91 53 -93 0 -3 18 -34 40 -70 22 -36 40 -67 40 -69 0 -2 37 -66 81
|
|
||||||
-142 45 -77 98 -168 119 -204 20 -36 47 -81 58 -100 12 -19 27 -47 33 -62 6
|
|
||||||
-16 15 -28 20 -28 5 0 9 -4 9 -9 0 -6 63 -118 140 -251 77 -133 140 -243 140
|
|
||||||
-245 0 -2 18 -33 41 -70 22 -37 49 -83 60 -101 10 -19 29 -51 40 -71 25 -45
|
|
||||||
109 -189 126 -218 7 -11 17 -29 22 -40 6 -11 22 -38 35 -60 14 -22 37 -62 52
|
|
||||||
-90 14 -27 35 -62 45 -77 11 -14 19 -29 19 -32 0 -3 18 -35 40 -71 22 -36 40
|
|
||||||
-67 40 -69 0 -2 19 -35 42 -72 23 -38 55 -94 72 -124 26 -47 139 -244 171
|
|
||||||
-298 6 -9 21 -36 34 -60 28 -48 37 -51 51 -19 6 12 19 36 29 52 10 17 27 46
|
|
||||||
38 65 11 19 104 181 208 360 103 179 199 345 213 370 14 25 42 74 64 109 21
|
|
||||||
34 38 65 38 67 0 2 18 33 40 69 22 36 40 67 40 69 0 3 177 310 199 346 16 26
|
|
||||||
136 234 140 244 2 5 25 44 52 88 27 44 49 81 49 84 0 2 18 34 40 70 22 36 40
|
|
||||||
67 40 69 0 2 20 36 43 77 35 58 169 289 297 513 9 17 50 86 90 155 40 69 86
|
|
||||||
150 103 180 16 30 35 62 41 70 6 8 16 24 22 35 35 64 72 129 167 293 59 100
|
|
||||||
116 199 127 220 11 20 30 53 41 72 43 72 1070 1850 1121 1940 14 25 65 113
|
|
||||||
113 195 48 83 96 166 107 185 10 19 28 50 38 68 11 18 73 124 137 235 64 111
|
|
||||||
175 303 246 427 71 124 173 299 225 390 52 91 116 202 143 248 27 45 49 85 49
|
|
||||||
89 0 4 6 14 14 22 7 9 28 43 46 76 26 47 251 436 378 655 11 19 29 51 40 70
|
|
||||||
11 19 101 176 201 348 99 172 181 317 181 323 0 5 5 9 10 9 6 0 10 5 10 11 0
|
|
||||||
6 8 23 18 37 11 15 32 52 49 82 16 30 130 228 253 440 122 212 234 405 248
|
|
||||||
430 13 25 39 70 57 100 39 65 69 117 130 225 25 44 50 87 55 95 12 19 78 134
|
|
||||||
220 380 61 107 129 224 150 260 161 277 222 382 246 425 15 28 47 83 71 123
|
|
||||||
24 41 43 78 43 83 0 5 4 9 8 9 4 0 13 12 19 28 7 15 23 45 36 67 66 110 277
|
|
||||||
478 277 483 0 3 6 13 14 21 7 9 27 41 43 71 17 30 45 80 63 110 34 57 375 649
|
|
||||||
394 685 6 11 16 27 22 35 6 8 26 42 44 75 18 33 41 74 51 90 10 17 24 41 32
|
|
||||||
55 54 97 72 128 88 152 11 14 19 28 19 30 0 3 79 141 175 308 96 167 175 305
|
|
||||||
175 308 0 3 6 13 14 21 7 9 26 39 41 66 33 60 276 483 338 587 24 40 46 80 50
|
|
||||||
88 4 8 13 24 20 35 14 23 95 163 125 215 11 19 52 91 92 160 40 69 80 139 90
|
|
||||||
155 9 17 103 179 207 360 105 182 200 346 211 365 103 181 463 802 489 845 7
|
|
||||||
11 15 27 19 35 4 8 29 51 55 95 64 110 828 1433 848 1470 9 17 24 41 33 55 9
|
|
||||||
14 29 48 45 77 15 28 52 93 82 145 30 51 62 107 71 123 17 30 231 398 400 690
|
|
||||||
51 88 103 179 115 202 12 23 26 48 32 55 6 7 24 38 40 68 17 30 61 107 98 170
|
|
||||||
37 63 84 144 103 180 19 36 41 72 48 81 8 8 14 18 14 21 0 4 27 51 59 106 32
|
|
||||||
55 72 124 89 154 16 29 71 125 122 213 51 88 104 180 118 205 13 25 28 50 32
|
|
||||||
55 4 6 17 26 28 45 11 19 45 80 77 135 31 55 66 116 77 135 11 19 88 152 171
|
|
||||||
295 401 694 620 1072 650 1125 11 19 87 152 170 295 83 143 158 273 166 288 9
|
|
||||||
16 21 36 26 45 6 9 31 52 55 96 25 43 54 94 66 115 11 20 95 164 186 321 91
|
|
||||||
157 173 299 182 315 9 17 26 46 37 65 12 19 66 114 121 210 56 96 108 186 117
|
|
||||||
200 8 14 24 40 34 59 24 45 383 664 412 713 5 9 17 29 26 45 15 28 120 210
|
|
||||||
241 419 36 61 68 117 72 125 4 8 12 23 19 34 35 57 245 420 262 453 11 20 35
|
|
||||||
61 53 90 17 29 32 54 32 56 0 3 28 51 62 108 33 57 70 119 80 138 10 19 23 42
|
|
||||||
28 50 5 8 32 53 59 100 27 47 149 258 271 470 122 212 234 405 248 430 30 53
|
|
||||||
62 108 80 135 6 11 15 27 19 35 4 8 85 150 181 315 96 165 187 323 202 350 31
|
|
||||||
56 116 202 130 225 5 8 25 42 43 75 19 33 92 159 162 280 149 257 157 271 202
|
|
||||||
350 19 33 38 67 43 75 9 14 228 392 275 475 12 22 55 96 95 165 40 69 80 139
|
|
||||||
90 155 24 42 202 350 221 383 9 15 27 47 41 72 14 25 75 131 136 236 61 106
|
|
||||||
121 210 134 232 99 172 271 470 279 482 5 8 23 40 40 70 18 30 81 141 142 245
|
|
||||||
60 105 121 210 135 235 14 25 71 124 127 220 56 96 143 247 194 335 51 88 96
|
|
||||||
167 102 175 14 24 180 311 204 355 23 43 340 590 356 615 5 8 50 87 101 175
|
|
||||||
171 301 517 898 582 1008 25 43 46 81 46 83 0 2 12 23 27 47 14 23 40 67 56
|
|
||||||
97 16 30 35 62 42 70 7 8 15 22 18 30 4 8 20 38 37 65 16 28 33 57 37 65 6 12
|
|
||||||
111 196 143 250 5 8 55 95 112 193 57 98 113 195 126 215 12 20 27 46 32 57 6
|
|
||||||
11 14 27 20 35 5 8 76 130 156 270 80 140 165 287 187 325 23 39 52 90 66 115
|
|
||||||
13 25 30 52 37 61 8 8 14 18 14 21 0 4 41 77 92 165 50 87 175 302 276 478
|
|
||||||
101 176 208 360 236 408 28 49 67 117 86 152 19 35 41 70 48 77 6 6 12 15 12
|
|
||||||
19 0 7 124 224 167 291 12 21 23 40 23 42 0 2 21 40 46 83 26 43 55 92 64 109
|
|
||||||
54 95 327 568 354 614 19 30 45 75 59 100 71 128 82 145 89 148 4 2 8 8 8 13
|
|
||||||
0 5 42 82 94 172 311 538 496 858 518 897 14 25 40 70 58 100 18 30 42 71 53
|
|
||||||
90 10 19 79 139 152 265 73 127 142 246 153 265 10 19 43 76 72 125 29 50 63
|
|
||||||
108 75 130 65 116 80 140 87 143 4 2 8 8 8 12 0 8 114 212 140 250 6 8 14 24
|
|
||||||
20 35 5 11 54 97 108 190 l100 170 -9611 3 c-5286 1 -9614 -1 -9618 -5 -5 -6
|
|
||||||
-419 -719 -619 -1068 -89 -155 -267 -463 -323 -560 -38 -66 -81 -140 -95 -165
|
|
||||||
-31 -56 -263 -457 -526 -910 -110 -190 -224 -388 -254 -440 -29 -52 -61 -109
|
|
||||||
-71 -125 -23 -39 -243 -420 -268 -465 -11 -19 -204 -352 -428 -740 -224 -388
|
|
||||||
-477 -826 -563 -975 -85 -148 -185 -322 -222 -385 -37 -63 -120 -207 -185
|
|
||||||
-320 -65 -113 -177 -306 -248 -430 -72 -124 -172 -297 -222 -385 -51 -88 -142
|
|
||||||
-245 -202 -350 -131 -226 -247 -427 -408 -705 -65 -113 -249 -432 -410 -710
|
|
||||||
-160 -278 -388 -673 -506 -877 -118 -205 -216 -373 -219 -373 -3 0 -52 82
|
|
||||||
-109 183 -58 100 -144 250 -192 332 -95 164 -402 696 -647 1120 -85 149 -228
|
|
||||||
396 -317 550 -212 365 -982 1700 -1008 1745 -10 19 -43 76 -72 125 -29 50 -64
|
|
||||||
110 -77 135 -14 25 -63 110 -110 190 -47 80 -96 165 -110 190 -14 25 -99 171
|
|
||||||
-188 325 -89 154 -174 300 -188 325 -13 25 -64 113 -112 195 -48 83 -140 242
|
|
||||||
-205 355 -65 113 -183 317 -263 454 -79 137 -152 264 -163 282 -50 89 -335
|
|
||||||
583 -354 614 -12 19 -34 58 -50 85 -15 28 -129 226 -253 440 -124 215 -235
|
|
||||||
408 -247 430 -12 22 -69 121 -127 220 -58 99 -226 389 -373 645 -148 256 -324
|
|
||||||
561 -392 678 -67 117 -134 232 -147 255 -13 23 -33 59 -46 80 l-22 37 -9615 0
|
|
||||||
-9615 0 20 -32z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 174 KiB |