diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18d1143db..ee602a343 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -528,7 +528,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./backend/coverage/lcov.info - min_coverage: 54 + min_coverage: 55 token: ${{ github.token }} ########################################################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c64df990..53376946c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,102 @@ 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.7.1](https://github.com/gradido/gradido/compare/1.7.0...1.7.1) + +- fix: Localize Dates on Redeem Transaction Link Page [`#1720`](https://github.com/gradido/gradido/pull/1720) +- fix: Round Virtual Transaction Link Transaction [`#1718`](https://github.com/gradido/gradido/pull/1718) +- larger icon and deacy information if center [`#1719`](https://github.com/gradido/gradido/pull/1719) +- Fix: restore script load correct .env [`#1717`](https://github.com/gradido/gradido/pull/1717) +- fix-disbled-button-if-totalBalance [`#1716`](https://github.com/gradido/gradido/pull/1716) +- icon droplet-halflarger and correctly positioned [`#1713`](https://github.com/gradido/gradido/pull/1713) +- fix: Clean up Registration Flow [`#1709`](https://github.com/gradido/gradido/pull/1709) +- 1703 submit button disabled when total amount to submit is minus [`#1705`](https://github.com/gradido/gradido/pull/1705) +- add extra disabled variable for send emit, disabled send by emit [`#1704`](https://github.com/gradido/gradido/pull/1704) +- Fix: Correct calculation of decay [`#1699`](https://github.com/gradido/gradido/pull/1699) +- Fix: Allow sending of more then half of my wealth via link [`#1700`](https://github.com/gradido/gradido/pull/1700) +- feat: Seed Creations Months Ago From Now [`#1702`](https://github.com/gradido/gradido/pull/1702) +- Fix: Frontend show proper error message on failed send [`#1701`](https://github.com/gradido/gradido/pull/1701) + +#### [1.7.0](https://github.com/gradido/gradido/compare/1.6.6...1.7.0) + +> 30 March 2022 + +- v1.7.0 [`#1698`](https://github.com/gradido/gradido/pull/1698) +- folder for new style images [`#1694`](https://github.com/gradido/gradido/pull/1694) +- fix: No Email Exposed on Forgot Password [`#1696`](https://github.com/gradido/gradido/pull/1696) +- fix: No Decay Calculation in Frontend [`#1692`](https://github.com/gradido/gradido/pull/1692) +- fix: Wrong Balance on Decay Transaction [`#1691`](https://github.com/gradido/gradido/pull/1691) +- fix: No Plus Before Zero Decay [`#1689`](https://github.com/gradido/gradido/pull/1689) +- fix: Update Deployment env.dist [`#1688`](https://github.com/gradido/gradido/pull/1688) +- 1684 when generating a link form does not reset [`#1687`](https://github.com/gradido/gradido/pull/1687) +- Refactor: Multicreation - do not show unactivated emails [`#1679`](https://github.com/gradido/gradido/pull/1679) +- feat: Show Link Duration in Emails [`#1663`](https://github.com/gradido/gradido/pull/1663) +- refactor: Balance Resolver [`#1665`](https://github.com/gradido/gradido/pull/1665) +- refactor: Set Email Optin Valid Time to 24 hours [`#1662`](https://github.com/gradido/gradido/pull/1662) +- Fix: Fixes found on Stage1 [`#1683`](https://github.com/gradido/gradido/pull/1683) +- 1555 admin see user generated link [`#1656`](https://github.com/gradido/gradido/pull/1656) +- 1594 show transaction was created by link [`#1680`](https://github.com/gradido/gradido/pull/1680) +- refactor: Memo Text Length to 255 Characters [`#1675`](https://github.com/gradido/gradido/pull/1675) +- adminarea: fetchPolicy on searchUser deleted User [`#1678`](https://github.com/gradido/gradido/pull/1678) +- 1223 community communication concept [`#1313`](https://github.com/gradido/gradido/pull/1313) +- clear form.email if click send per link, tests if clicked [`#1660`](https://github.com/gradido/gradido/pull/1660) +- feat: User in Transaction Clickable to Send Directly [`#1658`](https://github.com/gradido/gradido/pull/1658) +- feat: Add Sender Email to Transaction Received Mail [`#1664`](https://github.com/gradido/gradido/pull/1664) +- Feature: Enforce config versions [`#1627`](https://github.com/gradido/gradido/pull/1627) +- 1559 frontend transport redeem link through register [`#1647`](https://github.com/gradido/gradido/pull/1647) +- update-balance if link succesfully generated [`#1655`](https://github.com/gradido/gradido/pull/1655) +- feat: Add Referrer ID to Users [`#1654`](https://github.com/gradido/gradido/pull/1654) +- 1558 - show tranaction link information page [`#1625`](https://github.com/gradido/gradido/pull/1625) +- refactor: No Float Ids [`#1624`](https://github.com/gradido/gradido/pull/1624) +- Change the text if the account is not activated yet and changed the b… [`#1336`](https://github.com/gradido/gradido/pull/1336) +- Refactor: Corrected name of transaction link summary [`#1628`](https://github.com/gradido/gradido/pull/1628) +- fix: Query for Only Creations Transaction List [`#1623`](https://github.com/gradido/gradido/pull/1623) +- Fix: build for development and production links external modules properly [`#1626`](https://github.com/gradido/gradido/pull/1626) +- feat: Seed Transaction Links [`#1622`](https://github.com/gradido/gradido/pull/1622) +- 1588 frontend expendable paginated link list [`#1620`](https://github.com/gradido/gradido/pull/1620) +- feat: Seed Creation Transactions in Backend [`#1621`](https://github.com/gradido/gradido/pull/1621) +- Feature: Eslint i18n validation [`#1618`](https://github.com/gradido/gradido/pull/1618) +- refactor: Seed in Backend [`#1619`](https://github.com/gradido/gradido/pull/1619) +- 1554 frontend transaction link summary [`#1613`](https://github.com/gradido/gradido/pull/1613) +- Frontend generate link for send gdd [`#1579`](https://github.com/gradido/gradido/pull/1579) +- feat: Test Logout in User Resolver [`#1617`](https://github.com/gradido/gradido/pull/1617) +- Fix: Logrotate & Log Dates & Save Update Log & Correct tag Checkout [`#1612`](https://github.com/gradido/gradido/pull/1612) +- refactor: No Reset DB in Backend Unit Tests [`#1616`](https://github.com/gradido/gradido/pull/1616) +- Test: Require 53% backend coverage [`#1611`](https://github.com/gradido/gradido/pull/1611) +- 1599 components for transactionlist types [`#1600`](https://github.com/gradido/gradido/pull/1600) +- feat: Link Transaction to Transaction Link on Redeem [`#1610`](https://github.com/gradido/gradido/pull/1610) +- feat: Redeem Transaction Link Mutation [`#1607`](https://github.com/gradido/gradido/pull/1607) +- feat: List Transaction Links Query [`#1606`](https://github.com/gradido/gradido/pull/1606) +- feat: Virtual Transaction for Transaction Links [`#1603`](https://github.com/gradido/gradido/pull/1603) +- refactor: Transaction Link Query [`#1605`](https://github.com/gradido/gradido/pull/1605) +- 1216 seo vorschau links [`#1426`](https://github.com/gradido/gradido/pull/1426) +- Feature: Eslint style rules & Stylelint for SCSS [`#1598`](https://github.com/gradido/gradido/pull/1598) +- refactor: Remove showEmail from Transaction Links [`#1602`](https://github.com/gradido/gradido/pull/1602) +- feat: Delete Transaction Link Mutation [`#1597`](https://github.com/gradido/gradido/pull/1597) +- Query-transaction-link [`#1586`](https://github.com/gradido/gradido/pull/1586) +- feat: Create Transaction Link Mutation [`#1585`](https://github.com/gradido/gradido/pull/1585) +- feat: Model Transaction Link [`#1584`](https://github.com/gradido/gradido/pull/1584) +- feat: Test Login in User Resolver [`#1538`](https://github.com/gradido/gradido/pull/1538) +- add style in App.vue, set class .pointer on transaction-list-item [`#1583`](https://github.com/gradido/gradido/pull/1583) +- feat: Use Vue Filter to Display Gradido Amounts [`#1576`](https://github.com/gradido/gradido/pull/1576) +- refactor: Resolve Relative Paths in Backend [`#1572`](https://github.com/gradido/gradido/pull/1572) +- refactor: Frontend Directory Structure and Routes [`#1571`](https://github.com/gradido/gradido/pull/1571) +- community name in creation transaction is displayed cleanly [`#1578`](https://github.com/gradido/gradido/pull/1578) +- Planning: send new users gradido [`#1567`](https://github.com/gradido/gradido/pull/1567) +- Refactor arithmetic merge [`#1548`](https://github.com/gradido/gradido/pull/1548) +- Adminarea creation transactionlist show [`#1550`](https://github.com/gradido/gradido/pull/1550) +- Fix: Validate password on UpdateUserInfos [`#1568`](https://github.com/gradido/gradido/pull/1568) +- Fix: Allow sending to user without transactions [`#1549`](https://github.com/gradido/gradido/pull/1549) +- Fix: Balance type [`#1569`](https://github.com/gradido/gradido/pull/1569) +- Refactor: arithmetic and data types [`#1539`](https://github.com/gradido/gradido/pull/1539) +- refactor: Bootstrap Vue Toast in Admin interface [`#1547`](https://github.com/gradido/gradido/pull/1547) +- Refactor: Combine transaction tables and restructure transaction design [`#1531`](https://github.com/gradido/gradido/pull/1531) + #### [1.6.6](https://github.com/gradido/gradido/compare/1.6.5...1.6.6) +> 28 February 2022 + +- v1.6.6 [`#1541`](https://github.com/gradido/gradido/pull/1541) - 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) diff --git a/admin/package.json b/admin/package.json index 2b4be2851..3d3919954 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.6", + "version": "1.7.1", "license": "MIT", "private": false, "scripts": { @@ -14,7 +14,7 @@ "analyse-bundle": "yarn build && webpack-bundle-analyzer dist/webpack.stats.json", "lint": "eslint --max-warnings=0 --ext .js,.vue,.json .", "stylelint": "stylelint --max-warnings=0 '**/*.{scss,vue}'", - "test": "TZ=UTC jest --coverage", + "test": "cross-env TZ=UTC jest --coverage", "locales": "scripts/sort.sh" }, "dependencies": { @@ -57,6 +57,7 @@ "@vue/cli-service": "~4.5.0", "babel-eslint": "^10.1.0", "babel-plugin-transform-require-context": "^0.1.1", + "cross-env": "^7.0.3", "eslint": "7.25.0", "eslint-config-prettier": "^8.3.0", "eslint-config-standard": "^16.0.3", diff --git a/admin/src/components/CreationTransactionListFormular.spec.js b/admin/src/components/CreationTransactionList.spec.js similarity index 89% rename from admin/src/components/CreationTransactionListFormular.spec.js rename to admin/src/components/CreationTransactionList.spec.js index fb137e516..3e2d5893e 100644 --- a/admin/src/components/CreationTransactionListFormular.spec.js +++ b/admin/src/components/CreationTransactionList.spec.js @@ -1,5 +1,5 @@ import { mount } from '@vue/test-utils' -import CreationTransactionListFormular from './CreationTransactionListFormular.vue' +import CreationTransactionList from './CreationTransactionList.vue' import { toastErrorSpy } from '../../test/testSetup' const localVue = global.localVue @@ -46,11 +46,11 @@ const propsData = { fields: ['date', 'balance', 'name', 'memo', 'decay'], } -describe('CreationTransactionListFormular', () => { +describe('CreationTransactionList', () => { let wrapper const Wrapper = () => { - return mount(CreationTransactionListFormular, { localVue, mocks, propsData }) + return mount(CreationTransactionList, { localVue, mocks, propsData }) } describe('mount', () => { diff --git a/admin/src/components/CreationTransactionListFormular.vue b/admin/src/components/CreationTransactionList.vue similarity index 96% rename from admin/src/components/CreationTransactionListFormular.vue rename to admin/src/components/CreationTransactionList.vue index ce2b136a4..ec5c12aa4 100644 --- a/admin/src/components/CreationTransactionListFormular.vue +++ b/admin/src/components/CreationTransactionList.vue @@ -1,6 +1,6 @@ diff --git a/admin/src/components/Tables/OpenCreationsTable.spec.js b/admin/src/components/Tables/OpenCreationsTable.spec.js new file mode 100644 index 000000000..9ff348562 --- /dev/null +++ b/admin/src/components/Tables/OpenCreationsTable.spec.js @@ -0,0 +1,129 @@ +import { mount } from '@vue/test-utils' +import OpenCreationsTable from './OpenCreationsTable.vue' + +const localVue = global.localVue + +const apolloMutateMock = jest.fn().mockResolvedValue({}) +const apolloQueryMock = jest.fn().mockResolvedValue({}) + +const propsData = { + items: [ + { + id: 4, + firstName: 'Bob', + lastName: 'der Baumeister', + email: 'bob@baumeister.de', + amount: 300, + memo: 'Aktives Grundeinkommen für Januar 2022', + date: '2022-01-01T00:00:00.000Z', + moderator: 1, + creation: [700, 1000, 1000], + __typename: 'PendingCreation', + }, + { + id: 5, + firstName: 'Räuber', + lastName: 'Hotzenplotz', + email: 'raeuber@hotzenplotz.de', + amount: 210, + memo: 'Aktives Grundeinkommen für Januar 2022', + date: '2022-01-01T00:00:00.000Z', + moderator: 1, + creation: [790, 1000, 1000], + __typename: 'PendingCreation', + }, + { + id: 6, + firstName: 'Stephen', + lastName: 'Hawking', + email: 'stephen@hawking.uk', + amount: 330, + memo: 'Aktives Grundeinkommen für Januar 2022', + date: '2022-01-01T00:00:00.000Z', + moderator: 1, + creation: [670, 1000, 1000], + __typename: 'PendingCreation', + }, + ], + fields: [ + { key: 'bookmark', label: 'delete' }, + { key: 'email', label: 'e_mail' }, + { key: 'firstName', label: 'firstname' }, + { key: 'lastName', label: 'lastname' }, + { + key: 'amount', + label: 'creation', + formatter: (value) => { + return value + ' GDD' + }, + }, + { key: 'memo', label: 'text' }, + { + key: 'date', + label: 'date', + formatter: (value) => { + return value + }, + }, + { key: 'moderator', label: 'moderator' }, + { key: 'edit_creation', label: 'edit' }, + { key: 'confirm', label: 'save' }, + ], +} + +const mocks = { + $t: jest.fn((t) => t), + $d: jest.fn((d) => d), + $apollo: { + mutate: apolloMutateMock, + query: apolloQueryMock, + }, + $store: { + state: { + moderator: { + id: 0, + name: 'test moderator', + }, + }, + }, +} + +describe('OpenCreationsTable', () => { + let wrapper + + const Wrapper = () => { + return mount(OpenCreationsTable, { localVue, mocks, propsData }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has a DIV element with the class .open-creations-table', () => { + expect(wrapper.find('div.open-creations-table').exists()).toBeTruthy() + }) + + it('has a table with three rows', () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(3) + }) + + it('find first button.bi-pencil-square for open EditCreationFormular ', () => { + expect(wrapper.findAll('tr').at(1).find('.bi-pencil-square').exists()).toBeTruthy() + }) + + describe('show edit details', () => { + beforeEach(async () => { + await wrapper.findAll('tr').at(1).find('.bi-pencil-square').trigger('click') + }) + + it.skip('has a component element with name EditCreationFormular', () => { + expect(wrapper.findComponent({ name: 'EditCreationFormular' }).exists()).toBe(true) + }) + + it.skip('renders the component component-edit-creation-formular', () => { + expect(wrapper.find('div.component-edit-creation-formular').exists()).toBeTruthy() + }) + }) + }) +}) diff --git a/admin/src/components/Tables/OpenCreationsTable.vue b/admin/src/components/Tables/OpenCreationsTable.vue index c3e908868..d2e9669e6 100644 --- a/admin/src/components/Tables/OpenCreationsTable.vue +++ b/admin/src/components/Tables/OpenCreationsTable.vue @@ -1,5 +1,5 @@