mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-21 05:56:20 +00:00
Updated styles in javascript to fulfill adidas rules
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { shallow } from 'enzyme'
|
||||
import React from 'react'
|
||||
import AsideMenu from '../../src/common/AsideMenu'
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import AsideMenu from '../../src/common/AsideMenu';
|
||||
|
||||
describe('<AsideMenu />', () => {
|
||||
let wrapped;
|
||||
@@ -15,9 +15,10 @@ describe('<AsideMenu />', () => {
|
||||
|
||||
it('contains links to different sections', () => {
|
||||
const links = wrapped.find(NavLink);
|
||||
const expectedLength = 3;
|
||||
|
||||
expect(links).toHaveLength(3);
|
||||
links.forEach(link => expect(link.prop('to')).toContain('abc123'));
|
||||
expect(links).toHaveLength(expectedLength);
|
||||
links.forEach((link) => expect(link.prop('to')).toContain('abc123'));
|
||||
});
|
||||
|
||||
it('contains a button to delete server', () => {
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import DateInput from '../../src/common/DateInput';
|
||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import moment from 'moment';
|
||||
import DateInput from '../../src/common/DateInput';
|
||||
|
||||
describe('<DateInput />', () => {
|
||||
let wrapped;
|
||||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapped = shallow(<DateInput {...props} />);
|
||||
|
||||
return wrapped;
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
if (wrapped !== undefined) {
|
||||
wrapped.unmount();
|
||||
|
||||
@@ -2,17 +2,21 @@ import { shallow } from 'enzyme';
|
||||
import { values } from 'ramda';
|
||||
import React from 'react';
|
||||
import * as sinon from 'sinon';
|
||||
import { Home } from '../../src/common/Home';
|
||||
import { HomeComponent } from '../../src/common/Home';
|
||||
|
||||
describe('<Home />', () => {
|
||||
let wrapped;
|
||||
const defaultProps = {
|
||||
resetSelectedServer: () => {},
|
||||
resetSelectedServer() {
|
||||
return '';
|
||||
},
|
||||
servers: {},
|
||||
};
|
||||
const createComponent = props => {
|
||||
const createComponent = (props) => {
|
||||
const actualProps = { ...defaultProps, ...props };
|
||||
wrapped = shallow(<Home {...actualProps} />);
|
||||
|
||||
wrapped = shallow(<HomeComponent {...actualProps} />);
|
||||
|
||||
return wrapped;
|
||||
};
|
||||
|
||||
@@ -42,7 +46,7 @@ describe('<Home />', () => {
|
||||
const servers = {
|
||||
1: { name: 'foo', id: '123' },
|
||||
2: { name: 'bar', id: '456' },
|
||||
}
|
||||
};
|
||||
const wrapped = createComponent({ servers });
|
||||
|
||||
expect(wrapped.find('Link')).toHaveLength(0);
|
||||
|
||||
Reference in New Issue
Block a user