move login page test under pages and add tests for all pages stubs

This commit is contained in:
John Mitchell
2018-10-31 14:44:18 -04:00
parent b40c81cc3d
commit 8a3b8823ee
23 changed files with 666 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { mount } from 'enzyme';
import InventoryScripts from '../../../src/pages/InventoryScripts';
describe('<InventoryScripts />', () => {
let pageWrapper;
let pageSections;
let title;
beforeEach(() => {
pageWrapper = mount(<InventoryScripts />);
pageSections = pageWrapper.find('PageSection');
title = pageWrapper.find('Title');
});
afterEach(() => {
pageWrapper.unmount();
});
test('initially renders without crashing', () => {
expect(pageWrapper.length).toBe(1);
expect(pageSections.length).toBe(2);
expect(title.length).toBe(1);
expect(title.props().size).toBe('2xl');
pageSections.forEach(section => {
expect(section.props().variant).toBeDefined();
});
});
});