mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix test
This commit is contained in:
parent
f7b74d8e63
commit
ad8e8b8609
@ -3,7 +3,11 @@
|
|||||||
<div v-if="canCopyLink" class="mb-5">
|
<div v-if="canCopyLink" class="mb-5">
|
||||||
<div>
|
<div>
|
||||||
<label>{{ $t('gdd_per_link.copy-link') }}</label>
|
<label>{{ $t('gdd_per_link.copy-link') }}</label>
|
||||||
<div class="pointer text-center bg-secondary gradido-border-radius p-3" @click="copyLink">
|
<div
|
||||||
|
class="pointer text-center bg-secondary gradido-border-radius p-3"
|
||||||
|
@click="copyLink"
|
||||||
|
data-test="copyLink"
|
||||||
|
>
|
||||||
{{ link }}
|
{{ link }}
|
||||||
<div>
|
<div>
|
||||||
<b-button class="p-4">
|
<b-button class="p-4">
|
||||||
@ -16,6 +20,7 @@
|
|||||||
<label>{{ $t('gdd_per_link.copy-link-with-text') }}</label>
|
<label>{{ $t('gdd_per_link.copy-link-with-text') }}</label>
|
||||||
<div
|
<div
|
||||||
class="pointer text-center bg-secondary gradido-border-radius p-3"
|
class="pointer text-center bg-secondary gradido-border-radius p-3"
|
||||||
|
data-test="copyLinkWithText"
|
||||||
@click="copyLinkWithText"
|
@click="copyLinkWithText"
|
||||||
>
|
>
|
||||||
{{ text }}
|
{{ text }}
|
||||||
|
|||||||
@ -24,6 +24,7 @@ const propsData = {
|
|||||||
memo: 'Eene meene Siegerpreis, vor mir steht ein Schokoeis. Hex-hex!',
|
memo: 'Eene meene Siegerpreis, vor mir steht ein Schokoeis. Hex-hex!',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '6',
|
amount: '6',
|
||||||
@ -35,6 +36,7 @@ const propsData = {
|
|||||||
memo: 'Eene meene buntes Laub, auf dem Schrank da liegt kein Staub.',
|
memo: 'Eene meene buntes Laub, auf dem Schrank da liegt kein Staub.',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
transactionLinkCount: 3,
|
transactionLinkCount: 3,
|
||||||
|
|||||||
@ -28,6 +28,7 @@ const propsData = {
|
|||||||
id: 12,
|
id: 12,
|
||||||
memo: 'Katzenauge, Eulenschrei, was verschwunden komm herbei!',
|
memo: 'Katzenauge, Eulenschrei, was verschwunden komm herbei!',
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('TransactionLink', () => {
|
describe('TransactionLink', () => {
|
||||||
|
|||||||
@ -52,6 +52,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Hokuspokus Haselnuss, Vogelbein und Fliegenfuß, damit der Trick gelingen muss!',
|
'Hokuspokus Haselnuss, Vogelbein und Fliegenfuß, damit der Trick gelingen muss!',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '85',
|
amount: '85',
|
||||||
@ -62,6 +63,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
memo: 'Mäusespeck und Katzenbuckel, Tricks und Tracks und Zauberkugel!',
|
memo: 'Mäusespeck und Katzenbuckel, Tricks und Tracks und Zauberkugel!',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '95',
|
amount: '95',
|
||||||
@ -73,6 +75,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Abrakadabra 1,2,3, die Sonne kommt herbei. Schweinepups und Spuckebrei, der Regen ist vorbei.',
|
'Abrakadabra 1,2,3, die Sonne kommt herbei. Schweinepups und Spuckebrei, der Regen ist vorbei.',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '150',
|
amount: '150',
|
||||||
@ -84,6 +87,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Abrakadabra 1,2,3 was verschwunden ist komme herbei.Wieseldreck und Schweinemist, zaubern das ist keine List.',
|
'Abrakadabra 1,2,3 was verschwunden ist komme herbei.Wieseldreck und Schweinemist, zaubern das ist keine List.',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -171,6 +175,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Hat jemand die Nummer von der Hexe aus Schneewittchen? Ich bräuchte mal ein paar Äpfel.',
|
'Hat jemand die Nummer von der Hexe aus Schneewittchen? Ich bräuchte mal ein paar Äpfel.',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '86',
|
amount: '86',
|
||||||
@ -182,6 +187,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Die Windfahn´ krächzt am Dach, Der Uhu im Geklüfte; Was wispert wie ein Ach Verhallend in die Lüfte?',
|
'Die Windfahn´ krächzt am Dach, Der Uhu im Geklüfte; Was wispert wie ein Ach Verhallend in die Lüfte?',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '96',
|
amount: '96',
|
||||||
@ -193,6 +199,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
'Verschlafen kräht der Hahn, Ein Blitz noch, und ein trüber, Umwölbter Tag bricht an – Walpurgisnacht vorüber!',
|
'Verschlafen kräht der Hahn, Ein Blitz noch, und ein trüber, Umwölbter Tag bricht an – Walpurgisnacht vorüber!',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '150',
|
amount: '150',
|
||||||
@ -203,6 +210,7 @@ describe('TransactionLinkSummary', () => {
|
|||||||
memo: 'Eene meene Flaschenschrank, fertig ist der Hexentrank!',
|
memo: 'Eene meene Flaschenschrank, fertig ist der Hexentrank!',
|
||||||
redeemedAt: null,
|
redeemedAt: null,
|
||||||
validUntil: '2022-03-30T14:22:40.000Z',
|
validUntil: '2022-03-30T14:22:40.000Z',
|
||||||
|
text: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -254,7 +254,7 @@ describe('Send', () => {
|
|||||||
describe('copy link with success', () => {
|
describe('copy link with success', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
navigatorClipboardMock.mockResolvedValue()
|
navigatorClipboardMock.mockResolvedValue()
|
||||||
await wrapper.find('.pointer').trigger('click')
|
await wrapper.find('div[data-test="copyLink"]').trigger('click')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should call clipboard.writeText', () => {
|
it('should call clipboard.writeText', () => {
|
||||||
@ -270,7 +270,7 @@ describe('Send', () => {
|
|||||||
describe('copy link with error', () => {
|
describe('copy link with error', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
navigatorClipboardMock.mockRejectedValue()
|
navigatorClipboardMock.mockRejectedValue()
|
||||||
await wrapper.find('.clipboard-copy').find('.btn-secondary').trigger('click')
|
await wrapper.find('div[data-test="copyLink"]').trigger('click')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('toasts error message', () => {
|
it('toasts error message', () => {
|
||||||
@ -292,7 +292,7 @@ describe('Send', () => {
|
|||||||
describe('copy link and text with success', () => {
|
describe('copy link and text with success', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
navigatorClipboardMock.mockResolvedValue()
|
navigatorClipboardMock.mockResolvedValue()
|
||||||
await wrapper.findAll('button').at(0).trigger('click')
|
await wrapper.find('div[data-test="copyLinkWithText"]').trigger('click')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should call clipboard.writeText', () => {
|
it('should call clipboard.writeText', () => {
|
||||||
@ -312,7 +312,7 @@ describe('Send', () => {
|
|||||||
describe('copy link and text with error', () => {
|
describe('copy link and text with error', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
navigatorClipboardMock.mockRejectedValue()
|
navigatorClipboardMock.mockRejectedValue()
|
||||||
await wrapper.findAll('button').at(0).trigger('click')
|
await wrapper.find('div[data-test="copyLinkWithText"]').trigger('click')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('toasts error message', () => {
|
it('toasts error message', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user