mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 21:13:48 +00:00
Fixed links and some form styles
This commit is contained in:
@@ -3,6 +3,7 @@ import { Mock } from 'ts-mockery';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { ShortUrlCreationSettings as ShortUrlsSettings, Settings } from '../../src/settings/reducers/settings';
|
||||
import { ShortUrlCreationSettings } from '../../src/settings/ShortUrlCreationSettings';
|
||||
import { FormText } from '../../src/utils/FormText';
|
||||
import ToggleSwitch from '../../src/utils/ToggleSwitch';
|
||||
import { DropdownBtn } from '../../src/utils/DropdownBtn';
|
||||
|
||||
@@ -51,7 +52,7 @@ describe('<ShortUrlCreationSettings />', () => {
|
||||
[ undefined, 'Validate URL checkbox will be unchecked' ],
|
||||
])('shows expected helper text for URL validation', (shortUrlCreation, expectedText) => {
|
||||
const wrapper = createWrapper(shortUrlCreation);
|
||||
const validateUrlText = wrapper.find('.form-text').first();
|
||||
const validateUrlText = wrapper.find(FormText).first();
|
||||
|
||||
expect(validateUrlText.text()).toContain(expectedText);
|
||||
});
|
||||
@@ -62,7 +63,7 @@ describe('<ShortUrlCreationSettings />', () => {
|
||||
[{}, 'Forward query params on redirect checkbox will be checked' ],
|
||||
])('shows expected helper text for query forwarding', (shortUrlCreation, expectedText) => {
|
||||
const wrapper = createWrapper({ validateUrls: true, ...shortUrlCreation });
|
||||
const forwardQueryText = wrapper.find('.form-text').at(1);
|
||||
const forwardQueryText = wrapper.find(FormText).at(1);
|
||||
|
||||
expect(forwardQueryText.text()).toContain(expectedText);
|
||||
});
|
||||
@@ -77,7 +78,7 @@ describe('<ShortUrlCreationSettings />', () => {
|
||||
[ undefined, 'Suggest tags starting with input', 'starting with' ],
|
||||
])('shows expected texts for tags suggestions', (shortUrlCreation, expectedText, expectedHint) => {
|
||||
const wrapper = createWrapper(shortUrlCreation);
|
||||
const hintText = wrapper.find('.form-text').last();
|
||||
const hintText = wrapper.find(FormText).last();
|
||||
const dropdown = wrapper.find(DropdownBtn);
|
||||
|
||||
expect(dropdown.prop('text')).toEqual(expectedText);
|
||||
|
||||
Reference in New Issue
Block a user