From f793a4c6b2563fe8edfbedc1facccd6a73fea332 Mon Sep 17 00:00:00 2001 From: Tore Brede <tore.brede@uib.no> Date: Tue, 16 Aug 2022 15:34:41 +0200 Subject: [PATCH] Small cleanup --- .../guest/register/steps/register.test.tsx | 44 +++---------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/frontend/src/routes/guest/register/steps/register.test.tsx b/frontend/src/routes/guest/register/steps/register.test.tsx index 95f1cc26..d2eafe6c 100644 --- a/frontend/src/routes/guest/register/steps/register.test.tsx +++ b/frontend/src/routes/guest/register/steps/register.test.tsx @@ -32,6 +32,13 @@ function getEmptyGuestData(): GuestInviteInformation { } } +const allFeaturesOn = { + displayContactAtUnit: true, + displayComment: true, + displayContactAtUnitGuestInput: true, + showGenderFieldForGuest: true, +} + test('Guest register page showing passport field on manual registration', async () => { const nextHandler = (registerData: GuestRegisterData) => { console.log(`Entered data: ${registerData}`) @@ -185,13 +192,6 @@ test('Gender required to be set if gender field is showing', async () => { console.log(`Entered data: ${registerData}`) } - const allFeaturesOn = { - displayContactAtUnit: true, - displayComment: true, - displayContactAtUnitGuestInput: true, - showGenderFieldForGuest: true, - } - const formData: GuestRegisterData = { firstName: 'Test', lastName: 'Test2', @@ -295,13 +295,6 @@ test('Gender not required to be set if gender field is not showing', async () => test('Guest not allowed to proceed in wizard if phone number is not valid', async () => { const nextHandler = jest.fn() - const allFeaturesOn = { - displayContactAtUnit: true, - displayComment: true, - displayContactAtUnitGuestInput: true, - showGenderFieldForGuest: true, - } - const formData: GuestRegisterData = { firstName: 'Test', lastName: 'Test2', @@ -346,13 +339,6 @@ test('Guest not allowed to proceed in wizard if phone number is not valid', asyn test('Guest allowed to proceed in wizard if data is valid', async () => { const nextHandler = jest.fn() - const allFeaturesOn = { - displayContactAtUnit: true, - displayComment: true, - displayContactAtUnitGuestInput: true, - showGenderFieldForGuest: true, - } - const formData: GuestRegisterData = { firstName: 'Test', lastName: 'Test2', @@ -402,13 +388,6 @@ test('Default country code gets set in form values', async () => { } - const allFeaturesOn = { - displayContactAtUnit: true, - displayComment: true, - displayContactAtUnitGuestInput: true, - showGenderFieldForGuest: true, - } - // Leave the mobile phone country code blank, it should // be populated with a default value const formData: GuestRegisterData = { @@ -464,15 +443,6 @@ test('Foreign country code gets set in form values', async () => { } - // +393892778451 - - const allFeaturesOn = { - displayContactAtUnit: true, - displayComment: true, - displayContactAtUnitGuestInput: true, - showGenderFieldForGuest: true, - } - const formData: GuestRegisterData = { firstName: 'Test', lastName: 'Test2', -- GitLab