-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from oslabs-beta/master
Launching version 5.1.0
- Loading branch information
Showing
206 changed files
with
39,297 additions
and
7,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
node_modules | ||
.eslintrc.js | ||
.DS_Store | ||
user/settings.json | ||
dist | ||
build | ||
coverage | ||
__tests__/**/__snapshots__ | ||
__tests__/**/__snapshots__ | ||
release-builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
language: node_js | ||
node_js: | ||
- "stable" | ||
os: | ||
osx | ||
# jobs: | ||
# allow_failures: | ||
# - os: osx | ||
node_js: | ||
- 'stable' | ||
os: osx | ||
jobs: | ||
# allow_failures: | ||
# - os: osx | ||
fast_finish: true | ||
install: | ||
- npm install | ||
- npm install | ||
script: | ||
npm run test:app | ||
# safelist | ||
# branches: | ||
# only: | ||
# - master | ||
# - middleware | ||
# - chronosWebsite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,33 @@ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
import { createMount, createShallow } from '@material-ui/core/test-utils'; | ||
|
||
import Home from '../../../app/components/Home'; | ||
import { DashboardContext } from '../../../app/context/DashboardContext'; | ||
|
||
|
||
describe('<Home />', () => { | ||
let wrapper: any; | ||
let mount: any; | ||
let shallow: any; | ||
|
||
beforeAll(() => { | ||
const applications: any = []; | ||
const getApplications: any = jest.fn(); | ||
|
||
const mockHome = ( | ||
<DashboardContext.Provider value={{ applications, getApplications }}> | ||
<Home /> | ||
</DashboardContext.Provider> | ||
); | ||
wrapper = mount(mockHome); | ||
beforeEach(() => { | ||
mount = createMount(); | ||
shallow = createShallow(); | ||
}); | ||
|
||
it('should render an <img/> tag of the Chronos pangolin', () => { | ||
const image = wrapper.find('img'); | ||
expect(image).toBeDefined(); | ||
|
||
const imageProps = image.props(); | ||
expect(imageProps).toHaveProperty('width'); | ||
expect(imageProps).toHaveProperty('height'); | ||
expect(imageProps).toHaveProperty('src'); | ||
expect(imageProps).toHaveProperty('alt'); | ||
afterEach(() => { | ||
mount.cleanUp(); | ||
}); | ||
|
||
it("should render an <h1> tag that says 'Welcome to Chronos!'", () => { | ||
const h1Tag = wrapper.find('h1'); | ||
expect(h1Tag.text()).toMatch('Welcome to Chronos!'); | ||
it("should render an <p> tag that says 'Your all-in-one application monitoring tool'", () => { | ||
const wrapper = shallow(<Home />); | ||
const pTag = wrapper.find('p'); | ||
expect(pTag.text()).toMatch('Your all-in-one application monitoring tool'); | ||
}); | ||
|
||
it("should render a <Link> tag that is labeled 'Get Started'", () => { | ||
const wrapper = shallow(<Home />); | ||
const linkTag = wrapper.find('Link'); | ||
expect(linkTag).toBeDefined(); | ||
expect(linkTag.text()).toMatch('Get started'); | ||
expect(linkTag.text()).toMatch('Get Started'); | ||
expect(linkTag.prop('to')).toEqual('/applications'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.