reformattings

no redirect on tagclick on homepage
no multiple add of same tag possible
This commit is contained in:
2020-10-25 18:48:23 +00:00
parent 812c45cb13
commit 777cc2a712
43 changed files with 493 additions and 448 deletions

View File

@ -1,7 +1,7 @@
import React from 'react';
import {shallow} from 'enzyme'
import {shallow} from 'enzyme';
import PageTitle from "./PageTitle";
import PageTitle from './PageTitle';
describe('<Preview/>', function () {
it('renders without crashing ', function () {
@ -13,19 +13,19 @@ describe('<Preview/>', function () {
const wrapper = shallow(<PageTitle>heyimachild</PageTitle>);
const children = wrapper.children();
expect(children.at(children.length - 2).text()).toBe("heyimachild");
expect(children.at(children.length - 2).text()).toBe('heyimachild');
});
it('renders pagetitle prop', function () {
const wrapper = shallow(<PageTitle title='testtitle'/>);
expect(wrapper.find(".pageheader").text()).toBe("testtitle<Line />");
expect(wrapper.find('.pageheader').text()).toBe('testtitle<Line />');
});
it('renders subtitle prop', function () {
const wrapper = shallow(<PageTitle subtitle='testsubtitle'/>);
expect(wrapper.find(".pageheadersubtitle").text()).toBe("testsubtitle");
expect(wrapper.find('.pageheadersubtitle').text()).toBe('testsubtitle');
});
});