Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tests #155 #177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions app/src/tests/components/Snackbar.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import MessageSnackbar from '../../components/Snackbar';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing SnackBar', () => {

it('should render as expected', function() {
const tree = MessageSnackbar({notification_text: 'test'}, {handleClose: () => jest.fn()}, {variant: "success" });
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/components/StorySnackBar.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import MessageSnackbar from '../../components/StorySnackbar';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing StorySnackBar', () => {

it('should render as expected', function() {
const tree = MessageSnackbar({notification_text: 'test'}, {handleClose: () => jest.fn()}, {variant: "success" });
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/ducks/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import configureStore from '../../ducks/index';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing Ducks Index', () => {

it('should render as expected', function() {
const tree = configureStore();
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/pages/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import App from '../../pages/App';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing App Page', () => {

it('should render as expected', function() {
const tree = App();
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/pages/IntentPage.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import IntentPage from '../../pages/IntentPage';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing Intent Page', () => {

it('should render as expected', function() {
const tree = IntentPage;
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/pages/StoriesPage.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import StoriesPage from '../../pages/StoriesPage';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing Stories Page', () => {

it('should render as expected', function() {
const tree = StoriesPage;
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/pages/StoryEditPage.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import StoryEditPage from '../../pages/StoryEditPage';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing Story Edit Page', () => {

it('should render as expected', function() {
const tree = StoryEditPage;
expect(tree).toMatchSnapshot();
});
});
13 changes: 13 additions & 0 deletions app/src/tests/pages/UtterPage.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import UtterPage from '../../pages/UtterPage';
import Adapter from 'enzyme-adapter-react-16';
import Enzyme from 'enzyme';

Enzyme.configure({ adapter: new Adapter() });

describe('Testing Utter Page', () => {

it('should render as expected', function() {
const tree = UtterPage;
expect(tree).toMatchSnapshot();
});
});