Skip to content

Commit

Permalink
test: update test strings to include GPX
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Nov 28, 2023
1 parent 0858ca2 commit 3da7487
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ test('LandscapeNew: Save from GeoJSON', async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);

const dropzone = screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
});

const file = new File([GEOJSON_STRING], 'test.json', {
Expand All @@ -219,7 +219,7 @@ test('LandscapeNew: Save from GeoJSON', async () => {
await waitFor(async () => {
expect(
await screen.findByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
})
).toBeInTheDocument();
});
Expand Down
24 changes: 12 additions & 12 deletions src/landscape/components/LandscapeForm/BoundaryStepUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ const testGeoJsonParsing = (file, errorMessage) => async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);

const dropzone = screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
});

const data = {
Expand Down Expand Up @@ -246,13 +246,13 @@ test('LandscapeBoundaries: Select file', async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);

const dropzone = screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
});

const file = new File([GEOJSON], 'test.json', { type: 'application/json' });
Expand All @@ -272,7 +272,7 @@ test('LandscapeBoundaries: Select file', async () => {
await act(async () => fireEvent.drop(dropzone, data));
expect(
await screen.findByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
})
).toBeInTheDocument();
});
Expand All @@ -299,7 +299,7 @@ test('LandscapeBoundaries: Show back', async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);
Expand Down Expand Up @@ -355,13 +355,13 @@ test('LandscapeBoundaries: Save GeoJSON', async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);

const dropzone = screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
});

const file = new File([GEOJSON], 'test.json', { type: 'application/json' });
Expand All @@ -381,7 +381,7 @@ test('LandscapeBoundaries: Save GeoJSON', async () => {
await act(async () => fireEvent.drop(dropzone, data));
expect(
await screen.findByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB test.json 804 B',
})
).toBeInTheDocument();

Expand Down Expand Up @@ -471,13 +471,13 @@ test('LandscapeBoundaries: Save KML', async () => {
await act(async () =>
fireEvent.click(
screen.getByRole('button', {
name: 'Upload a map file. Accepted file formats: GeoJSON, JSON, KML, KMZ, ESRI Shapefile',
name: 'Upload a map file. Accepted file formats: GeoJSON, GPX, JSON, KML, KMZ, ESRI Shapefile',
})
)
);

const dropzone = screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB',
});

const dataTransfer = {
Expand All @@ -497,7 +497,7 @@ test('LandscapeBoundaries: Save KML', async () => {
await waitFor(async () => {
expect(
screen.getByRole('button', {
name: 'Select File Accepted file formats: *.geojson, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB valid.kml 406 B',
name: 'Select File Accepted file formats: *.geojson, *.gpx, *.json, *.kml, *.kmz, *.zip Maximum file size: 10 MB valid.kml 406 B',
})
).toBeInTheDocument();
});
Expand Down

0 comments on commit 3da7487

Please sign in to comment.