@react-magma/dropzone 12.0.5-next.0 → 12.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-magma/dropzone",
3
- "version": "12.0.5-next.0",
3
+ "version": "12.0.5",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "@emotion/styled": "^11.13.0",
33
33
  "react": "^17.0.2",
34
34
  "react-dom": "^17.0.2",
35
- "react-magma-dom": "^4.13.1-next.0",
35
+ "react-magma-dom": "^4.14.0",
36
36
  "react-magma-icons": "^3.2.5"
37
37
  },
38
38
  "peerDependencies": {
@@ -40,7 +40,7 @@
40
40
  "@emotion/styled": "^11.13.0",
41
41
  "react": "^17.0.2",
42
42
  "react-dom": "^17.0.2",
43
- "react-magma-dom": "^4.13.1-next.0",
43
+ "react-magma-dom": "^4.14.0",
44
44
  "react-magma-icons": "^3.2.5"
45
45
  },
46
46
  "engines": {
@@ -349,16 +349,18 @@ describe('File Uploader', () => {
349
349
 
350
350
  const ui = <Dropzone maxFiles={1} testId={testId} />;
351
351
 
352
- const { getByTestId, getByText, rerender } = render(ui);
352
+ const { getByTestId, getAllByText, rerender } = render(ui);
353
353
 
354
354
  const dropzone = getByTestId(testId);
355
355
  fireDrop(dropzone, data);
356
356
 
357
357
  await flushPromises(rerender, ui);
358
358
 
359
- expect(
360
- getByText('You must upload a maximum of 1 files.')
361
- ).toBeInTheDocument();
359
+ await waitFor(() => {
360
+ expect(
361
+ getAllByText('You must upload a maximum of 1 files.')[0]
362
+ ).toBeInTheDocument();
363
+ });
362
364
  });
363
365
 
364
366
  it('shows errors on too few files in the file list', async () => {
@@ -367,16 +369,18 @@ describe('File Uploader', () => {
367
369
 
368
370
  const ui = <Dropzone minFiles={6} testId={testId} />;
369
371
 
370
- const { getByTestId, getByText, rerender } = render(ui);
372
+ const { getByTestId, getAllByText, rerender } = render(ui);
371
373
 
372
374
  const dropzone = getByTestId(testId);
373
375
  fireDrop(dropzone, data);
374
376
 
375
377
  await flushPromises(rerender, ui);
376
378
 
377
- expect(
378
- getByText('You must upload a minimum of 6 files.')
379
- ).toBeInTheDocument();
379
+ await waitFor(() => {
380
+ expect(
381
+ getAllByText('You must upload a minimum of 6 files.')[0]
382
+ ).toBeInTheDocument();
383
+ });
380
384
  });
381
385
 
382
386
  it('shows errors on too large of a file in the file list', async () => {