diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff372f061..575533e5c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -305,7 +305,7 @@ jobs: - name: yarn install run: yarn install - name: generate changelog - run: yarn auto-changelog --latest-version ${{ env.VERSION }} --unreleased-only + run: yarn auto-changelog --commit-limit 0 --latest-version ${{ env.VERSION }} --unreleased-only - name: package-version-to-git-release continue-on-error: true # Will fail if tag exists id: create_release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c57da1964..b3c097993 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -422,7 +422,7 @@ jobs: report_name: Coverage Admin Interface type: lcov result_path: ./coverage/lcov.info - min_coverage: 93 + min_coverage: 95 token: ${{ github.token }} ############################################################################## @@ -431,7 +431,7 @@ jobs: unit_test_backend: name: Unit tests - Backend runs-on: ubuntu-latest - needs: [build_test_backend,build_test_mariadb] + needs: [build_test_mariadb] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -448,13 +448,6 @@ jobs: path: /tmp - name: Load Docker Image run: docker load < /tmp/mariadb.tar - - name: Download Docker Image (Backend) - uses: actions/download-artifact@v2 - with: - name: docker-backend-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/backend.tar ########################################################################## # UNIT TESTS BACKEND ##################################################### ########################################################################## @@ -469,7 +462,7 @@ jobs: run: sleep 30s shell: bash - name: backend Unit tests | test - run: cd database && yarn && yarn build && cd ../backend && yarn && yarn CI_workflow_test + run: cd database && yarn && yarn build && cd ../backend && yarn && yarn test # run: docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -T backend yarn test ########################################################################## # COVERAGE CHECK BACKEND ################################################# @@ -480,7 +473,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./backend/coverage/lcov.info - min_coverage: 38 + min_coverage: 48 token: ${{ github.token }} ########################################################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index 1872fabc6..6c64df990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,110 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.6.6](https://github.com/gradido/gradido/compare/1.6.5...1.6.6) + +- Fix: Upper case email on register breaks account [`#1542`](https://github.com/gradido/gradido/pull/1542) +- 1106 first transaction cannot be expanded [`#1432`](https://github.com/gradido/gradido/pull/1432) +- added missing bootstrap scss. bootstrap/scss/bootstrap, plus more mis… [`#1540`](https://github.com/gradido/gradido/pull/1540) +- feat: Seed Deleted User [`#1533`](https://github.com/gradido/gradido/pull/1533) +- fix: No Creations for Deleted Users [`#1534`](https://github.com/gradido/gradido/pull/1534) +- fix: Wrong Key Name for Recover User [`#1535`](https://github.com/gradido/gradido/pull/1535) +- [Feature] : user deleted and undeleted functions for adminarea [`#1520`](https://github.com/gradido/gradido/pull/1520) +- fix: Possible SQL Exception in User Search [`#1530`](https://github.com/gradido/gradido/pull/1530) +- Feature: Make lint warnings unwanted [`#1529`](https://github.com/gradido/gradido/pull/1529) +- 1459 list data again on confirm creation [`#1467`](https://github.com/gradido/gradido/pull/1467) +- fix: Return Empty Array When No Pending Creations Are Present [`#1526`](https://github.com/gradido/gradido/pull/1526) +- Fix: Correct path of index.js in production [`#1525`](https://github.com/gradido/gradido/pull/1525) +- refactor: Get Open Creations by One Query [`#1524`](https://github.com/gradido/gradido/pull/1524) +- Admin: Langsame Benutzer-Suche [`#1472`](https://github.com/gradido/gradido/pull/1472) +- fix: Backend Unit Tests Running Again [`#1513`](https://github.com/gradido/gradido/pull/1513) +- Refactor: Combine transaction tables [`#1523`](https://github.com/gradido/gradido/pull/1523) +- Refactor: User resolver [`#1522`](https://github.com/gradido/gradido/pull/1522) +- feature: Soft-Delete for users (backend) [`#1521`](https://github.com/gradido/gradido/pull/1521) +- feature: Soft-Delete for users (database only) [`#1516`](https://github.com/gradido/gradido/pull/1516) +- refactor: Improve Decay Display [`#1517`](https://github.com/gradido/gradido/pull/1517) +- 404 page needs back to login button [`#1515`](https://github.com/gradido/gradido/pull/1515) +- feature: show current version in admin footer [`#1514`](https://github.com/gradido/gradido/pull/1514) +- fix: Never Sent Email Text [`#1512`](https://github.com/gradido/gradido/pull/1512) +- refactor: static decay block [`#1405`](https://github.com/gradido/gradido/pull/1405) +- refactor: Use Bootstrap Vue Toast [`#1499`](https://github.com/gradido/gradido/pull/1499) +- fix: Catch GDT Server Errors [`#1479`](https://github.com/gradido/gradido/pull/1479) +- Fix: Autochangelog - no commits [`#1498`](https://github.com/gradido/gradido/pull/1498) + +#### [1.6.5](https://github.com/gradido/gradido/compare/1.6.4...1.6.5) + +> 15 February 2022 + +- v1.6.5 [`#1497`](https://github.com/gradido/gradido/pull/1497) +- Fix: Elopage Hook Crash 2 [`#1481`](https://github.com/gradido/gradido/pull/1481) + +#### [1.6.4](https://github.com/gradido/gradido/compare/1.6.3...1.6.4) + +> 14 February 2022 + +- v1.6.4 [`#1478`](https://github.com/gradido/gradido/pull/1478) +- fix: Admin Email Confirmation Date and Time [`#1448`](https://github.com/gradido/gradido/pull/1448) +- Fix: Do not log password or token to the console [`#1477`](https://github.com/gradido/gradido/pull/1477) +- Fix: Elopage Hook Crash [`#1474`](https://github.com/gradido/gradido/pull/1474) +- 538 unify all buttons [`#1455`](https://github.com/gradido/gradido/pull/1455) +- 833 old error is shown for a second even if transaction is successful [`#1460`](https://github.com/gradido/gradido/pull/1460) +- fix: Wrong Email Spelling in German [`#1446`](https://github.com/gradido/gradido/pull/1446) +- fix: Redirect to Login after Register [`#1445`](https://github.com/gradido/gradido/pull/1445) +- refactor: Split User Table Component in Admin Interface [`#1443`](https://github.com/gradido/gradido/pull/1443) + +#### [1.6.3](https://github.com/gradido/gradido/compare/1.6.2...1.6.3) + +> 9 February 2022 + +- v1.6.3 [`#1447`](https://github.com/gradido/gradido/pull/1447) +- add .btn-outline-secondary in scss [`#1442`](https://github.com/gradido/gradido/pull/1442) +- Profil settings and footer refactor [`#1440`](https://github.com/gradido/gradido/pull/1440) + +#### [1.6.2](https://github.com/gradido/gradido/compare/1.6.1...1.6.2) + +> 8 February 2022 + +- v1.6.2 [`#1438`](https://github.com/gradido/gradido/pull/1438) +- updated_changelog_library [`#1437`](https://github.com/gradido/gradido/pull/1437) +- admin interface does user have member area [`#1416`](https://github.com/gradido/gradido/pull/1416) +- Refactor - Remove community_server [`#1408`](https://github.com/gradido/gradido/pull/1408) +- 1389 transactions tabs are not well designed [`#1425`](https://github.com/gradido/gradido/pull/1425) +- fix_community_name_description [`#1429`](https://github.com/gradido/gradido/pull/1429) +- remove_unnecessary_repositories [`#1406`](https://github.com/gradido/gradido/pull/1406) +- clean_database_users [`#1427`](https://github.com/gradido/gradido/pull/1427) +- remove_gradido_node [`#1431`](https://github.com/gradido/gradido/pull/1431) +- add updateTransactions function for GDD balance if reload page [`#1423`](https://github.com/gradido/gradido/pull/1423) +- 1390 display error when navigating to send form without any gdd [`#1424`](https://github.com/gradido/gradido/pull/1424) +- have an delete button for the search input [`#1413`](https://github.com/gradido/gradido/pull/1413) +- reset all selected users in mass creation [`#1422`](https://github.com/gradido/gradido/pull/1422) +- combine_user_tables [`#1411`](https://github.com/gradido/gradido/pull/1411) +- feat: Test Table Row Details Toggling [`#1420`](https://github.com/gradido/gradido/pull/1420) +- feat: Improved Tests for Mass Creation [`#1419`](https://github.com/gradido/gradido/pull/1419) +- refactor: Mixin for Creation Labels [`#1409`](https://github.com/gradido/gradido/pull/1409) +- Marque community_server as to be removed. [`#1407`](https://github.com/gradido/gradido/pull/1407) +- database_transaction_signatures [`#1368`](https://github.com/gradido/gradido/pull/1368) +- database_pending_creations [`#1367`](https://github.com/gradido/gradido/pull/1367) +- fix_seed [`#1410`](https://github.com/gradido/gradido/pull/1410) +- clean_database [`#1362`](https://github.com/gradido/gradido/pull/1362) +- multiple creation already selected users remain saved [`#1376`](https://github.com/gradido/gradido/pull/1376) +- fix: Localize Datetime in Admin Interface [`#1327`](https://github.com/gradido/gradido/pull/1327) +- feat: Remove Login Server [`#1383`](https://github.com/gradido/gradido/pull/1383) +- refactor: Tag Last Version with Login Server [`#1391`](https://github.com/gradido/gradido/pull/1391) +- if an email is not confirmed, a user cannot be added to any multiple … [`#1374`](https://github.com/gradido/gradido/pull/1374) +- cleanups_refactors [`#1404`](https://github.com/gradido/gradido/pull/1404) +- 1365 clear bootstrap version for vue2, preparation for new template [`#1366`](https://github.com/gradido/gradido/pull/1366) +- upgrade vue version from ^2.6.11 to 2.6.12 [`#1382`](https://github.com/gradido/gradido/pull/1382) +- remove vue-qrcode from dashboard-plugin [`#1364`](https://github.com/gradido/gradido/pull/1364) +- remove unused package from frontend [`#1360`](https://github.com/gradido/gradido/pull/1360) + #### [1.6.1](https://github.com/gradido/gradido/compare/1.6.0...1.6.1) +> 28 January 2022 + +- Hotfix elopage [`#1358`](https://github.com/gradido/gradido/pull/1358) +- change standard text für creation [`#1343`](https://github.com/gradido/gradido/pull/1343) - Check if user email is activated to make a creation. [`#1356`](https://github.com/gradido/gradido/pull/1356) - fix: Creation Confirmation User Ids [`#1345`](https://github.com/gradido/gradido/pull/1345) -- fix and improve test [`1c833d3`](https://github.com/gradido/gradido/commit/1c833d394f502a7aed2b5a648c0171a2fe4ee1e6) -- rewrote elopage hook to handle actual elopage hook [`65bc347`](https://github.com/gradido/gradido/commit/65bc3479fa169920eff57b5a2fa662a4090d7364) -- simple test for mass creation, improved test for single creation [`ffc4727`](https://github.com/gradido/gradido/commit/ffc4727e7a7105ac5dc97515b901be8dbe415627) #### [1.6.0](https://github.com/gradido/gradido/compare/1.5.1...1.6.0) @@ -169,16 +266,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - analyse_bundle [`#1019`](https://github.com/gradido/gradido/pull/1019) - release_issue_template [`#1013`](https://github.com/gradido/gradido/pull/1013) - fix_changelog [`#1014`](https://github.com/gradido/gradido/pull/1014) -- removed incorrect mnemonic lists [`08200f4`](https://github.com/gradido/gradido/commit/08200f49f2ceb5ac121534a19ad2a8347c900145) -- update jest, install transform-require-context [`165ed18`](https://github.com/gradido/gradido/commit/165ed1801ba1aba862d0b0006d8c17e322c4b7ff) -- rework roadmap [`b337bcd`](https://github.com/gradido/gradido/commit/b337bcd850423e67b2119c562575b0ec692dddf2) #### [1.5.1](https://github.com/gradido/gradido/compare/1.5.0...1.5.1) > 15 October 2021 - fix isExitInDb [`#994`](https://github.com/gradido/gradido/pull/994) -- fix [`80228ef`](https://github.com/gradido/gradido/commit/80228ef842d4087ea4b80934b15b8112611e3e33) #### [1.5.0](https://github.com/gradido/gradido/compare/1.4.0...1.5.0) @@ -255,9 +348,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - update docker files [`#830`](https://github.com/gradido/gradido/pull/830) - added publisher_id field to user [`#245`](https://github.com/gradido/gradido/pull/245) - webpack update [`#811`](https://github.com/gradido/gradido/pull/811) -- resolvers [`562ad9a`](https://github.com/gradido/gradido/commit/562ad9ae31d97f90a371452bed1ffe10ebf2d3a5) -- deleted inputs (now args) [`8ab542a`](https://github.com/gradido/gradido/commit/8ab542a28acf6b78d7a9e7fe7757363d225f7b4f) -- fix UserCard_CoinAnimation to properly use the store, have 100% coverage and other minor fixes & simplifications [`ce826de`](https://github.com/gradido/gradido/commit/ce826deb1d6d92caba514713539dca2da3f74de7) #### [1.4.0](https://github.com/gradido/gradido/compare/1.3.1...1.4.0) @@ -299,9 +389,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat: Vue Apollo Client [`#701`](https://github.com/gradido/gradido/pull/701) - change text from Geld to Gradidos [`#711`](https://github.com/gradido/gradido/pull/711) - fix fix [`#728`](https://github.com/gradido/gradido/pull/728) -- sort locales [`ec12a28`](https://github.com/gradido/gradido/commit/ec12a28f81577d530f58b42b7f8c2c7d20dffd64) -- feat: Unify and Sort Locales [`aba4f4d`](https://github.com/gradido/gradido/commit/aba4f4d20e0a13016e3528a1c5c30c111eb3a9f1) -- feat: Increase Coverage [`3c061bc`](https://github.com/gradido/gradido/commit/3c061bcb8d1a3a47442ed6a351e1428e15b314aa) #### [1.3.1](https://github.com/gradido/gradido/compare/1.3.0...1.3.1) @@ -310,9 +397,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - fix: Translations and Formula Display [`#727`](https://github.com/gradido/gradido/pull/727) - 612 docu structure [`#688`](https://github.com/gradido/gradido/pull/688) - Community update for gdt list GDT transaction format [`#726`](https://github.com/gradido/gradido/pull/726) -- [#612] new directory structure in /docu/Concepts [`10bf3b0`](https://github.com/gradido/gradido/commit/10bf3b0cdfa6c44f879be0155e93f636601a051b) -- #612 additional documents [`ac0ed4f`](https://github.com/gradido/gradido/commit/ac0ed4fee81caff26d09b5de47dd130f12abdb45) -- #612 docu restructuring [`e67e1c4`](https://github.com/gradido/gradido/commit/e67e1c41e78264698e6fae4cf1d29751de7e7b29) #### [1.3.0](https://github.com/gradido/gradido/compare/1.2.1...1.3.0) @@ -334,9 +418,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Backend Setup [`#584`](https://github.com/gradido/gradido/pull/584) - text-size in textarea and font-variante if focus [`#677`](https://github.com/gradido/gradido/pull/677) - 680 app large maximum width [`#681`](https://github.com/gradido/gradido/pull/681) -- linting, server is working [`34b30b2`](https://github.com/gradido/gradido/commit/34b30b216b6fafcb5b686d4b023b05f2e9766bdf) -- server stack seems to work. Graphql does not load properly yet [`43f7cf8`](https://github.com/gradido/gradido/commit/43f7cf87679713d436a64d569d6af1594a12ee33) -- initial commit, base packages [`fdf0979`](https://github.com/gradido/gradido/commit/fdf0979830fece04208a6b3bb06bb5323a3c149b) #### [1.2.1](https://github.com/gradido/gradido/compare/1.2.0...1.2.1) @@ -347,9 +428,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - fix unneccessary migration run on fresh (docker) setup [`#654`](https://github.com/gradido/gradido/pull/654) - move back decay as standalone transaction in old frontend [`#656`](https://github.com/gradido/gradido/pull/656) - fix display error with creation [`#652`](https://github.com/gradido/gradido/pull/652) -- release [`a0b8056`](https://github.com/gradido/gradido/commit/a0b8056c17b22570a1b1dbb6fa6ce71e561b04af) -- update content for frontend [`d37ce09`](https://github.com/gradido/gradido/commit/d37ce0949ef97d2a6c6ffaf0be31db9f6d92e743) -- exchange positions [`bc000ef`](https://github.com/gradido/gradido/commit/bc000efd87c9701480c4aeaa7b819ab49bfe8f01) #### [1.2.0](https://github.com/gradido/gradido/compare/1.1.1...1.2.0) @@ -388,9 +466,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Update Password Reset E-Mail Subject Encoding [`#579`](https://github.com/gradido/gradido/pull/579) - move decay between transactions into the transactions [`#483`](https://github.com/gradido/gradido/pull/483) - fix #591 [`#591`](https://github.com/gradido/gradido/issues/591) -- fix style decay startblick [`cc7778b`](https://github.com/gradido/gradido/commit/cc7778b55d1baaa7be2d9440480e0fb27bb9a930) -- Remove dynamic cast because it lead to errors again and agin (Poco::AutoPtr don't work correct with that) [`0db5912`](https://github.com/gradido/gradido/commit/0db5912a67158be8f313c01f06350f8339cb0e28) -- Remove dynamic cast because it lead to errors again and agin (Poco::AutoPtr don't work correct with that) [`cee7d7a`](https://github.com/gradido/gradido/commit/cee7d7ac3c4c8c1f481cc3a87fb15422c858413b) #### [1.1.1](https://github.com/gradido/gradido/compare/1.1.0...1.1.1) @@ -401,9 +476,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - update transfer email text [`#574`](https://github.com/gradido/gradido/pull/574) - update mysql because tuple has changed [`#576`](https://github.com/gradido/gradido/pull/576) - Login fix pending transactions [`#578`](https://github.com/gradido/gradido/pull/578) -- add test to prevent bug in future [`630d667`](https://github.com/gradido/gradido/commit/630d667e996870a1bf9aa9586b0467d58419e525) -- use standard path. add nginx example [`ac249b4`](https://github.com/gradido/gradido/commit/ac249b46830a8039aec52d30b48084b50a264b6f) -- add autodeploy bash scripts [`f49cf4d`](https://github.com/gradido/gradido/commit/f49cf4d7f8054d87efa1e12055a7ef0c6d3b9872) #### [1.1.0](https://github.com/gradido/gradido/compare/1.0.2...1.1.0) @@ -445,9 +517,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - login without hedera [`#478`](https://github.com/gradido/gradido/pull/478) - fix: Show Correct Version Number in Footer [`#475`](https://github.com/gradido/gradido/pull/475) - refactor: Remove Element-UI [`#476`](https://github.com/gradido/gradido/pull/476) -- remove components Charts, Notification, SearchUser, ButtonCheckbox, Button RadioGroup, Breadcrumb [`159bff7`](https://github.com/gradido/gradido/commit/159bff71df20a5c48f93389b2f990f7fe54e53b9) -- fix bug, update dockerfiles to use dependencies without grpc [`dedcebd`](https://github.com/gradido/gradido/commit/dedcebdb95ee0f3dfd2ad62074d4181af38476a2) -- add warning to able to forward warnings from community server to client [`2fc3fe9`](https://github.com/gradido/gradido/commit/2fc3fe94a09bae199bf2f34f9df90e8fc3879c2b) #### [1.0.2](https://github.com/gradido/gradido/compare/1.0.1...1.0.2) @@ -474,17 +543,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - add dynamic error email if transaction failed [`#452`](https://github.com/gradido/gradido/pull/452) - ceil the last decay [`#449`](https://github.com/gradido/gradido/pull/449) - feat: Raise Coverage of Frontend Unit Tets to 18% [`#447`](https://github.com/gradido/gradido/pull/447) -- parse cpsp files automatic in build [`a4a12bb`](https://github.com/gradido/gradido/commit/a4a12bb62b4000e035ff15e17c5a5f5861653ff6) -- translate german html encoded error messages to english and use gettext for automatic translation [`d339627`](https://github.com/gradido/gradido/commit/d33962736d94c1cb7a12ff775bc2c8d7505d646e) -- 100% coverage of GddTransactionList [`96fb245`](https://github.com/gradido/gradido/commit/96fb245821c69f4d321204a663247d5eee60d92f) #### [1.0.1](https://github.com/gradido/gradido/compare/1.0.0...1.0.1) > 14 May 2021 - Login crash fix [`#444`](https://github.com/gradido/gradido/pull/444) -- add try catch blocks to prevent login-server from crashing [`22ff220`](https://github.com/gradido/gradido/commit/22ff22072956f8b843037c75c5b16b7ff5d6a2a3) -- fix [`14a4243`](https://github.com/gradido/gradido/commit/14a424347817b1fe6912a113bffd70e55d688112) ### [1.0.0](https://github.com/gradido/gradido/compare/0.9.4...1.0.0) @@ -604,9 +668,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Background color change [`#117`](https://github.com/gradido/gradido/pull/117) - Delete unused files [`#116`](https://github.com/gradido/gradido/pull/116) - store aufräumen teil 1 [`#115`](https://github.com/gradido/gradido/pull/115) -- add migrations table for automatic table data migration [`40a9a8c`](https://github.com/gradido/gradido/commit/40a9a8c2b587f5bef0fcc54136ed7bd13dd91b2b) -- update yarn.lock after running yarn install [`7f38c80`](https://github.com/gradido/gradido/commit/7f38c801213ad886e9d34a8d43b00ae423f5f2a0) -- use new function for balance overview in old frontend, update balance in session on every php-request [`97c570c`](https://github.com/gradido/gradido/commit/97c570c08cc51ed17a69eb8be8d987f95f3c2ce0) #### [0.9.4](https://github.com/gradido/gradido/compare/0.9.3...0.9.4) @@ -614,9 +675,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Vue with nginx [`#84`](https://github.com/gradido/gradido/pull/84) - Build on run [`#103`](https://github.com/gradido/gradido/pull/103) -- update debug docker to use dependencies container pushed to docker hub [`1f002f4`](https://github.com/gradido/gradido/commit/1f002f4ed0b12d4b2bf63efceabe546d0c5b58ea) -- removed email tasks complete [`8a143be`](https://github.com/gradido/gradido/commit/8a143be8423d7bd894d4f512848895df8b9694b0) -- build login-server on docker-compose up in a docker volume so it rebuild only neccessary parts if some c++ files have changed [`0da5279`](https://github.com/gradido/gradido/commit/0da527917523530186e6effe63dc001fc99bd3e3) #### [0.9.3](https://github.com/gradido/gradido/compare/0.9.2...0.9.3) @@ -645,9 +703,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Add Feature in user search old frontend because Support has requested the feature long ago [`#56`](https://github.com/gradido/gradido/pull/56) - sprache angepasst, for login, pwd, sigin [`#54`](https://github.com/gradido/gradido/pull/54) - Improve workflows [`#53`](https://github.com/gradido/gradido/pull/53) -- setup eslint with tougher rules [`1f13507`](https://github.com/gradido/gradido/commit/1f13507eacfd93c2248fb841de5f481c9eb1e6bd) -- semicolon rule implemented [`6762a02`](https://github.com/gradido/gradido/commit/6762a028f2a3e4f2713b26bed81029defe686ad7) -- dev meeting, bernd [`a99de7f`](https://github.com/gradido/gradido/commit/a99de7f5d1f7557c0877eae565aa4263d65aaaf3) #### [0.9.2](https://github.com/gradido/gradido/compare/0.9.1...0.9.2) @@ -657,9 +712,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Reload after login fixed [`#50`](https://github.com/gradido/gradido/pull/50) - Monorepo login server [`#48`](https://github.com/gradido/gradido/pull/48) - Stage0 [`#3`](https://github.com/gradido/gradido/pull/3) -- Add auto-sign Transaction functionality [`5592275`](https://github.com/gradido/gradido/commit/55922753a7ffd9552be132501d744da491c409b5) -- read in login the real client ip X-Real-IP from nginx forwarded not from community server [`512d307`](https://github.com/gradido/gradido/commit/512d307a19b955bb6e26ae8b274def354829b50f) -- move check if all passwords allow direct into pwdValidation so it will work with every code which ask for password [`e2c38c1`](https://github.com/gradido/gradido/commit/e2c38c1a0fc25a4a2bc922c4bbc44d86b6d00d8b) #### 0.9.1 @@ -671,6 +723,3 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - [WIP] 2 create a dockerfile for the frontend application [`#6`](https://github.com/gradido/gradido/pull/6) - Master - first step [`#1`](https://github.com/gradido/gradido/pull/1) - Add docker compose [`#7`](https://github.com/gradido/gradido/pull/7) -- style 404 side :) [`c7bdf89`](https://github.com/gradido/gradido/commit/c7bdf8978594b932615e48f9bb1c19d3c3bf3fcf) -- publish workflow test [`df6f66f`](https://github.com/gradido/gradido/commit/df6f66ffe70baa9ed3f70b460a6c0c14011bb944) -- many translations. translation structure [`bf68547`](https://github.com/gradido/gradido/commit/bf685479767d19c246c4d6abe3577dc3cb666346) diff --git a/admin/package.json b/admin/package.json index 11ca864c9..d499117af 100644 --- a/admin/package.json +++ b/admin/package.json @@ -3,7 +3,7 @@ "description": "Administraion Interface for Gradido", "main": "index.js", "author": "Moriz Wahl", - "version": "1.6.1", + "version": "1.6.6", "license": "MIT", "private": false, "scripts": { @@ -11,7 +11,7 @@ "serve": "vue-cli-service serve --open", "dev": "yarn run serve", "build": "vue-cli-service build", - "lint": "eslint --ext .js,.vue .", + "lint": "eslint --max-warnings=0 --ext .js,.vue .", "test": "TZ=UTC jest --coverage", "locales": "scripts/missing-keys.sh && scripts/sort.sh" }, @@ -36,6 +36,7 @@ "graphql": "^15.6.1", "identity-obj-proxy": "^3.0.0", "jest": "26.6.3", + "portal-vue": "^2.1.7", "regenerator-runtime": "^0.13.9", "stats-webpack-plugin": "^0.7.0", "vue": "^2.6.11", @@ -43,7 +44,6 @@ "vue-i18n": "^8.26.5", "vue-jest": "^3.0.7", "vue-router": "^3.5.3", - "vue-toasted": "^1.1.28", "vuex": "^3.6.2", "vuex-persistedstate": "^4.1.0" }, diff --git a/admin/public/img/elopage_favicon.png b/admin/public/img/elopage_favicon.png new file mode 100644 index 000000000..2da7efbc0 Binary files /dev/null and b/admin/public/img/elopage_favicon.png differ diff --git a/admin/src/components/ConfirmRegisterMailFormular.spec.js b/admin/src/components/ConfirmRegisterMailFormular.spec.js index 78f5791dc..e9e21b31e 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.spec.js +++ b/admin/src/components/ConfirmRegisterMailFormular.spec.js @@ -1,21 +1,17 @@ import { mount } from '@vue/test-utils' import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular.vue' +import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup' + const localVue = global.localVue const apolloMutateMock = jest.fn().mockResolvedValue() -const toastSuccessMock = jest.fn() -const toastErrorMock = jest.fn() const mocks = { $t: jest.fn((t) => t), $apollo: { mutate: apolloMutateMock, }, - $toasted: { - success: toastSuccessMock, - error: toastErrorMock, - }, } const propsData = { @@ -54,7 +50,7 @@ describe('ConfirmRegisterMailFormular', () => { }) it('toasts a success message', () => { - expect(toastSuccessMock).toBeCalledWith('unregister_mail.success') + expect(toastSuccessSpy).toBeCalledWith('unregister_mail.success') }) }) @@ -66,7 +62,7 @@ describe('ConfirmRegisterMailFormular', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith('unregister_mail.error') + expect(toastErrorSpy).toBeCalledWith('unregister_mail.error') }) }) }) diff --git a/admin/src/components/ConfirmRegisterMailFormular.vue b/admin/src/components/ConfirmRegisterMailFormular.vue index 635b80939..1b72f55d0 100644 --- a/admin/src/components/ConfirmRegisterMailFormular.vue +++ b/admin/src/components/ConfirmRegisterMailFormular.vue @@ -1,9 +1,13 @@ @@ -1213,6 +1218,11 @@ export default { }, } }, + methods: { + goback() { + this.$router.go(-1) + }, + }, } diff --git a/admin/src/graphql/deleteUser.js b/admin/src/graphql/deleteUser.js new file mode 100644 index 000000000..3b9bc73b2 --- /dev/null +++ b/admin/src/graphql/deleteUser.js @@ -0,0 +1,7 @@ +import gql from 'graphql-tag' + +export const deleteUser = gql` + mutation ($userId: Float!) { + deleteUser(userId: $userId) + } +` diff --git a/admin/src/graphql/searchUsers.js b/admin/src/graphql/searchUsers.js index 2bd6d2004..e28508d1b 100644 --- a/admin/src/graphql/searchUsers.js +++ b/admin/src/graphql/searchUsers.js @@ -1,12 +1,19 @@ import gql from 'graphql-tag' export const searchUsers = gql` - query ($searchText: String!, $currentPage: Int, $pageSize: Int, $notActivated: Boolean) { + query ( + $searchText: String! + $currentPage: Int + $pageSize: Int + $notActivated: Boolean + $isDeleted: Boolean + ) { searchUsers( searchText: $searchText currentPage: $currentPage pageSize: $pageSize notActivated: $notActivated + isDeleted: $isDeleted ) { userCount userList { @@ -16,6 +23,9 @@ export const searchUsers = gql` email creation emailChecked + hasElopage + emailConfirmationSend + deletedAt } } } diff --git a/admin/src/graphql/transactionList.js b/admin/src/graphql/transactionList.js index 8ae5cde42..2ac81bf64 100644 --- a/admin/src/graphql/transactionList.js +++ b/admin/src/graphql/transactionList.js @@ -15,28 +15,15 @@ export const transactionList = gql` onlyCreations: $onlyCreations userId: $userId ) { - gdtSum - count - balance - decay - decayDate transactions { - type - balance - decayStart - decayEnd - decayDuration + id + amount + balanceDate + creationDate memo - transactionId - name - email - date - decay { - balance - decayStart - decayEnd - decayDuration - decayStartBlock + linkedUser { + firstName + lastName } } } diff --git a/admin/src/graphql/unDeleteUser.js b/admin/src/graphql/unDeleteUser.js new file mode 100644 index 000000000..2c6d603b2 --- /dev/null +++ b/admin/src/graphql/unDeleteUser.js @@ -0,0 +1,7 @@ +import gql from 'graphql-tag' + +export const unDeleteUser = gql` + mutation ($userId: Float!) { + unDeleteUser(userId: $userId) + } +` diff --git a/admin/src/i18n.js b/admin/src/i18n.js index 6291a9c6c..b2bb08074 100644 --- a/admin/src/i18n.js +++ b/admin/src/i18n.js @@ -54,9 +54,9 @@ const dateTimeFormats = { }, long: { year: 'numeric', - month: 'short', + month: 'long', day: 'numeric', - weekday: 'short', + weekday: 'long', hour: 'numeric', minute: 'numeric', }, @@ -78,9 +78,9 @@ const dateTimeFormats = { }, long: { day: 'numeric', - month: 'short', + month: 'long', year: 'numeric', - weekday: 'short', + weekday: 'long', hour: 'numeric', minute: 'numeric', }, diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 327cfd302..2a05f6ff0 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -1,8 +1,11 @@ { "all_emails": "Alle Nutzer", + "back": "zurück", "bookmark": "bookmark", "confirmed": "bestätigt", + "creation": "Schöpfung", "creation_form": { + "creation_failed": "Ausstehende Schöpfung für {email} konnte nicht erzeugt werden.", "creation_for": "Aktives Grundeinkommen für", "enter_text": "Text eintragen", "form": "Schöpfungsformular", @@ -18,14 +21,23 @@ "toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit", "update_creation": "Schöpfung aktualisieren" }, + "creation_for_month": "Schöpfung für Monat", "date": "Datum", + "delete": "Löschen", + "deleted": "gelöscht", + "deleted_user": "Alle gelöschten Nutzer", + "delete_user": "Nutzer löschen", "details": "Details", + "edit": "Bearbeiten", + "error": "Fehler", "e_mail": "E-Mail", "firstname": "Vorname", "gradido_admin_footer": "Gradido Akademie Adminkonsole", - "hide_details": "Details verbergen von", + "hide_details": "Details verbergen", "lastname": "Nachname", + "moderator": "Moderator", "multiple_creation_text": "Bitte wähle ein oder mehrere Mitglieder aus für die du Schöpfen möchtest.", + "name": "Name", "navbar": { "logout": "Abmelden", "multi_creation": "Mehrfachschöpfung", @@ -39,7 +51,7 @@ "open_creations": "Offene Schöpfungen", "overlay": { "confirm": { - "no": "Nein, nicht speichern.", + "cancel": "Abbrechen", "question": "Willst du diese vorgespeicherte Schöpfung wirklich vollziehen und endgültig speichern?", "text": "Nach dem Speichern ist der Datensatz nicht mehr änderbar und kann auch nicht mehr gelöscht werden. Bitte überprüfe genau, dass alles stimmt.", "title": "Schöpfung bestätigen!", @@ -54,24 +66,35 @@ } }, "remove": "Entfernen", + "removeNotSelf": "Als Admin / Moderator kannst du dich nicht selber löschen.", "remove_all": "alle Nutzer entfernen", + "save": "Speichern", + "status": "Status", + "success": "Erfolg", + "text": "Text", "transaction": "Transaktion", "transactionlist": { "amount": "Betrag", + "balanceDate": "Schöpfungsdatum", "community": "Gemeinschaft", "date": "Datum", "decay": "Vergänglichkeit", "memo": "Nachricht", "title": "Alle geschöpften Transaktionen für den Nutzer" }, + "undelete_user": "Nutzer wiederherstellen", "unregistered_emails": "Nur unregistrierte Nutzer", "unregister_mail": { "button": "Registrierungs-Email bestätigen, jetzt senden", "error": "Fehler beim Senden des Bestätigungs-Links an den Benutzer: {message}", "info": "Email bestätigen, wiederholt senden an:", + "never_sent": "Es scheint so, als ob wir nie eine E-Mail an {email} geschickt haben", "success": "Erfolgreiches Senden des Bestätigungs-Links an die E-Mail des Nutzers! ({email})", - "text_false": " Die letzte Email wurde am {date} Uhr an das Mitglied ({mail}) gesendet.", - "text_true": " Die Email wurde am {date} Uhr bestätigt." + "text_false": " Die letzte Email wurde am {date} Uhr an das Mitglied ({email}) gesendet.", + "text_true": " Die Email wurde bestätigt." }, + "userIsDeleted": "Der Nutzer ist gelöscht. Es können keine GDD mehr geschöpft werden.", + "user_deleted": "Nutzer ist gelöscht.", + "user_recovered": "Nutzer ist wiederhergestellt.", "user_search": "Nutzer-Suche" } diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 3f12f10a8..898c49ded 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -1,8 +1,11 @@ { "all_emails": "All users", + "back": "back", "bookmark": "Remember", "confirmed": "confirmed", + "creation": "Creation", "creation_form": { + "creation_failed": "Could not create pending creation for {email}", "creation_for": "Active Basic Income for", "enter_text": "Enter text", "form": "Creation form", @@ -18,14 +21,23 @@ "toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.", "update_creation": "Creation update" }, + "creation_for_month": "Creation for month", "date": "Date", + "delete": "Delete", + "deleted": "deleted", + "deleted_user": "All deleted user", + "delete_user": "Delete user", "details": "Details", + "edit": "Edit", + "error": "Error", "e_mail": "E-mail", "firstname": "Firstname", "gradido_admin_footer": "Gradido Academy Admin Console", - "hide_details": "Hide details from", + "hide_details": "Hide details", "lastname": "Lastname", + "moderator": "Moderator", "multiple_creation_text": "Please select one or more members for which you would like to perform creations.", + "name": "Name", "navbar": { "logout": "Logout", "multi_creation": "Multiple creation", @@ -39,7 +51,7 @@ "open_creations": "Open creations", "overlay": { "confirm": { - "no": "No, do not save.", + "cancel": "Cancel", "question": "Do you really want to carry out and finally save this pre-stored creation?", "text": "After saving, the record can no longer be changed or deleted. Please check carefully that everything is correct.", "title": "Confirm creation!", @@ -54,24 +66,35 @@ } }, "remove": "Remove", + "removeNotSelf": "As admin / moderator you cannot delete yourself.", "remove_all": "Remove all users", + "save": "Speichern", + "status": "Status", + "success": "Success", + "text": "Text", "transaction": "Transaction", "transactionlist": { "amount": "Amount", + "balanceDate": "Creation date", "community": "Community", "date": "Date", "decay": "Decay", "memo": "Message", "title": "All creation-transactions for the user" }, + "undelete_user": "Undelete User", "unregistered_emails": "Only unregistered users", "unregister_mail": { "button": "Confirm registration email, send now", "error": "Error sending the confirmation link to the user: {message}", "info": "Confirm email, send repeatedly to:", + "never_sent": "It seems we did never send an email to the member {email}", "success": "Successfully send the confirmation link to the user's email! ({email})", - "text_false": "The last email was sent to the member ({mail}) on {date} clock.", - "text_true": "The email was confirmed on {date} clock." + "text_false": "The last email was sent to the member ({email}) on {date}.", + "text_true": "The email was confirmed." }, + "userIsDeleted": "The user is deleted. No more GDD can be created.", + "user_deleted": "User is deleted.", + "user_recovered": "User is recovered.", "user_search": "User search" } diff --git a/admin/src/main.js b/admin/src/main.js index f4a8dfb3c..f6c021a53 100644 --- a/admin/src/main.js +++ b/admin/src/main.js @@ -13,31 +13,24 @@ import i18n from './i18n' import VueApollo from 'vue-apollo' +import PortalVue from 'portal-vue' + import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue/dist/bootstrap-vue.css' -import Toasted from 'vue-toasted' +import { toasters } from './mixins/toaster' import { apolloProvider } from './plugins/apolloProvider' +Vue.use(PortalVue) Vue.use(BootstrapVue) Vue.use(IconsPlugin) Vue.use(VueApollo) -Vue.use(Toasted, { - position: 'top-center', - duration: 5000, - fullWidth: true, - action: { - text: 'x', - onClick: (e, toastObject) => { - toastObject.goAway(0) - }, - }, -}) +Vue.mixin(toasters) addNavigationGuards(router, store, apolloProvider.defaultClient, i18n) diff --git a/admin/src/mixins/toaster.js b/admin/src/mixins/toaster.js new file mode 100644 index 000000000..9f79b91e8 --- /dev/null +++ b/admin/src/mixins/toaster.js @@ -0,0 +1,30 @@ +export const toasters = { + methods: { + toastSuccess(message) { + this.toast(message, { + title: this.$t('success'), + variant: 'success', + }) + }, + toastError(message) { + this.toast(message, { + title: this.$t('error'), + variant: 'danger', + }) + }, + toast(message, options) { + // for unit tests, check that replace is present + if (message.replace) message = message.replace(/^GraphQL error: /, '') + this.$bvToast.toast(message, { + autoHideDelay: 5000, + appendToast: true, + solid: true, + toaster: 'b-toaster-top-right', + headerClass: 'gdd-toaster-title', + bodyClass: 'gdd-toaster-body', + toastClass: 'gdd-toaster', + ...options, + }) + }, + }, +} diff --git a/admin/src/mixins/toggleRowDetails.js b/admin/src/mixins/toggleRowDetails.js new file mode 100644 index 000000000..cdfca1334 --- /dev/null +++ b/admin/src/mixins/toggleRowDetails.js @@ -0,0 +1,34 @@ +export const toggleRowDetails = { + data() { + return { + slotIndex: 0, + openRow: null, + creationUserData: {}, + } + }, + methods: { + rowToggleDetails(row, index) { + if (this.openRow) { + if (this.openRow.index === row.index) { + if (index === this.slotIndex) { + row.toggleDetails() + this.openRow = null + } else { + this.slotIndex = index + } + } else { + this.openRow.toggleDetails() + row.toggleDetails() + this.slotIndex = index + this.openRow = row + this.creationUserData = row.item + } + } else { + row.toggleDetails() + this.slotIndex = index + this.openRow = row + this.creationUserData = row.item + } + }, + }, +} diff --git a/admin/src/mixins/toggleRowDetails.test.js b/admin/src/mixins/toggleRowDetails.test.js new file mode 100644 index 000000000..22bf7b925 --- /dev/null +++ b/admin/src/mixins/toggleRowDetails.test.js @@ -0,0 +1,141 @@ +import { toggleRowDetails } from './toggleRowDetails' +import { mount } from '@vue/test-utils' + +const localVue = global.localVue + +const Component = { + render() {}, + mixins: [toggleRowDetails], +} + +const toggleDetailsMock = jest.fn() +const secondToggleDetailsMock = jest.fn() + +const row = { + toggleDetails: toggleDetailsMock, + index: 0, + item: { + data: 'item-data', + }, +} + +let wrapper + +describe('toggleRowDetails', () => { + beforeEach(() => { + jest.clearAllMocks() + wrapper = mount(Component, { localVue }) + }) + + it('sets default data', () => { + expect(wrapper.vm.slotIndex).toBe(0) + expect(wrapper.vm.openRow).toBe(null) + expect(wrapper.vm.creationUserData).toEqual({}) + }) + + describe('no open row', () => { + beforeEach(() => { + wrapper.vm.rowToggleDetails(row, 2) + }) + + it('calls toggleDetails', () => { + expect(toggleDetailsMock).toBeCalled() + }) + + it('updates slot index', () => { + expect(wrapper.vm.slotIndex).toBe(2) + }) + + it('updates open row', () => { + expect(wrapper.vm.openRow).toEqual( + expect.objectContaining({ + index: 0, + item: { + data: 'item-data', + }, + }), + ) + }) + + it('updates creation user data', () => { + expect(wrapper.vm.creationUserData).toEqual({ data: 'item-data' }) + }) + }) + + describe('with open row', () => { + beforeEach(() => { + wrapper.setData({ openRow: row }) + }) + + describe('row index is open row index', () => { + describe('index is slot index', () => { + beforeEach(() => { + wrapper.vm.rowToggleDetails(row, 0) + }) + + it('calls toggleDetails', () => { + expect(toggleDetailsMock).toBeCalled() + }) + + it('sets open row to null', () => { + expect(wrapper.vm.openRow).toBe(null) + }) + }) + + describe('index is not slot index', () => { + beforeEach(() => { + wrapper.vm.rowToggleDetails(row, 2) + }) + + it('does not call toggleDetails', () => { + expect(toggleDetailsMock).not.toBeCalled() + }) + + it('updates slot index', () => { + expect(wrapper.vm.slotIndex).toBe(2) + }) + }) + }) + + describe('row index is not open row index', () => { + beforeEach(() => { + wrapper.vm.rowToggleDetails( + { + toggleDetails: secondToggleDetailsMock, + index: 2, + item: { + data: 'new-item-data', + }, + }, + 2, + ) + }) + + it('closes the open row', () => { + expect(toggleDetailsMock).toBeCalled() + }) + + it('opens the new row', () => { + expect(secondToggleDetailsMock).toBeCalled() + }) + + it('updates slot index', () => { + expect(wrapper.vm.slotIndex).toBe(2) + }) + + it('updates open row', () => { + expect(wrapper.vm.openRow).toEqual({ + toggleDetails: secondToggleDetailsMock, + index: 2, + item: { + data: 'new-item-data', + }, + }) + }) + + it('updates creation user data', () => { + expect(wrapper.vm.creationUserData).toEqual({ data: 'new-item-data' }) + }) + }) + }) +}) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index 81d556e9b..f9a4ed506 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -1,5 +1,6 @@ import { mount } from '@vue/test-utils' import Creation from './Creation.vue' +import { toastErrorSpy } from '../../test/testSetup' const localVue = global.localVue @@ -29,18 +30,14 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ }, }) -const toastErrorMock = jest.fn() const storeCommitMock = jest.fn() const mocks = { - $t: jest.fn((t) => t), + $t: jest.fn((t, options) => (options ? [t, options] : t)), $d: jest.fn((d) => d), $apollo: { query: apolloQueryMock, }, - $toasted: { - error: toastErrorMock, - }, $store: { commit: storeCommitMock, state: { @@ -236,6 +233,25 @@ describe('Creation', () => { }) }) + describe('failed creations', () => { + beforeEach(async () => { + await wrapper + .findComponent({ name: 'CreationFormular' }) + .vm.$emit('toast-failed-creations', ['bibi@bloxberg.de', 'benjamin@bluemchen.de']) + }) + + it('toasts two error messages', () => { + expect(toastErrorSpy).toBeCalledWith([ + 'creation_form.creation_failed', + { email: 'bibi@bloxberg.de' }, + ]) + expect(toastErrorSpy).toBeCalledWith([ + 'creation_form.creation_failed', + { email: 'benjamin@bluemchen.de' }, + ]) + }) + }) + describe('watchers', () => { beforeEach(() => { jest.clearAllMocks() @@ -298,7 +314,7 @@ describe('Creation', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith('Ouch') + expect(toastErrorSpy).toBeCalledWith('Ouch') }) }) }) diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 64efab997..a5966ee68 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -17,11 +17,10 @@ - - @@ -58,6 +56,7 @@ :creation="creation" :items="itemsMassCreation" @remove-all-bookmark="removeAllBookmarks" + @toast-failed-creations="toastFailedCreations" /> @@ -65,7 +64,8 @@ + diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js index fe7bde0cc..bd18965ac 100644 --- a/admin/src/pages/UserSearch.spec.js +++ b/admin/src/pages/UserSearch.spec.js @@ -1,5 +1,6 @@ import { mount } from '@vue/test-utils' import UserSearch from './UserSearch.vue' +import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup' const localVue = global.localVue @@ -15,6 +16,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ email: 'bibi@bloxberg.de', creation: [200, 400, 600], emailChecked: true, + deletedAt: null, }, { userId: 2, @@ -23,6 +25,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ email: 'benjamin@bluemchen.de', creation: [1000, 1000, 1000], emailChecked: true, + deletedAt: null, }, { userId: 3, @@ -31,6 +34,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ email: 'peter@lustig.de', creation: [0, 0, 0], emailChecked: true, + deletedAt: null, }, { userId: 4, @@ -39,23 +43,19 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ email: 'new@user.ch', creation: [1000, 1000, 1000], emailChecked: false, + deletedAt: null, }, ], }, }, }) -const toastErrorMock = jest.fn() - const mocks = { $t: jest.fn((t) => t), $d: jest.fn((d) => String(d)), $apollo: { query: apolloQueryMock, }, - $toasted: { - error: toastErrorMock, - }, } describe('UserSearch', () => { @@ -83,6 +83,7 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, notActivated: false, + isDeleted: false, }, }), ) @@ -90,7 +91,7 @@ describe('UserSearch', () => { describe('unconfirmed emails', () => { beforeEach(async () => { - await wrapper.find('button.btn-block').trigger('click') + await wrapper.find('button.unconfirmedRegisterMails').trigger('click') }) it('calls API with filter', () => { @@ -101,6 +102,27 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, notActivated: true, + isDeleted: false, + }, + }), + ) + }) + }) + + describe('deleted Users', () => { + beforeEach(async () => { + await wrapper.find('button.deletedUserSearch').trigger('click') + }) + + it('calls API with filter', () => { + expect(apolloQueryMock).toBeCalledWith( + expect.objectContaining({ + variables: { + searchText: '', + currentPage: 1, + pageSize: 25, + notActivated: false, + isDeleted: true, }, }), ) @@ -120,6 +142,7 @@ describe('UserSearch', () => { currentPage: 2, pageSize: 25, notActivated: false, + isDeleted: false, }, }), ) @@ -139,6 +162,7 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, notActivated: false, + isDeleted: false, }, }), ) @@ -155,6 +179,7 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, notActivated: false, + isDeleted: false, }, }), ) @@ -162,6 +187,21 @@ describe('UserSearch', () => { }) }) + describe('delete user', () => { + const now = new Date() + beforeEach(async () => { + wrapper.findComponent({ name: 'SearchUserTable' }).vm.$emit('updateDeletedAt', 4, now) + }) + + it('marks the user as deleted', () => { + expect(wrapper.vm.searchResult.find((obj) => obj.userId === 4).deletedAt).toEqual(now) + }) + + it('toasts a success message', () => { + expect(toastSuccessSpy).toBeCalledWith('user_deleted') + }) + }) + describe('apollo returns error', () => { beforeEach(() => { apolloQueryMock.mockRejectedValue({ @@ -171,7 +211,7 @@ describe('UserSearch', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith('Ouch') + expect(toastErrorSpy).toBeCalledWith('Ouch') }) }) }) diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue index 28e1a7774..ea49bf805 100644 --- a/admin/src/pages/UserSearch.vue +++ b/admin/src/pages/UserSearch.vue @@ -1,10 +1,14 @@ diff --git a/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss b/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss index e8514f83d..5a2e49e3e 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_buttons.scss @@ -27,3 +27,9 @@ $btn-focus-width: $input-btn-focus-width !default; $btn-active-box-shadow: none !default; $btn-hover-translate-y: -1px !default; + + + +.btn-outline-secondary { + color: #4385b1 !important; + } diff --git a/frontend/src/assets/scss/gradido.scss b/frontend/src/assets/scss/gradido.scss index e29538807..9bc3231c4 100644 --- a/frontend/src/assets/scss/gradido.scss +++ b/frontend/src/assets/scss/gradido.scss @@ -3,15 +3,13 @@ @import "~bootstrap/scss/functions"; - @import "custom/variables"; // @import "~bootstrap/scss/variables"; wird am // ende der custom/variables angehangen - -// Bootstrap (4.5.3) mixins - -@import "~bootstrap/scss/mixins"; +// Bootstrap (4.5.3) mixins +@import "~bootstrap/scss/mixins"; + // Bootstrap (4.5.3) components @import "~bootstrap/scss/alert"; @@ -20,11 +18,18 @@ @import "~bootstrap/scss/button-group"; @import "~bootstrap/scss/buttons"; @import "~bootstrap/scss/card"; +@import "~bootstrap/scss/carousel"; +@import "~bootstrap/scss/close"; +@import "~bootstrap/scss/code"; @import "~bootstrap/scss/custom-forms"; +@import "~bootstrap/scss/dropdown"; @import "~bootstrap/scss/forms"; +@import "~bootstrap/scss/functions"; @import "~bootstrap/scss/grid"; @import "~bootstrap/scss/input-group"; @import "~bootstrap/scss/list-group"; +@import "~bootstrap/scss/mixins"; +@import "~bootstrap/scss/modal"; @import "~bootstrap/scss/nav"; @import "~bootstrap/scss/navbar"; @import "~bootstrap/scss/pagination"; @@ -38,7 +43,99 @@ @import "~bootstrap/scss/type"; @import "~bootstrap/scss/utilities"; @import "~bootstrap/scss/variables"; - +@import "~bootstrap/scss/bootstrap-grid"; +@import "~bootstrap/scss/bootstrap-reboot"; +@import "~bootstrap/scss/bootstrap"; // Bootstrap-vue (2.21.1) scss -@import '~bootstrap-vue/src/index.scss'; \ No newline at end of file +@import '~bootstrap-vue/src/index.scss'; + + +.alert-success { + color: #155724; + background-color: #d4edda; + border-color: #c3e6cb; +} +.alert-danger { + color: #721c24; + background-color: #f8d7da; + border-color: #f5c6cb; +} + + +.b-toast-danger .toast .toast-header { + color: #721c24; + background-color: rgba(248,215,218,.85); + border-bottom-color: rgba(245,198,203,.85); +} +.b-toast-danger .toast .toast-body{ + background-color: rgba(252,237,238,.85); + border-color: rgba(245,198,203,.85); + color: #721c24; +} + +.b-toast-success .toast .toast-header { + color: #155724; + background-color: rgba(212,237,218,.58); + border-bottom-color: rgba(195,230,203,.85); +} +.b-toast-success .toast .toast-body{ + color: #155724; + background-color: rgba(212,237,218,.85); + border-bottom-color: rgba(195,230,203,.85); +} + + + .btn-primary pim { + background-color: #5a7b02; + border-color: #5e72e4; + } + a, + .copyright { + color: #5a7b02; + } + .font1_2em { + font-size: 1.2em; + } + .font2em { + font-size: 1.5em; + } + .gradido-global-color-text { + color: #3d443b; + } + .gradido-global-color-accent { + color: #047006; + } + .gradido-global-color-6e0a9c9e { + color: #000; + } + .gradido-global-color-2d0fb154 { + color: #047006; + } + .gradido-global-color-16efe88c { + color: #7ebc55; + } + .gradido-global-color-1939326 { + color: #f6fff6; + } + .gradido-global-color-9d79fc1 { + color: #047006; + } + .gradido-global-color-6347f4d { + color: #5a7b02; + } + .gradido-global-color-4fbc19a { + color: #014034; + } + .gradido-global-color-d341874 { + color: #b6d939; + } + .gradido-global-color-619d338 { + color: #8ebfb1; + } + .gradido-global-color-44819a9 { + color: #026873; + } + .gradido-global-color-gray { + color: #858383; + } \ No newline at end of file diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue deleted file mode 100644 index 28af9b2b4..000000000 --- a/frontend/src/components/DecayInformation.vue +++ /dev/null @@ -1,141 +0,0 @@ - - diff --git a/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue new file mode 100644 index 000000000..c0f34e24d --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue @@ -0,0 +1,12 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue new file mode 100644 index 000000000..80d45e242 --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -0,0 +1,36 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue new file mode 100644 index 000000000..2ee9ecc2c --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue @@ -0,0 +1,65 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Long.vue b/frontend/src/components/DecayInformations/DecayInformation-Long.vue new file mode 100644 index 000000000..6a0b6a1c1 --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Long.vue @@ -0,0 +1,93 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Short.vue b/frontend/src/components/DecayInformations/DecayInformation-Short.vue new file mode 100644 index 000000000..3bed4b9cc --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Short.vue @@ -0,0 +1,15 @@ + + diff --git a/frontend/src/views/Pages/SendOverview/GddSend.spec.js b/frontend/src/components/GddSend.spec.js similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend.spec.js rename to frontend/src/components/GddSend.spec.js diff --git a/frontend/src/views/Pages/SendOverview/GddSend.vue b/frontend/src/components/GddSend.vue similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend.vue rename to frontend/src/components/GddSend.vue diff --git a/frontend/src/views/Pages/SendOverview/GddSend/QrCode.spec.js b/frontend/src/components/GddSend/QrCode.spec.js similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend/QrCode.spec.js rename to frontend/src/components/GddSend/QrCode.spec.js diff --git a/frontend/src/views/Pages/SendOverview/GddSend/QrCode.vue b/frontend/src/components/GddSend/QrCode.vue similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend/QrCode.vue rename to frontend/src/components/GddSend/QrCode.vue diff --git a/frontend/src/views/Pages/SendOverview/GddSend/TransactionConfirmation.vue b/frontend/src/components/GddSend/TransactionConfirmation.vue similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend/TransactionConfirmation.vue rename to frontend/src/components/GddSend/TransactionConfirmation.vue diff --git a/frontend/src/views/Pages/SendOverview/GddSend/TransactionForm.spec.js b/frontend/src/components/GddSend/TransactionForm.spec.js similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend/TransactionForm.spec.js rename to frontend/src/components/GddSend/TransactionForm.spec.js diff --git a/frontend/src/views/Pages/SendOverview/GddSend/TransactionForm.vue b/frontend/src/components/GddSend/TransactionForm.vue similarity index 100% rename from frontend/src/views/Pages/SendOverview/GddSend/TransactionForm.vue rename to frontend/src/components/GddSend/TransactionForm.vue diff --git a/frontend/src/components/GddSend/TransactionResult.vue b/frontend/src/components/GddSend/TransactionResult.vue new file mode 100644 index 000000000..6489574c9 --- /dev/null +++ b/frontend/src/components/GddSend/TransactionResult.vue @@ -0,0 +1,54 @@ + + diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js b/frontend/src/components/GddTransactionList.spec.js similarity index 61% rename from frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js rename to frontend/src/components/GddTransactionList.spec.js index b116de9e8..01566ef13 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js +++ b/frontend/src/components/GddTransactionList.spec.js @@ -52,7 +52,7 @@ describe('GddTransactionList', () => { beforeEach(async () => { await wrapper.setProps({ transactions: [], - transactionCount: 0, + count: 0, }) }) it('Transactions Array is empty, 0 transactions', () => { @@ -64,7 +64,7 @@ describe('GddTransactionList', () => { beforeEach(async () => { await wrapper.setProps({ transactions: [], - transactionCount: -1, + count: -1, }) }) it('renders text saying that there are error.empty-transactionlist ', () => { @@ -88,62 +88,149 @@ describe('GddTransactionList', () => { describe('with transactions', () => { beforeEach(async () => { + const decayStartBlock = new Date(2001, 8, 9) await wrapper.setProps({ transactions: [ { - balance: 19.93, - date: '2021-05-25T17:38:13+00:00', - memo: 'Alles Gute zum Geburtstag', - name: 'Bob der Baumeister', - transaction_id: 29, - type: 'send', - decay: { balance: '0.5' }, + id: -1, + typeId: 'DECAY', + amount: '-0.16778637075575395772595', + balance: '31.59320453982945549519405', + balanceDate: '2022-03-03T08:54:54.020Z', + memo: '', + linkedUser: null, + decay: { + decay: '-0.16778637075575395772595', + start: '2022-02-28T13:55:47.000Z', + end: '2022-03-03T08:54:54.020Z', + duration: 241147.02, + }, }, { - balance: 1000, - date: '2021-04-29T15:34:49+00:00', - memo: 'Gut das du da bist!', - name: 'Gradido Akademie', - transaction_id: 3, - type: 'creation', + id: 9, + typeId: 'SEND', + amount: '1', + balance: '31.76099091058520945292', + balanceDate: '2022-02-28T13:55:47.000Z', + memo: 'adasd adada', + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + }, + decay: { + decay: '-0.2038314055482643084', + start: '2022-02-25T07:29:26.000Z', + end: '2022-02-28T13:55:47.000Z', + duration: 282381, + }, }, { - balance: 314.98, - date: '2021-04-29T17:26:40+00:00', - memo: 'Für das Fahrrad!', - name: 'Jan Ulrich', - transaction_id: 8, - type: 'receive', - decay: { balance: '1.5' }, + id: 8, + typeId: 'CREATION', + amount: '1000', + balance: '32.96482231613347376132', + balanceDate: '2022-02-25T07:29:26.000Z', + memo: 'asd adada dad', + linkedUser: { + firstName: 'Gradido', + lastName: 'Akademie', + }, + decay: { + decay: '-0.03517768386652623868', + start: '2022-02-23T10:55:30.000Z', + end: '2022-02-25T07:29:26.000Z', + duration: 160436, + }, }, { - balance: '1.07', - type: 'decay', + id: 6, + typeId: 'RECEIVE', + amount: '10', + balance: '10', + balanceDate: '2022-02-23T10:55:30.000Z', + memo: 'asd adaaad adad addad ', + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + }, + decay: { + decay: '0', + start: null, + end: null, + duration: null, + }, }, ], - transactionCount: 12, + count: 12, + decayStartBlock, }) }) it('renders 4 transactions', () => { - expect(wrapper.findAll('div.gdd-transaction-list-item')).toHaveLength(4) + expect(wrapper.findAll('div.list-group-item')).toHaveLength(4) + }) + + describe('decay transactions', () => { + let transaction + beforeEach(() => { + transaction = wrapper.findAll('div.list-group-item').at(0) + }) + + it('has a bi-caret-down-square icon', () => { + expect(transaction.findAll('svg').at(0).classes()).toEqual([ + 'bi-caret-down-square', + 'b-icon', + 'bi', + 'text-muted', + ]) + }) + + it('has a bi-droplet-half icon', () => { + expect(transaction.findAll('svg').at(1).classes()).toContain('bi-droplet-half') + }) + + it('has gradido-global-color-gray color', () => { + expect(transaction.findAll('svg').at(1).classes()).toContain('gradido-global-color-gray') + }) + + it('shows the amount of transaction', () => { + expect(transaction.findAll('.gdd-transaction-list-item-amount').at(0).text()).toContain( + '0.16778637075575395', + ) + }) + + it('shows the name of the receiver', () => { + expect(transaction.findAll('.gdd-transaction-list-item-name').at(0).text()).toBe( + 'decay.decay_since_last_transaction', + ) + }) }) describe('send transactions', () => { let transaction beforeEach(() => { - transaction = wrapper.findAll('div.gdd-transaction-list-item').at(0) + transaction = wrapper.findAll('div.list-group-item').at(1) + }) + + it('has a bi-caret-down-square icon', () => { + expect(transaction.findAll('svg').at(0).classes()).toEqual([ + 'bi-caret-down-square', + 'b-icon', + 'bi', + 'text-muted', + ]) }) it('has a bi-arrow-left-circle icon', () => { - expect(transaction.find('svg').classes()).toContain('bi-arrow-left-circle') + expect(transaction.findAll('svg').at(1).classes()).toContain('bi-arrow-left-circle') }) it('has text-danger color', () => { - expect(transaction.find('svg').classes()).toContain('text-danger') + expect(transaction.findAll('svg').at(1).classes()).toContain('text-danger') }) - it('has a minus operator', () => { + // operators are renderd by GDD filter + it.skip('has a minus operator', () => { expect(transaction.findAll('.gdd-transaction-list-item-operator').at(0).text()).toContain( '-', ) @@ -151,50 +238,70 @@ describe('GddTransactionList', () => { it('shows the amount of transaction', () => { expect(transaction.findAll('.gdd-transaction-list-item-amount').at(0).text()).toContain( - '19.93', + '1', ) }) it('shows the name of the receiver', () => { expect(transaction.findAll('.gdd-transaction-list-item-name').at(0).text()).toContain( - 'Bob der Baumeister', + 'Bibi Bloxberg', ) }) it('shows the message of the transaction', () => { expect(transaction.findAll('.gdd-transaction-list-message').at(0).text()).toContain( - 'Alles Gute zum Geburtstag', + 'adasd adada', ) }) it('shows the date of the transaction', () => { expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( - 'Tue May 25 2021', + 'Mon Feb 28 2022 13:55:47 GMT+0000 (Coordinated Universal Time)', ) }) it('shows the decay calculation', () => { expect(transaction.findAll('div.gdd-transaction-list-item-decay').at(0).text()).toContain( - '- 0.5', + '− 0.2038314055482643084', ) }) }) describe('creation transactions', () => { let transaction + beforeEach(() => { - transaction = wrapper.findAll('div.gdd-transaction-list-item').at(1) + transaction = wrapper.findAll('div.list-group-item').at(2) + }) + + it('has a bi-caret-down-square icon', () => { + expect(transaction.findAll('svg').at(0).classes()).toEqual([ + 'bi-caret-down-square', + 'b-icon', + 'bi', + 'text-muted', + ]) }) it('has a bi-gift icon', () => { - expect(transaction.find('svg').classes()).toContain('bi-gift') + expect(transaction.findAll('svg').at(1).classes()).toEqual([ + 'bi-gift', + 'gradido-global-color-accent', + 'm-mb-1', + 'font2em', + 'b-icon', + 'bi', + ]) }) it('has gradido-global-color-accent color', () => { - expect(transaction.find('svg').classes()).toContain('gradido-global-color-accent') + expect(transaction.findAll('svg').at(1).classes()).toContain( + 'gradido-global-color-accent', + ) }) - it('has a plus operator', () => { + // operators are renderd by GDD filter + it.skip('has a plus operator', () => { expect(transaction.findAll('.gdd-transaction-list-item-operator').at(0).text()).toContain( '+', ) @@ -214,7 +321,7 @@ describe('GddTransactionList', () => { it('shows the date of the transaction', () => { expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( - 'Thu Apr 29 2021', + 'Fri Feb 25 2022 07:29:26 GMT+0000 (Coordinated Universal Time)', ) }) }) @@ -222,18 +329,35 @@ describe('GddTransactionList', () => { describe('receive transactions', () => { let transaction beforeEach(() => { - transaction = wrapper.findAll('div.gdd-transaction-list-item').at(2) + transaction = wrapper.findAll('div.list-group-item').at(3) + }) + + it('has a bi-caret-down-square icon', () => { + expect(transaction.findAll('svg').at(0).classes()).toEqual([ + 'bi-caret-down-square', + 'b-icon', + 'bi', + 'text-muted', + ]) }) it('has a bi-arrow-right-circle icon', () => { - expect(transaction.find('svg').classes()).toContain('bi-arrow-right-circle') + expect(transaction.findAll('svg').at(1).classes()).toContain('bi-arrow-right-circle') }) it('has gradido-global-color-accent color', () => { - expect(transaction.find('svg').classes()).toContain('gradido-global-color-accent') + expect(transaction.findAll('svg').at(1).classes()).toEqual([ + 'bi-arrow-right-circle', + 'gradido-global-color-accent', + 'm-mb-1', + 'font2em', + 'b-icon', + 'bi', + ]) }) - it('has a plus operator', () => { + // operators are renderd by GDD filter + it.skip('has a plus operator', () => { expect(transaction.findAll('.gdd-transaction-list-item-operator').at(0).text()).toContain( '+', ) @@ -241,99 +365,49 @@ describe('GddTransactionList', () => { it('shows the amount of transaction', () => { expect(transaction.findAll('.gdd-transaction-list-item-amount').at(0).text()).toContain( - '314.98', + '10', ) }) it('shows the name of the recipient', () => { expect(transaction.findAll('.gdd-transaction-list-item-name').at(0).text()).toContain( - 'Jan Ulrich', + 'Bibi Bloxberg', ) }) it('shows the message of the transaction', () => { expect(transaction.findAll('.gdd-transaction-list-message').at(0).text()).toContain( - 'Für das Fahrrad!', + 'asd adaaad adad addad', ) }) it('shows the date of the transaction', () => { expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( - 'Thu Apr 29 2021', + 'Wed Feb 23 2022 10:55:30 GMT+0000 (Coordinated Universal Time)', ) }) it('shows the decay calculation', () => { expect(transaction.findAll('.gdd-transaction-list-item-decay').at(0).text()).toContain( - '- 1.5', + '0', ) }) }) - - describe('decay transactions', () => { - let transaction - beforeEach(() => { - transaction = wrapper.findAll('div.gdd-transaction-list-item').at(3) - }) - - it('has a bi-droplet-half icon', () => { - expect(transaction.find('svg').classes()).toContain('bi-droplet-half') - }) - - it('has gradido-global-color-gray color', () => { - expect(transaction.find('svg').classes()).toContain('gradido-global-color-gray') - }) - - it('has a minus operator', () => { - expect(transaction.findAll('.gdd-transaction-list-item-operator').at(0).text()).toContain( - '-', - ) - }) - - it('shows the amount of transaction', () => { - expect(transaction.findAll('.gdd-transaction-list-item-amount').at(0).text()).toContain( - '1.07', - ) - }) - - it('shows the name of the receiver', () => { - expect(transaction.findAll('.gdd-transaction-list-item-name').at(0).text()).toBe( - 'decay.decay_since_last_transaction', - ) - }) - }) - }) - - describe('with invalid transaction type', () => { - beforeEach(async () => { - await wrapper.setProps({ - transactions: [ - { - balance: '19.93', - date: '2021-05-25T17:38:13+00:00', - memo: 'Alles Gute zum Geburtstag', - name: 'Bob der Baumeister', - transaction_id: 29, - type: 'invalid', - }, - ], - }) - }) - - it('throws an error', () => { - expect(errorHandler).toHaveBeenCalled() - }) }) describe('pagination buttons', () => { const transactions = Array.from({ length: 42 }, (_, idx) => { return { - balance: '3.14', - date: '2021-04-29T17:26:40+00:00', + amount: '3.14', + balanceDate: '2021-04-29T17:26:40+00:00', memo: 'Kreiszahl PI', - name: 'Euklid', - transaction_id: idx + 1, - type: 'receive', + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + __typename: 'User', + }, + id: idx + 1, + typeId: 'RECEIVE', } }) diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue new file mode 100644 index 000000000..c3f3d4d7e --- /dev/null +++ b/frontend/src/components/GddTransactionList.vue @@ -0,0 +1,115 @@ + + + + diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.spec.js b/frontend/src/components/GddTransactionListFooter.spec.js similarity index 100% rename from frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.spec.js rename to frontend/src/components/GddTransactionListFooter.spec.js diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.vue b/frontend/src/components/GddTransactionListFooter.vue similarity index 100% rename from frontend/src/views/Pages/AccountOverview/GddTransactionListFooter.vue rename to frontend/src/components/GddTransactionListFooter.vue diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js b/frontend/src/components/GdtTransactionList.spec.js similarity index 94% rename from frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js rename to frontend/src/components/GdtTransactionList.spec.js index a03122527..a04cdc905 100644 --- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js +++ b/frontend/src/components/GdtTransactionList.spec.js @@ -1,7 +1,9 @@ import { mount } from '@vue/test-utils' -import { GdtEntryType } from '../../../graphql/enums' +import { GdtEntryType } from '@/graphql/enums' import GdtTransactionList from './GdtTransactionList' +import { toastErrorSpy } from '@test/testSetup' + const localVue = global.localVue const apolloMock = jest.fn().mockResolvedValue({ @@ -13,7 +15,6 @@ const apolloMock = jest.fn().mockResolvedValue({ }, }) -const toastErrorMock = jest.fn() const windowScrollToMock = jest.fn() window.scrollTo = windowScrollToMock @@ -36,11 +37,6 @@ describe('GdtTransactionList ', () => { $t: jest.fn((t) => t), $n: jest.fn((n) => n), $d: jest.fn((d) => d), - $toasted: { - global: { - error: toastErrorMock, - }, - }, $apollo: { query: apolloMock, }, @@ -152,7 +148,7 @@ describe('GdtTransactionList ', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith('Ouch!') + expect(toastErrorSpy).toBeCalledWith('Ouch!') }) }) diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue b/frontend/src/components/GdtTransactionList.vue similarity index 86% rename from frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue rename to frontend/src/components/GdtTransactionList.vue index 9c8b51f5e..0c061ed06 100644 --- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue +++ b/frontend/src/components/GdtTransactionList.vue @@ -8,6 +8,9 @@ {{ $t('gdt.funding') }} +
+ {{ $t('gdt.not-reachable') }} +
diff --git a/frontend/src/components/TransactionListItem.vue b/frontend/src/components/TransactionListItem.vue new file mode 100644 index 000000000..f2f7f3e90 --- /dev/null +++ b/frontend/src/components/TransactionListItem.vue @@ -0,0 +1,16 @@ + + diff --git a/frontend/src/components/Transactions/TransactionCreation.spec.js b/frontend/src/components/Transactions/TransactionCreation.spec.js new file mode 100644 index 000000000..e1ea9e0b0 --- /dev/null +++ b/frontend/src/components/Transactions/TransactionCreation.spec.js @@ -0,0 +1,51 @@ +import { mount } from '@vue/test-utils' +import TransactionCreation from './TransactionCreation' + +const localVue = global.localVue + +const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $d: jest.fn((d) => d), +} + +const propsData = { + amount: '12.45', + balance: '31.76099091058521', + balanceDate: '2022-02-28T13:55:47.000Z', + decay: { + decay: '-0.2038314055482643084', + start: '2022-02-25T07:29:26.000Z', + end: '2022-02-28T13:55:47.000Z', + duration: 282381, + __typename: 'CREATION', + }, + id: 9, + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + __typename: 'User', + }, + memo: 'sadasd asdasdasdasdadadd da dad aad', + typeId: 'DECAY', + decayStartBlock: new Date('2021-05-13T17:46:31.000Z'), +} + +describe('TransactionCreation', () => { + let wrapper + + const Wrapper = () => { + return mount(TransactionCreation, { localVue, mocks, propsData }) + } + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the component transaction-slot-creation', () => { + expect(wrapper.find('div.transaction-slot-creation').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue new file mode 100644 index 000000000..a30a33ca5 --- /dev/null +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -0,0 +1,146 @@ + + diff --git a/frontend/src/components/Transactions/TransactionDecay.spec.js b/frontend/src/components/Transactions/TransactionDecay.spec.js new file mode 100644 index 000000000..232e7f85a --- /dev/null +++ b/frontend/src/components/Transactions/TransactionDecay.spec.js @@ -0,0 +1,51 @@ +import { mount } from '@vue/test-utils' +import TransactionDecay from './TransactionDecay' + +const localVue = global.localVue + +const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $d: jest.fn((d) => d), +} + +const propsData = { + amount: '12.45', + balance: '31.76099091058521', + balanceDate: '2022-02-28T13:55:47.000Z', + decay: { + decay: '-0.2038314055482643084', + start: '2022-02-25T07:29:26.000Z', + end: '2022-02-28T13:55:47.000Z', + duration: 282381, + __typename: 'Decay', + }, + id: 9, + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + __typename: 'User', + }, + memo: 'sadasd asdasdasdasdadadd da dad aad', + typeId: 'DECAY', + decayStartBlock: new Date('2021-05-13T17:46:31.000Z'), +} + +describe('TransactionDecay', () => { + let wrapper + + const Wrapper = () => { + return mount(TransactionDecay, { localVue, mocks, propsData }) + } + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the component transaction-slot-decay', () => { + expect(wrapper.find('div.transaction-slot-decay').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/components/Transactions/TransactionDecay.vue b/frontend/src/components/Transactions/TransactionDecay.vue new file mode 100644 index 000000000..0530c47f4 --- /dev/null +++ b/frontend/src/components/Transactions/TransactionDecay.vue @@ -0,0 +1,81 @@ + + diff --git a/frontend/src/components/Transactions/TransactionReceive.spec.js b/frontend/src/components/Transactions/TransactionReceive.spec.js new file mode 100644 index 000000000..f5b27cf47 --- /dev/null +++ b/frontend/src/components/Transactions/TransactionReceive.spec.js @@ -0,0 +1,51 @@ +import { mount } from '@vue/test-utils' +import TransactionReceive from './TransactionReceive' + +const localVue = global.localVue + +const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $d: jest.fn((d) => d), +} + +const propsData = { + amount: '12.45', + balance: '31.76099091058521', + balanceDate: '2022-02-28T13:55:47.000Z', + decay: { + decay: '-0.2038314055482643084', + start: '2022-02-25T07:29:26.000Z', + end: '2022-02-28T13:55:47.000Z', + duration: 282381, + __typename: 'Decay', + }, + id: 9, + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + __typename: 'User', + }, + memo: 'sadasd asdasdasdasdadadd da dad aad', + typeId: 'RECEIVE', + decayStartBlock: new Date('2021-05-13T17:46:31.000Z'), +} + +describe('TransactionReceive', () => { + let wrapper + + const Wrapper = () => { + return mount(TransactionReceive, { localVue, mocks, propsData }) + } + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the component transaction-slot-receive', () => { + expect(wrapper.find('div.transaction-slot-receive').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue new file mode 100644 index 000000000..08c49d808 --- /dev/null +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -0,0 +1,146 @@ + + diff --git a/frontend/src/components/Transactions/TransactionSend.spec.js b/frontend/src/components/Transactions/TransactionSend.spec.js new file mode 100644 index 000000000..632c0857a --- /dev/null +++ b/frontend/src/components/Transactions/TransactionSend.spec.js @@ -0,0 +1,51 @@ +import { mount } from '@vue/test-utils' +import TransactionSend from './TransactionSend' + +const localVue = global.localVue + +const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $d: jest.fn((d) => d), +} + +const propsData = { + amount: '12.45', + balance: '31.76099091058521', + balanceDate: '2022-02-28T13:55:47.000Z', + decay: { + decay: '-0.2038314055482643084', + start: '2022-02-25T07:29:26.000Z', + end: '2022-02-28T13:55:47.000Z', + duration: 282381, + __typename: 'Decay', + }, + id: 9, + linkedUser: { + firstName: 'Bibi', + lastName: 'Bloxberg', + __typename: 'User', + }, + memo: 'sadasd asdasdasdasdadadd da dad aad', + typeId: 'SEND', + decayStartBlock: new Date('2021-05-13T17:46:31.000Z'), +} + +describe('TransactionSend', () => { + let wrapper + + const Wrapper = () => { + return mount(TransactionSend, { localVue, mocks, propsData }) + } + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the component transaction-slot-send', () => { + expect(wrapper.find('div.transaction-slot-send').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/components/Transactions/TransactionSend.vue b/frontend/src/components/Transactions/TransactionSend.vue new file mode 100644 index 000000000..67248fc3f --- /dev/null +++ b/frontend/src/components/Transactions/TransactionSend.vue @@ -0,0 +1,142 @@ + + diff --git a/frontend/src/views/Pages/UserProfile/UserCard.spec.js b/frontend/src/components/UserCard.spec.js similarity index 100% rename from frontend/src/views/Pages/UserProfile/UserCard.spec.js rename to frontend/src/components/UserCard.spec.js diff --git a/frontend/src/components/UserCard.vue b/frontend/src/components/UserCard.vue new file mode 100755 index 000000000..04e1c927e --- /dev/null +++ b/frontend/src/components/UserCard.vue @@ -0,0 +1,53 @@ + + + diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js b/frontend/src/components/UserCard_FormUserMail.spec.js similarity index 100% rename from frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js rename to frontend/src/components/UserCard_FormUserMail.spec.js diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.vue b/frontend/src/components/UserCard_FormUserMail.vue similarity index 96% rename from frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.vue rename to frontend/src/components/UserCard_FormUserMail.vue index de276afdf..f21d8ffa3 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.vue +++ b/frontend/src/components/UserCard_FormUserMail.vue @@ -32,7 +32,7 @@ diff --git a/frontend/src/views/Pages/RegisterCommunity.spec.js b/frontend/src/pages/RegisterCommunity.spec.js similarity index 95% rename from frontend/src/views/Pages/RegisterCommunity.spec.js rename to frontend/src/pages/RegisterCommunity.spec.js index 6d6574881..deb1d999d 100644 --- a/frontend/src/views/Pages/RegisterCommunity.spec.js +++ b/frontend/src/pages/RegisterCommunity.spec.js @@ -1,6 +1,8 @@ import { mount, RouterLinkStub } from '@vue/test-utils' import RegisterCommunity from './RegisterCommunity' +import { toastErrorSpy } from '@test/testSetup' + const localVue = global.localVue const apolloQueryMock = jest.fn().mockResolvedValue({ @@ -13,7 +15,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({ }, }, }) -const toastErrorMock = jest.fn() + const mockStoreCommit = jest.fn() describe('RegisterCommunity', () => { @@ -36,11 +38,6 @@ describe('RegisterCommunity', () => { }, }, }, - $toasted: { - global: { - error: toastErrorMock, - }, - }, } const stubs = { @@ -78,7 +75,7 @@ describe('RegisterCommunity', () => { }) it('toasts an error message', () => { - expect(toastErrorMock).toBeCalledWith('Failed to get communities') + expect(toastErrorSpy).toBeCalledWith('Failed to get communities') }) }) diff --git a/frontend/src/views/Pages/RegisterCommunity.vue b/frontend/src/pages/RegisterCommunity.vue similarity index 94% rename from frontend/src/views/Pages/RegisterCommunity.vue rename to frontend/src/pages/RegisterCommunity.vue index 594c69571..17f500e07 100644 --- a/frontend/src/views/Pages/RegisterCommunity.vue +++ b/frontend/src/pages/RegisterCommunity.vue @@ -49,10 +49,10 @@
diff --git a/frontend/src/views/Pages/ResetPassword.spec.js b/frontend/src/pages/ResetPassword.spec.js similarity index 89% rename from frontend/src/views/Pages/ResetPassword.spec.js rename to frontend/src/pages/ResetPassword.spec.js index 18e85d207..814d97bcb 100644 --- a/frontend/src/views/Pages/ResetPassword.spec.js +++ b/frontend/src/pages/ResetPassword.spec.js @@ -2,13 +2,14 @@ import { mount, RouterLinkStub } from '@vue/test-utils' import ResetPassword from './ResetPassword' import flushPromises from 'flush-promises' -// validation is tested in src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js +import { toastErrorSpy } from '@test/testSetup' + +// validation is tested in src/components/UserSettings/UserPassword.spec.js const localVue = global.localVue const apolloMutationMock = jest.fn() -const toasterMock = jest.fn() const routerPushMock = jest.fn() const stubs = { @@ -29,11 +30,6 @@ const mocks = { includes: jest.fn((t) => t === mocks.$route.path.mock), }, }, - $toasted: { - global: { - error: toasterMock, - }, - }, $router: { push: routerPushMock, }, @@ -65,7 +61,7 @@ describe('ResetPassword', () => { }) it.skip('toasts an error when no valid optin is given', () => { - expect(toasterMock).toHaveBeenCalledWith('error') + expect(toastErrorSpy).toHaveBeenCalledWith('error') }) it.skip('has a message suggesting to contact the support', () => { @@ -82,7 +78,7 @@ describe('ResetPassword', () => { describe('Register header', () => { describe('from reset', () => { beforeEach(() => { - mocks.$route.path.mock = 'reset' + mocks.$route.path.mock = 'reset-password' wrapper = Wrapper() }) @@ -157,11 +153,11 @@ describe('ResetPassword', () => { }) it('toasts an error message', () => { - expect(toasterMock).toHaveBeenCalledWith('...Code is older than 10 minutes') + expect(toastErrorSpy).toHaveBeenCalledWith('...Code is older than 10 minutes') }) - it('router pushes to /thx/resetFailed', () => { - expect(routerPushMock).toHaveBeenCalledWith('/thx/resetFailed') + it('router pushes to /forgot-password/resetPassword', () => { + expect(routerPushMock).toHaveBeenCalledWith('/forgot-password/resetPassword') }) }) @@ -174,7 +170,7 @@ describe('ResetPassword', () => { }) it('toasts an error message', () => { - expect(toasterMock).toHaveBeenCalledWith('Error') + expect(toastErrorSpy).toHaveBeenCalledWith('Error') }) }) @@ -208,9 +204,9 @@ describe('ResetPassword', () => { }) }) - describe('server response with success on /reset', () => { + describe('server response with success on /reset-password', () => { beforeEach(async () => { - mocks.$route.path.mock = 'reset' + mocks.$route.path.mock = 'reset-password' wrapper = Wrapper() apolloMutationMock.mockResolvedValue({ data: { @@ -223,8 +219,8 @@ describe('ResetPassword', () => { await flushPromises() }) - it('redirects to "/thx/reset"', () => { - expect(routerPushMock).toHaveBeenCalledWith('/thx/reset') + it('redirects to "/thx/resetPassword"', () => { + expect(routerPushMock).toHaveBeenCalledWith('/thx/resetPassword') }) }) }) diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue similarity index 89% rename from frontend/src/views/Pages/ResetPassword.vue rename to frontend/src/pages/ResetPassword.vue index 2d9d1ad35..830107a99 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/pages/ResetPassword.vue @@ -44,8 +44,8 @@ - diff --git a/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue b/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue deleted file mode 100644 index 7d036bef2..000000000 --- a/frontend/src/views/Pages/SendOverview/GddSend/TransactionResult.vue +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/frontend/src/views/Pages/UserProfile/UserCard.vue b/frontend/src/views/Pages/UserProfile/UserCard.vue deleted file mode 100755 index 4ddbb2726..000000000 --- a/frontend/src/views/Pages/UserProfile/UserCard.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/frontend/src/views/Pages/UserProfileOverview.spec.js b/frontend/src/views/Pages/UserProfileOverview.spec.js deleted file mode 100644 index 7b75b0dd2..000000000 --- a/frontend/src/views/Pages/UserProfileOverview.spec.js +++ /dev/null @@ -1,38 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import UserProfileOverview from './UserProfileOverview' - -const localVue = global.localVue - -describe('UserProfileOverview', () => { - let wrapper - - const mocks = { - $t: jest.fn((t) => t), - } - - const Wrapper = () => { - return shallowMount(UserProfileOverview, { localVue, mocks }) - } - - describe('shallow Mount', () => { - beforeEach(() => { - wrapper = Wrapper() - }) - - it('has a user card', () => { - expect(wrapper.findComponent({ name: 'UserCard' }).exists()).toBeTruthy() - }) - - it('has a user first and last name form', () => { - expect(wrapper.findComponent({ name: 'FormUserData' }).exists()).toBeTruthy() - }) - - it('has a user change password form', () => { - expect(wrapper.findComponent({ name: 'FormUserPasswort' }).exists()).toBeTruthy() - }) - - it('has a user change language form', () => { - expect(wrapper.findComponent({ name: 'FormUserLanguage' }).exists()).toBeTruthy() - }) - }) -}) diff --git a/frontend/test/testSetup.js b/frontend/test/testSetup.js index cb50ccdb6..0ceb5affd 100644 --- a/frontend/test/testSetup.js +++ b/frontend/test/testSetup.js @@ -17,6 +17,12 @@ import { focus } from 'vue-focus' import { loadAllRules } from '../src/validation-rules' +import { loadFilters } from '@/filters/amount' + +import { toasters } from '@/mixins/toaster' +export const toastErrorSpy = jest.spyOn(toasters.methods, 'toastError') +export const toastSuccessSpy = jest.spyOn(toasters.methods, 'toastSuccess') + Object.keys(rules).forEach((rule) => { extend(rule, { ...rules[rule], // copies rule configuration @@ -47,6 +53,22 @@ global.localVue.component('validation-observer', ValidationObserver) // global.localVue.directive('click-outside', clickOutside) global.localVue.directive('focus', focus) +global.localVue.mixin(toasters) + +const filters = loadFilters(i18nMock) +global.localVue.filter('amount', filters.amount) +global.localVue.filter('GDD', filters.GDD) + +// Filter the warnings for portal vue +// https://github.com/BeniRupp/bug_portal-vue-target-already-exists +const consoleWarn = global.console.warn +// eslint-disable-next-line no-console +delete console.warn +// eslint-disable-next-line no-console +console.warn = (m) => { + if (!m.match(/^\[portal-vue\]: Target .+ already exists$/)) consoleWarn(m) +} + // throw errors for vue warnings to force the programmers to take care about warnings Vue.config.warnHandler = (w) => { throw new Error(w) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 2ceb33065..296e0f01b 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -14256,11 +14256,6 @@ vue-template-es2015-compiler@^1.6.0, vue-template-es2015-compiler@^1.9.0: resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== -vue-toasted@^1.1.28: - version "1.1.28" - resolved "https://registry.yarnpkg.com/vue-toasted/-/vue-toasted-1.1.28.tgz#dbabb83acc89f7a9e8765815e491d79f0dc65c26" - integrity sha512-UUzr5LX51UbbiROSGZ49GOgSzFxaMHK6L00JV8fir/CYNJCpIIvNZ5YmS4Qc8Y2+Z/4VVYRpeQL2UO0G800Raw== - vue2-transitions@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/vue2-transitions/-/vue2-transitions-0.2.3.tgz#69c9d75b1db05f231b80980c03459d68490ba27d" diff --git a/package.json b/package.json index 1701fef64..d18af7954 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gradido", - "version": "1.6.1", + "version": "1.6.6", "description": "Gradido", "main": "index.js", "repository": "git@github.com:gradido/gradido.git", @@ -10,6 +10,6 @@ "release": "scripts/release.sh" }, "dependencies": { - "auto-changelog": "^2.2.1" + "auto-changelog": "^2.4.0" } } diff --git a/scripts/release.sh b/scripts/release.sh index 0b70e76ad..80a54d949 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -29,4 +29,4 @@ yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${ # generate changelog cd ${PROJECT_DIR} -auto-changelog --latest-version ${VERSION} \ No newline at end of file +auto-changelog --commit-limit 0 --latest-version ${VERSION} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4098c4c49..d9c16e6f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,24 +2,23 @@ # yarn lockfile v1 -auto-changelog@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/auto-changelog/-/auto-changelog-2.2.1.tgz#a031fbf1dfe140dda2ec8c77a524031478a0e933" - integrity sha512-XlykJfZrXlWUAADBqGoN1elmntrRcx7oEymyYB3NRPEZxv0TfYHfivmwzejUMnwAdXKCgbQPo7GV5ULs3jwpfw== +auto-changelog@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/auto-changelog/-/auto-changelog-2.4.0.tgz#a2d57d49b70ada7ca2e7c6a20a71572561d19cd9" + integrity sha512-vh17hko1c0ItsEcw6m7qPRf3m45u+XK5QyCrrBFViElZ8jnKrPC1roSznrd1fIB/0vR/zawdECCRJtTuqIXaJw== dependencies: - commander "^5.0.0" - handlebars "^4.7.3" - lodash.uniqby "^4.7.0" - node-fetch "^2.6.0" + commander "^7.2.0" + handlebars "^4.7.7" + node-fetch "^2.6.1" parse-github-url "^1.0.2" - semver "^6.3.0" + semver "^7.3.5" -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -handlebars@^4.7.3: +handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -31,10 +30,12 @@ handlebars@^4.7.3: optionalDependencies: uglify-js "^3.1.4" -lodash.uniqby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" - integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" minimist@^1.2.5: version "1.2.5" @@ -46,32 +47,59 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-fetch@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@^2.6.1: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" parse-github-url@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + uglify-js@^3.1.4: version "3.13.1" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.1.tgz#2749d4b8b5b7d67460b4a418023ff73c3fefa60a" integrity sha512-EWhx3fHy3M9JbaeTnO+rEqzCe1wtyQClv6q3YWq0voOj4E+bMZBErVS1GAHPDiRGONYq34M1/d8KuQMgvi6Gjw== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==