mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Merge pull request #794 from acelaya-forks/feature/domain
Replace references to doma.in with s.test
This commit is contained in:
commit
0c91f488f0
7 changed files with 11 additions and 11 deletions
|
@ -54,7 +54,7 @@ Those servers can be exported and imported in other browsers, but if for some re
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "Main server",
|
"name": "Main server",
|
||||||
"url": "https://doma.in",
|
"url": "https://s.test",
|
||||||
"apiKey": "09c972b7-506b-49f1-a19a-d729e22e599c"
|
"apiKey": "09c972b7-506b-49f1-a19a-d729e22e599c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ If you want to pre-configure a single server, you can provide its config via env
|
||||||
docker run \
|
docker run \
|
||||||
--name shlink-web-client \
|
--name shlink-web-client \
|
||||||
-p 8000:80 \
|
-p 8000:80 \
|
||||||
-e SHLINK_SERVER_URL=https://doma.in \
|
-e SHLINK_SERVER_URL=https://s.test \
|
||||||
-e SHLINK_SERVER_API_KEY=6aeb82c6-e275-4538-a747-31f9abfba63c \
|
-e SHLINK_SERVER_API_KEY=6aeb82c6-e275-4538-a747-31f9abfba63c \
|
||||||
shlinkio/shlink-web-client
|
shlinkio/shlink-web-client
|
||||||
```
|
```
|
||||||
|
|
|
@ -28,14 +28,14 @@ describe('<CreateShortUrlResult />', () => {
|
||||||
|
|
||||||
it('renders a result message when result is provided', () => {
|
it('renders a result message when result is provided', () => {
|
||||||
setUp(
|
setUp(
|
||||||
{ result: Mock.of<ShortUrl>({ shortUrl: 'https://doma.in/abc123' }), saving: false, saved: true, error: false },
|
{ result: Mock.of<ShortUrl>({ shortUrl: 'https://s.test/abc123' }), saving: false, saved: true, error: false },
|
||||||
);
|
);
|
||||||
expect(screen.getByText(/The short URL is/)).toHaveTextContent('Great! The short URL is https://doma.in/abc123');
|
expect(screen.getByText(/The short URL is/)).toHaveTextContent('Great! The short URL is https://s.test/abc123');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Invokes tooltip timeout when copy to clipboard button is clicked', async () => {
|
it('Invokes tooltip timeout when copy to clipboard button is clicked', async () => {
|
||||||
const { user } = setUp(
|
const { user } = setUp(
|
||||||
{ result: Mock.of<ShortUrl>({ shortUrl: 'https://doma.in/abc123' }), saving: false, saved: true, error: false },
|
{ result: Mock.of<ShortUrl>({ shortUrl: 'https://s.test/abc123' }), saving: false, saved: true, error: false },
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(copyToClipboard).not.toHaveBeenCalled();
|
expect(copyToClipboard).not.toHaveBeenCalled();
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { renderWithEvents } from '../../__helpers__/setUpTest';
|
||||||
describe('<QrCodeModal />', () => {
|
describe('<QrCodeModal />', () => {
|
||||||
const saveImage = jest.fn().mockReturnValue(Promise.resolve());
|
const saveImage = jest.fn().mockReturnValue(Promise.resolve());
|
||||||
const QrCodeModal = createQrCodeModal(Mock.of<ImageDownloader>({ saveImage }));
|
const QrCodeModal = createQrCodeModal(Mock.of<ImageDownloader>({ saveImage }));
|
||||||
const shortUrl = 'https://doma.in/abc123';
|
const shortUrl = 'https://s.test/abc123';
|
||||||
const setUp = (version: SemVer = '2.8.0') => renderWithEvents(
|
const setUp = (version: SemVer = '2.8.0') => renderWithEvents(
|
||||||
<QrCodeModal
|
<QrCodeModal
|
||||||
isOpen
|
isOpen
|
||||||
|
|
|
@ -28,10 +28,10 @@ jest.mock('react-router-dom', () => ({
|
||||||
describe('<ShortUrlsRow />', () => {
|
describe('<ShortUrlsRow />', () => {
|
||||||
const timeoutToggle = jest.fn(() => true);
|
const timeoutToggle = jest.fn(() => true);
|
||||||
const useTimeoutToggle = jest.fn(() => [false, timeoutToggle]) as TimeoutToggle;
|
const useTimeoutToggle = jest.fn(() => [false, timeoutToggle]) as TimeoutToggle;
|
||||||
const server = Mock.of<ReachableServer>({ url: 'https://doma.in' });
|
const server = Mock.of<ReachableServer>({ url: 'https://s.test' });
|
||||||
const shortUrl: ShortUrl = {
|
const shortUrl: ShortUrl = {
|
||||||
shortCode: 'abc123',
|
shortCode: 'abc123',
|
||||||
shortUrl: 'https://doma.in/abc123',
|
shortUrl: 'https://s.test/abc123',
|
||||||
longUrl: 'https://foo.com/bar',
|
longUrl: 'https://foo.com/bar',
|
||||||
dateCreated: formatISO(parseDate('2018-05-23 18:30:41', 'yyyy-MM-dd HH:mm:ss')),
|
dateCreated: formatISO(parseDate('2018-05-23 18:30:41', 'yyyy-MM-dd HH:mm:ss')),
|
||||||
tags: [],
|
tags: [],
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('<ShortUrlsRowMenu />', () => {
|
||||||
const selectedServer = Mock.of<ReachableServer>({ id: 'abc123' });
|
const selectedServer = Mock.of<ReachableServer>({ id: 'abc123' });
|
||||||
const shortUrl = Mock.of<ShortUrl>({
|
const shortUrl = Mock.of<ShortUrl>({
|
||||||
shortCode: 'abc123',
|
shortCode: 'abc123',
|
||||||
shortUrl: 'https://doma.in/abc123',
|
shortUrl: 'https://s.test/abc123',
|
||||||
});
|
});
|
||||||
const setUp = () => renderWithEvents(
|
const setUp = () => renderWithEvents(
|
||||||
<MemoryRouter>
|
<MemoryRouter>
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('uri-helper', () => {
|
||||||
describe('replaceAuthorityFromUri', () => {
|
describe('replaceAuthorityFromUri', () => {
|
||||||
it.each([
|
it.each([
|
||||||
['http://something.com/foo/bar', 'www.new.to', 'http://www.new.to/foo/bar'],
|
['http://something.com/foo/bar', 'www.new.to', 'http://www.new.to/foo/bar'],
|
||||||
['https://www.authori.ty:8000/', 'doma.in', 'https://doma.in/'],
|
['https://www.authori.ty:8000/', 's.test', 'https://s.test/'],
|
||||||
['http://localhost:8080/this/is-a-long/path', 'somewhere:8888', 'http://somewhere:8888/this/is-a-long/path'],
|
['http://localhost:8080/this/is-a-long/path', 'somewhere:8888', 'http://somewhere:8888/this/is-a-long/path'],
|
||||||
])('replaces authority as expected', (uri, newAuthority, expectedResult) => {
|
])('replaces authority as expected', (uri, newAuthority, expectedResult) => {
|
||||||
expect(replaceAuthorityFromUri(uri, newAuthority)).toEqual(expectedResult);
|
expect(replaceAuthorityFromUri(uri, newAuthority)).toEqual(expectedResult);
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('<ShortUrlVisitsHeader />', () => {
|
||||||
const setUp = (title?: string | null) => {
|
const setUp = (title?: string | null) => {
|
||||||
const shortUrlDetail = Mock.of<ShortUrlDetail>({
|
const shortUrlDetail = Mock.of<ShortUrlDetail>({
|
||||||
shortUrl: {
|
shortUrl: {
|
||||||
shortUrl: 'https://doma.in/abc123',
|
shortUrl: 'https://s.test/abc123',
|
||||||
longUrl,
|
longUrl,
|
||||||
dateCreated,
|
dateCreated,
|
||||||
title,
|
title,
|
||||||
|
|
Loading…
Reference in a new issue