diff --git a/src/utils/SearchField.scss b/src/utils/SearchField.scss
index 5877b9ce..513844b4 100644
--- a/src/utils/SearchField.scss
+++ b/src/utils/SearchField.scss
@@ -28,6 +28,6 @@
.search-field__close {
@include vertical-align();
- right: 15px;
+ right: 10px;
cursor: pointer;
}
diff --git a/src/utils/SearchField.tsx b/src/utils/SearchField.tsx
index e76fa1ee..e3997e83 100644
--- a/src/utils/SearchField.tsx
+++ b/src/utils/SearchField.tsx
@@ -47,13 +47,11 @@ const SearchField = ({ onChange, className, large = true, noBorder = false, init
/>
searchTermChanged('', 0)}
- >
- ×
-
+ />
);
};
diff --git a/test/common/services/ReportExporter.test.ts b/test/common/services/ReportExporter.test.ts
index f8848bc3..300a2168 100644
--- a/test/common/services/ReportExporter.test.ts
+++ b/test/common/services/ReportExporter.test.ts
@@ -3,6 +3,7 @@ import { CsvJson } from 'csvjson';
import { ReportExporter } from '../../../src/common/services/ReportExporter';
import { NormalizedVisit } from '../../../src/visits/types';
import { windowMock } from '../../mocks/WindowMock';
+import { ExportableShortUrl } from '../../../src/short-urls/data';
describe('ReportExporter', () => {
const toCSV = jest.fn();
@@ -44,4 +45,29 @@ describe('ReportExporter', () => {
expect(toCSV).not.toHaveBeenCalled();
});
});
+
+ describe('exportShortUrls', () => {
+ it('parses provided short URLs to CSV', () => {
+ const shortUrls: ExportableShortUrl[] = [
+ {
+ shortUrl: 'shortUrl',
+ visits: 10,
+ title: '',
+ createdAt: '',
+ longUrl: '',
+ tags: '',
+ },
+ ];
+
+ exporter.exportShortUrls(shortUrls);
+
+ expect(toCSV).toHaveBeenCalledWith(shortUrls, { headers: 'key', wrap: true });
+ });
+
+ it('skips execution when list of visits is empty', () => {
+ exporter.exportShortUrls([]);
+
+ expect(toCSV).not.toHaveBeenCalled();
+ });
+ });
});