From ee1fbb6636d10d05b9c57e740bfd1f37da1de8cf Mon Sep 17 00:00:00 2001 From: Roman Zaritskyi Date: Wed, 11 Sep 2024 13:53:18 +0300 Subject: [PATCH] Fix tests [WTEL-4865] --- .../upload-csv-popup/mixins/__tests__/uploadCSVMixin.spec.js | 4 ++-- .../scripts/__tests__/normalizeCSVData.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/_shared/upload-csv-popup/mixins/__tests__/uploadCSVMixin.spec.js b/src/modules/_shared/upload-csv-popup/mixins/__tests__/uploadCSVMixin.spec.js index c5ed8387e..7157c7856 100644 --- a/src/modules/_shared/upload-csv-popup/mixins/__tests__/uploadCSVMixin.spec.js +++ b/src/modules/_shared/upload-csv-popup/mixins/__tests__/uploadCSVMixin.spec.js @@ -157,11 +157,11 @@ describe('UploadCsvMixin', () => { expect(saveCallback).toHaveBeenCalledWith([ { name: 'John', - age: ['30'], + age: ['', '30'], }, { name: 'Jane', - age: ['25'], + age: ['25', ''], }, ]); }); diff --git a/src/modules/_shared/upload-csv-popup/scripts/__tests__/normalizeCSVData.spec.js b/src/modules/_shared/upload-csv-popup/scripts/__tests__/normalizeCSVData.spec.js index b329554c5..5068b7ac4 100644 --- a/src/modules/_shared/upload-csv-popup/scripts/__tests__/normalizeCSVData.spec.js +++ b/src/modules/_shared/upload-csv-popup/scripts/__tests__/normalizeCSVData.spec.js @@ -74,7 +74,7 @@ describe('normalizeCSVData', () => { expect(false).toBe(true); // reject test if no error }); - it(`succeeds at normalizing data with multiple columns selected to required field, + it(`returns correct fields for mapping, including empty fields, if one of them is empty`, () => { const input = [ { @@ -97,7 +97,7 @@ describe('normalizeCSVData', () => { const output = [ { name: 'name', - phone: ['123'], + phone: ['123', ''], }, { name: 'name',