mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 11:03:50 +00:00
Updated to airbnb coding styles
This commit is contained in:
@@ -22,7 +22,7 @@ describe('<QrCodeModal />', () => {
|
||||
wrapper = shallow(
|
||||
<QrCodeModal
|
||||
shortUrl={Mock.of<ShortUrl>({ shortUrl })}
|
||||
isOpen={true}
|
||||
isOpen
|
||||
toggle={() => {}}
|
||||
selectedServer={selectedServer}
|
||||
/>,
|
||||
@@ -43,10 +43,10 @@ describe('<QrCodeModal />', () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
[ '2.5.0' as SemVer, 0, '/qr-code?size=300&format=png' ],
|
||||
[ '2.6.0' as SemVer, 0, '/qr-code?size=300&format=png' ],
|
||||
[ '2.6.0' as SemVer, 10, '/qr-code?size=300&format=png&margin=10' ],
|
||||
[ '2.8.0' as SemVer, 0, '/qr-code?size=300&format=png&errorCorrection=L' ],
|
||||
['2.5.0' as SemVer, 0, '/qr-code?size=300&format=png'],
|
||||
['2.6.0' as SemVer, 0, '/qr-code?size=300&format=png'],
|
||||
['2.6.0' as SemVer, 10, '/qr-code?size=300&format=png&margin=10'],
|
||||
['2.8.0' as SemVer, 0, '/qr-code?size=300&format=png&errorCorrection=L'],
|
||||
])('displays an image with the QR code of the URL', (version, margin, expectedUrl) => {
|
||||
const wrapper = createWrapper(version);
|
||||
const formControls = wrapper.find('.form-control-range');
|
||||
@@ -66,12 +66,12 @@ describe('<QrCodeModal />', () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
[ 530, 0, 'lg' ],
|
||||
[ 200, 0, undefined ],
|
||||
[ 830, 0, 'xl' ],
|
||||
[ 430, 80, 'lg' ],
|
||||
[ 200, 50, undefined ],
|
||||
[ 720, 100, 'xl' ],
|
||||
[530, 0, 'lg'],
|
||||
[200, 0, undefined],
|
||||
[830, 0, 'xl'],
|
||||
[430, 80, 'lg'],
|
||||
[200, 50, undefined],
|
||||
[720, 100, 'xl'],
|
||||
])('renders expected size', (size, margin, modalSize) => {
|
||||
const wrapper = createWrapper();
|
||||
const formControls = wrapper.find('.form-control-range');
|
||||
@@ -87,8 +87,8 @@ describe('<QrCodeModal />', () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
[ '2.6.0' as SemVer, 1, 'col-md-4' ],
|
||||
[ '2.8.0' as SemVer, 2, 'col-md-6' ],
|
||||
['2.6.0' as SemVer, 1, 'col-md-4'],
|
||||
['2.8.0' as SemVer, 2, 'col-md-6'],
|
||||
])('shows expected components based on server version', (version, expectedAmountOfDropdowns, expectedRangeClass) => {
|
||||
const wrapper = createWrapper(version);
|
||||
const dropdownsLength = wrapper.find(QrFormatDropdown).length + wrapper.find(QrErrorCorrectionDropdown).length;
|
||||
|
||||
Reference in New Issue
Block a user