mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 04:56:17 +00:00
Ensured domain is passed when loading visits for a short URL on a specific domain
This commit is contained in:
@@ -17,15 +17,17 @@ describe('<ShortUrlVisits />', () => {
|
||||
const match = {
|
||||
params: { shortCode: 'abc123' },
|
||||
};
|
||||
const location = { search: '' };
|
||||
|
||||
const createComponent = (shortUrlVisits) => {
|
||||
const ShortUrlVisits = createShortUrlVisits({ processStatsFromVisits });
|
||||
const ShortUrlVisits = createShortUrlVisits({ processStatsFromVisits }, () => '');
|
||||
|
||||
wrapper = shallow(
|
||||
<ShortUrlVisits
|
||||
getShortUrlDetail={identity}
|
||||
getShortUrlVisits={getShortUrlVisitsMock}
|
||||
match={match}
|
||||
location={location}
|
||||
shortUrlVisits={shortUrlVisits}
|
||||
shortUrlDetail={{}}
|
||||
cancelGetShortUrlVisits={identity}
|
||||
|
||||
@@ -26,7 +26,7 @@ describe('<VisitsHeader />', () => {
|
||||
it('shows the amount of visits', () => {
|
||||
const visitsBadge = wrapper.find('.badge');
|
||||
|
||||
expect(visitsBadge.html()).toContain(`Visits: <span>${shortUrlVisits.visits.length}</span>`);
|
||||
expect(visitsBadge.html()).toContain(`Visits: <span><strong>${shortUrlVisits.visits.length}</strong></span>`);
|
||||
});
|
||||
|
||||
it('shows when the URL was created', () => {
|
||||
|
||||
Reference in New Issue
Block a user