mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
fix test
This commit is contained in:
parent
5e78e4ad07
commit
0db297a267
@ -20,7 +20,10 @@ const toastedSuccessMock = jest.fn()
|
|||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t) => t),
|
||||||
$d: jest.fn((d) => d),
|
$d: jest.fn((d) => {
|
||||||
|
const date = new Date(d)
|
||||||
|
return date.toISOString().split('T')[0]
|
||||||
|
}),
|
||||||
$apollo: {
|
$apollo: {
|
||||||
mutate: apolloMutateMock,
|
mutate: apolloMutateMock,
|
||||||
},
|
},
|
||||||
@ -44,7 +47,7 @@ const propsData = {
|
|||||||
creationUserData: {
|
creationUserData: {
|
||||||
memo: 'Test schöpfung 1',
|
memo: 'Test schöpfung 1',
|
||||||
amount: 100,
|
amount: 100,
|
||||||
date: '2021-12-01',
|
date: '2022-01-20',
|
||||||
},
|
},
|
||||||
item: {
|
item: {
|
||||||
id: 0,
|
id: 0,
|
||||||
@ -105,7 +108,7 @@ describe('EditCreationFormular', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
variables: {
|
variables: {
|
||||||
amount: 90,
|
amount: 90,
|
||||||
creationDate: 'YYYY-MM-01',
|
creationDate: '2021-10-31',
|
||||||
email: 'bob@baumeister.de',
|
email: 'bob@baumeister.de',
|
||||||
id: 0,
|
id: 0,
|
||||||
memo: 'Test create coins',
|
memo: 'Test create coins',
|
||||||
@ -177,7 +180,7 @@ describe('EditCreationFormular', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
variables: {
|
variables: {
|
||||||
amount: 90,
|
amount: 90,
|
||||||
creationDate: 'YYYY-MM-01',
|
creationDate: '2021-11-30',
|
||||||
email: 'bob@baumeister.de',
|
email: 'bob@baumeister.de',
|
||||||
id: 0,
|
id: 0,
|
||||||
memo: 'Test create coins',
|
memo: 'Test create coins',
|
||||||
@ -233,7 +236,7 @@ describe('EditCreationFormular', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
variables: {
|
variables: {
|
||||||
amount: 90,
|
amount: 90,
|
||||||
creationDate: 'YYYY-MM-DD',
|
creationDate: '2022-01-20',
|
||||||
email: 'bob@baumeister.de',
|
email: 'bob@baumeister.de',
|
||||||
id: 0,
|
id: 0,
|
||||||
memo: 'Test create coins',
|
memo: 'Test create coins',
|
||||||
|
|||||||
@ -242,7 +242,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.creationUserData.date) {
|
if (this.creationUserData.date) {
|
||||||
switch (this.$moment(this.creationUserData.date).format('MMMM')) {
|
switch (this.$d(new Date(this.creationUserData.date), 'month')) {
|
||||||
case this.currentMonth.short:
|
case this.currentMonth.short:
|
||||||
this.createdIndex = 2
|
this.createdIndex = 2
|
||||||
this.radioSelected = this.currentMonth
|
this.radioSelected = this.currentMonth
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user