From 9159fb47fecd1af662343453b56b4fbefa09ba29 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 16 Nov 2018 12:33:23 +0100 Subject: [PATCH 1/9] improved input and button accessibility --- pages/login.vue | 6 +++++- .../src/system/components/data-input/Input/Input.vue | 9 ++++++++- .../src/system/components/navigation/Button/Button.vue | 8 ++++++++ yarn.lock | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pages/login.vue b/pages/login.vue index 44a9108c8..83818a837 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -37,6 +37,7 @@ v-model="form.email" placeholder="Deine E-Mail" type="email" + name="email" icon="envelope"/> + full-width + name="submit" + type="submit"> Anmelden diff --git a/styleguide/src/system/components/data-input/Input/Input.vue b/styleguide/src/system/components/data-input/Input/Input.vue index a955dd0f4..6d19c3956 100644 --- a/styleguide/src/system/components/data-input/Input/Input.vue +++ b/styleguide/src/system/components/data-input/Input/Input.vue @@ -13,7 +13,7 @@ iconRight && `ds-input-has-icon-right` ]" :id="id" - :name="model" + :name="name" :type="type" :autofocus="autofocus" :placeholder="placeholder" @@ -63,6 +63,13 @@ export default { type: String, default: null }, + /** + * The name of the field for better accessibility + */ + name: { + type: String, + default: null + }, /** * Whether the input should be automatically focused */ diff --git a/styleguide/src/system/components/navigation/Button/Button.vue b/styleguide/src/system/components/navigation/Button/Button.vue index 208e3269d..d806a9d6e 100644 --- a/styleguide/src/system/components/navigation/Button/Button.vue +++ b/styleguide/src/system/components/navigation/Button/Button.vue @@ -13,6 +13,7 @@ fullWidth && `ds-button-full-width`, loading && `ds-button-loading` ]" + :name="name" v-bind="bindings" :is="linkTag"> Date: Fri, 16 Nov 2018 12:34:09 +0100 Subject: [PATCH 2/9] added integration testing, starting with basic authentication testing --- cypress.json | 1 + cypress/fixtures/example.json | 5 ++ cypress/integration/login/login.spec.js | 73 +++++++++++++++++++++++++ cypress/plugins/index.js | 17 ++++++ cypress/support/commands.js | 25 +++++++++ cypress/support/index.js | 20 +++++++ 6 files changed, 141 insertions(+) create mode 100644 cypress.json create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/integration/login/login.spec.js create mode 100644 cypress/plugins/index.js create mode 100644 cypress/support/commands.js create mode 100644 cypress/support/index.js diff --git a/cypress.json b/cypress.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/cypress.json @@ -0,0 +1 @@ +{} diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 000000000..da18d9352 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} \ No newline at end of file diff --git a/cypress/integration/login/login.spec.js b/cypress/integration/login/login.spec.js new file mode 100644 index 000000000..33054bb7d --- /dev/null +++ b/cypress/integration/login/login.spec.js @@ -0,0 +1,73 @@ +/// + +const loginTestUser = function () { + // Visiting our app before each test removes any state build up from + cy.visit('http://localhost:3000/') + .get('.layout-blank') + .should('be.visible') + + cy.location('pathname') + .should('contain', '/login') + + cy.get('input[name=email]') + .as('inputEmail') + .should('be.empty') + .and('have.attr', 'placeholder', 'Deine E-Mail') + .trigger('focus') + .type('user@example.org') + + cy.get('input[name=password]') + .as('inputPassword') + .should('be.empty') + // .and('have.attr', 'placeholder', 'Dein Passwort') + .trigger('focus') + .type('1234') + + cy.get('button[name=submit]') + .as('submitButton') + .should('be.visible') + .and('not.be.disabled') + .click() + + cy.get('@submitButton') + .should('be.disabled') + // .next('.snackbar') + + cy.get('.layout-default') + + cy.location('pathname') + .should('eq', '/') +} + +const logout = function () { + cy.visit('http://localhost:3000/logout') + + cy.location('pathname') + .should('contain', '/login') + + cy.get('.layout-blank') + .should('be.visible') +} + +context('Authentication', () => { + it('Login Testuser', loginTestUser) + + it('Login & Logout', function () { + // login + loginTestUser() + + // logout + logout() + }) + + it('Still logged in after page-reload', function () { + // login + loginTestUser() + + cy.reload() + .get('.layout-default') + + // logout + // logout() + }) +}) diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 000000000..fd170fba6 --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,17 @@ +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/cypress/support/commands.js b/cypress/support/commands.js new file mode 100644 index 000000000..c1f5a772e --- /dev/null +++ b/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js 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 is will overwrite an existing command -- +// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/cypress/support/index.js b/cypress/support/index.js new file mode 100644 index 000000000..d68db96df --- /dev/null +++ b/cypress/support/index.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js 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') From 6c7353bb216a81641c9cb3d623a7e082ea066c94 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 16 Nov 2018 12:51:48 +0100 Subject: [PATCH 3/9] ignore cypress video --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d2abe8e9b..72ddbc7d4 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,5 @@ dist # TEMORIRY static/uploads + +cypress/videos From eb29311cbb28403b740ada5a59db0bb79837bac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 4 Dec 2018 00:56:30 +0100 Subject: [PATCH 4/9] Copy+paste deployment configuration from backend See these commits: 5eae8a89785798519aec66fb708389f6e5ea0327 1b8edc22ff8b900c45486b815a8c9d4465e7edb7 --- .travis.yml | 16 ++++++++++++++++ scripts/deploy.sh | 4 ++++ 2 files changed, 20 insertions(+) create mode 100755 scripts/deploy.sh diff --git a/.travis.yml b/.travis.yml index da827f262..bbd211c18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,3 +28,19 @@ after_failure: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - chmod +x send.sh - ./send.sh failure $WEBHOOK_URL + +deploy: + - provider: script + script: scripts/deploy.sh nitro.human-connection.org + on: + branch: master + tags: true + - provider: script + script: scripts/deploy.sh nitro-staging.human-connection.org + on: + branch: master + - provider: script + script: scripts/deploy.sh "nitro-$(git rev-parse --short HEAD).human-connection.org" + on: + tags: true + all_branches: true diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 000000000..b66b63a77 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "See me deployed at $1 :)" + From 05dcfab27ae0f72fad0256cd5881c3efc192355f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 4 Dec 2018 04:36:22 +0000 Subject: [PATCH 5/9] Bump eslint-plugin-vue from 4.7.1 to 5.0.0 Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 4.7.1 to 5.0.0. - [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases) - [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v4.7.1...v5.0.0) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 62 ++++++++++++++-------------------------------------- 2 files changed, 18 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index ce7e25f4d..07e97795c 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "eslint-config-prettier": "^3.1.0", "eslint-loader": "^2.0.0", "eslint-plugin-prettier": "3.0.0", - "eslint-plugin-vue": "^4.0.0", + "eslint-plugin-vue": "^5.0.0", "jest": "^23.6.0", "node-sass": "^4.9.3", "nodemon": "^1.11.0", diff --git a/yarn.lock b/yarn.lock index c7867ef37..26b3e9c4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1359,13 +1359,6 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= - dependencies: - acorn "^3.0.4" - acorn-jsx@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" @@ -1376,12 +1369,7 @@ acorn-walk@^6.0.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= - -acorn@^5.0.0, acorn@^5.5.0, acorn@^5.5.3, acorn@^5.6.2, acorn@^5.7.3: +acorn@^5.0.0, acorn@^5.5.3, acorn@^5.6.2, acorn@^5.7.3: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== @@ -4213,12 +4201,12 @@ eslint-plugin-prettier@3.0.0, eslint-plugin-prettier@^3.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-vue@^4.0.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-4.7.1.tgz#c829b9fc62582c1897b5a0b94afd44ecca511e63" - integrity sha512-esETKhVMI7Vdli70Wt4bvAwnZBJeM0pxVX9Yb0wWKxdCJc2EADalVYK/q2FzMw8oKN0wPMdqVCKS8kmR89recA== +eslint-plugin-vue@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.0.0.tgz#4a2cc1c0e71ea45e1bd9c1a60f925bfe68bb5710" + integrity sha512-mSv2Ebz3RaPP+XJO/mu7F+SdR9lrMyGISSExnarLFqqf3pF5wTmwWNrhHW1o9zKzKI811UVTIIkWJJvgO6SsUQ== dependencies: - vue-eslint-parser "^2.0.3" + vue-eslint-parser "^4.0.2" eslint-scope@3.7.1: version "3.7.1" @@ -4228,14 +4216,6 @@ eslint-scope@3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^3.7.1: - version "3.7.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" - integrity sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -4303,15 +4283,7 @@ esm@^3.0.84: resolved "https://registry.yarnpkg.com/esm/-/esm-3.0.84.tgz#bb108989f4673b32d4f62406869c28eed3815a63" integrity sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw== -espree@^3.5.2: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" - integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== - dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" - -espree@^4.0.0: +espree@^4.0.0, espree@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f" integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w== @@ -4330,7 +4302,7 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.0, esquery@^1.0.1: +esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== @@ -10536,17 +10508,17 @@ vue-count-to@^1.0.13: resolved "https://registry.yarnpkg.com/vue-count-to/-/vue-count-to-1.0.13.tgz#3e7573ea6e64c2b2972f64e0a2ab2e23c7590ff3" integrity sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ== -vue-eslint-parser@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1" - integrity sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw== +vue-eslint-parser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-4.0.2.tgz#7d10ec5b67d9b2ef240cac0f0e8b2f03773d810e" + integrity sha512-A+teFdsAVtVawd4rtLsv8q6uuj2MYt3Uw+GCodqEkjozB3g20G91hbukz60yWa9IUx/yFz+JzKBu/3Djkod36g== dependencies: - debug "^3.1.0" - eslint-scope "^3.7.1" + debug "^4.1.0" + eslint-scope "^4.0.0" eslint-visitor-keys "^1.0.0" - espree "^3.5.2" - esquery "^1.0.0" - lodash "^4.17.4" + espree "^4.1.0" + esquery "^1.0.1" + lodash "^4.17.11" vue-hot-reload-api@^2.3.0: version "2.3.1" From 56ed20f3bf7b57d2011d85873522b6967ad9e98f Mon Sep 17 00:00:00 2001 From: JB Date: Tue, 4 Dec 2018 22:02:15 +0100 Subject: [PATCH 6/9] Use kebab-case for components in templates --- .eslintrc.js | 3 +- components/Author.vue | 44 ++++++++----- components/Badges.vue | 9 ++- components/CountTo.vue | 3 +- components/FollowButton.vue | 5 +- components/LoadMore.vue | 6 +- components/Logo.vue | 8 +-- components/PostCard.vue | 12 ++-- components/ShoutButton.vue | 11 +++- layouts/blank.vue | 2 +- layouts/default.vue | 24 ++++--- pages/admin.vue | 3 +- pages/admin/index.vue | 54 ++++++++++------ pages/index.vue | 9 ++- pages/login.vue | 37 +++++++---- pages/logout.vue | 17 +++-- pages/post/_slug.vue | 3 +- pages/post/_slug/index.vue | 47 +++++++++----- pages/post/_slug/more-info.vue | 25 +++++--- pages/profile/_slug.vue | 110 ++++++++++++++++++++++----------- pages/settings.vue | 3 +- 21 files changed, 294 insertions(+), 141 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 25a4edfe4..fdc9bfb5e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,6 +19,7 @@ module.exports = { // add your custom rules here rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'vue/component-name-in-template-casing': ['error', 'kebab-case'] } } diff --git a/components/Author.vue b/components/Author.vue index f307bc19b..53379afa8 100644 --- a/components/Author.vue +++ b/components/Author.vue @@ -5,29 +5,36 @@ :open-group="Math.random().toString()" placement="top-start" trigger="manual" - offset="0"> + offset="0" + > + @mouseleave="popoveMouseLeave" + >
+ size="32px" + />
{{ author.name | truncate(trunc, 18) }} + style="vertical-align: middle;" + > + {{ author.name | truncate(trunc, 18) }} + @@ -37,7 +44,8 @@ slot="popover" style="min-width: 250px;" @mouseover="popoverMouseEnter" - @mouseleave="popoveMouseLeave"> + @mouseleave="popoveMouseLeave" + > + :show-author-popover="showAuthorPopover" + /> + gutter="small" + > @@ -152,7 +186,8 @@ + :end-val="user.contributionsCount" + /> @@ -164,7 +199,8 @@ + :end-val="user.commentsCount" + /> @@ -176,7 +212,8 @@ + :end-val="user.shoutedCount" + /> @@ -186,17 +223,20 @@ + > + :show-author-popover="false" + /> + @click="showMoreContributions" + />
diff --git a/pages/settings.vue b/pages/settings.vue index 7b625e742..cf93cbfa4 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -10,7 +10,8 @@ + appear + > From 38f27743f29a789432b3ffed0b79070f69096579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Thu, 6 Dec 2018 15:07:14 +0100 Subject: [PATCH 7/9] Remove remains of cypress I love cypress already. However my suggestion is to create a separate repository that includes `backend` and `web` run full stack tests from there. It is possible to trigger builds in other repositories on Travis CI. So here is my suggestion: We agree to have matching branch names in all related repositories, so `branch-1` in repo `web`, `backend` and `human-connection`. As a start, the developer has to manually update the submodules in the meta repository and trigger a build to run fullstack tests. In the future we might automate this process by triggering builds in other repos. That's possible on Travis CI, see: https://docs.travis-ci.com/user/triggering-builds/ See each repository is responsible to keep their set of unit/integration tests but the meta repository is responsible of carrying out full stack testing. @appinteractive your opinion? --- .eslintignore | 1 - .gitignore | 2 - cypress/fixtures/example.json | 5 -- cypress/integration/login/login.spec.js | 73 ------------------------- cypress/plugins/index.js | 17 ------ cypress/support/commands.js | 25 --------- cypress/support/index.js | 20 ------- 7 files changed, 143 deletions(-) delete mode 100644 cypress/fixtures/example.json delete mode 100644 cypress/integration/login/login.spec.js delete mode 100644 cypress/plugins/index.js delete mode 100644 cypress/support/commands.js delete mode 100644 cypress/support/index.js diff --git a/.eslintignore b/.eslintignore index 69d9ce171..70c6bda91 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ node_modules build .nuxt -cypress/ styleguide/ diff --git a/.gitignore b/.gitignore index 2302df1f9..af1dfbaa0 100644 --- a/.gitignore +++ b/.gitignore @@ -75,5 +75,3 @@ dist # TEMORIRY static/uploads - -cypress/videos diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index da18d9352..000000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} \ No newline at end of file diff --git a/cypress/integration/login/login.spec.js b/cypress/integration/login/login.spec.js deleted file mode 100644 index 33054bb7d..000000000 --- a/cypress/integration/login/login.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -/// - -const loginTestUser = function () { - // Visiting our app before each test removes any state build up from - cy.visit('http://localhost:3000/') - .get('.layout-blank') - .should('be.visible') - - cy.location('pathname') - .should('contain', '/login') - - cy.get('input[name=email]') - .as('inputEmail') - .should('be.empty') - .and('have.attr', 'placeholder', 'Deine E-Mail') - .trigger('focus') - .type('user@example.org') - - cy.get('input[name=password]') - .as('inputPassword') - .should('be.empty') - // .and('have.attr', 'placeholder', 'Dein Passwort') - .trigger('focus') - .type('1234') - - cy.get('button[name=submit]') - .as('submitButton') - .should('be.visible') - .and('not.be.disabled') - .click() - - cy.get('@submitButton') - .should('be.disabled') - // .next('.snackbar') - - cy.get('.layout-default') - - cy.location('pathname') - .should('eq', '/') -} - -const logout = function () { - cy.visit('http://localhost:3000/logout') - - cy.location('pathname') - .should('contain', '/login') - - cy.get('.layout-blank') - .should('be.visible') -} - -context('Authentication', () => { - it('Login Testuser', loginTestUser) - - it('Login & Logout', function () { - // login - loginTestUser() - - // logout - logout() - }) - - it('Still logged in after page-reload', function () { - // login - loginTestUser() - - cy.reload() - .get('.layout-default') - - // logout - // logout() - }) -}) diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index fd170fba6..000000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -} diff --git a/cypress/support/commands.js b/cypress/support/commands.js deleted file mode 100644 index c1f5a772e..000000000 --- a/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js 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 is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/cypress/support/index.js b/cypress/support/index.js deleted file mode 100644 index d68db96df..000000000 --- a/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js 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') From 7aa2befc94ef1a492edfd71eed196de0fa0fc26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Thu, 6 Dec 2018 15:18:36 +0100 Subject: [PATCH 8/9] Remove cypress.json (forgot that) --- cypress.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 cypress.json diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 0967ef424..000000000 --- a/cypress.json +++ /dev/null @@ -1 +0,0 @@ -{} From 364fa73cc26e7972392894a7eb3bb45c5fcd760c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Thu, 6 Dec 2018 15:22:25 +0100 Subject: [PATCH 9/9] Fix merge accident --- styleguide/src/system/components/data-input/Input/Input.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styleguide/src/system/components/data-input/Input/Input.vue b/styleguide/src/system/components/data-input/Input/Input.vue index 6d19c3956..4925547df 100644 --- a/styleguide/src/system/components/data-input/Input/Input.vue +++ b/styleguide/src/system/components/data-input/Input/Input.vue @@ -13,7 +13,7 @@ iconRight && `ds-input-has-icon-right` ]" :id="id" - :name="name" + :name="model" :type="type" :autofocus="autofocus" :placeholder="placeholder"