Removed rest of version checks for versions older than 2.4

This commit is contained in:
Alejandro Celaya
2021-09-25 11:47:18 +02:00
parent f7cc90bb77
commit 8b5b035568
5 changed files with 10 additions and 39 deletions

View File

@@ -64,13 +64,6 @@ describe('<Overview />', () => {
expect(cards.at(3).html()).toContain(prettify(3));
});
it('displays warning in first card for old shlink versions', () => {
const wrapper = createWrapper();
const firstCard = wrapper.find(CardText).first();
expect(firstCard.html()).toContain('Shlink 2.2 is needed');
});
it('nests complex components', () => {
const wrapper = createWrapper();

View File

@@ -14,7 +14,7 @@ describe('<TagCard />', () => {
};
const DeleteTagConfirmModal = jest.fn();
const EditTagModal = jest.fn();
const TagCard = createTagCard(DeleteTagConfirmModal, EditTagModal, () => null, Mock.all<ColorGenerator>());
const TagCard = createTagCard(DeleteTagConfirmModal, EditTagModal, Mock.all<ColorGenerator>());
const createWrapper = (tag = 'ssr') => {
wrapper = shallow(
<TagCard
@@ -65,9 +65,10 @@ describe('<TagCard />', () => {
it('shows expected tag stats', () => {
const links = wrapper.find(Link);
expect(links.at(1).prop('to')).toEqual('/server/1/list-short-urls/1?tag=ssr');
expect(links.at(1).text()).toContain('48');
expect(links.at(2).prop('to')).toEqual('/server/1/tag/ssr/visits');
expect(links.at(2).text()).toContain('23,257');
expect(links).toHaveLength(2);
expect(links.at(0).prop('to')).toEqual('/server/1/list-short-urls/1?tag=ssr');
expect(links.at(0).text()).toContain('48');
expect(links.at(1).prop('to')).toEqual('/server/1/tag/ssr/visits');
expect(links.at(1).text()).toContain('23,257');
});
});