Skip to content

Commit

Permalink
Add a button to start game
Browse files Browse the repository at this point in the history
Co-authored-by: Selena Small <selenawiththetattoo@gmail.com>
Co-authored-by: Michael Milewski <saramic@gmail.com>
  • Loading branch information
3 people committed Dec 16, 2018
1 parent 44b8532 commit dde6ff8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class App extends Component {
<div className="App">
<header className="App-header">
<h2>Welcome to the Game</h2>
<button>Start Game</button>
</header>
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions client/src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ it('renders welcome message', () => {
const welcome = <h2>Welcome to the Game</h2>;
expect(wrapper.contains(welcome)).toEqual(true);
expect(shallowToJson(wrapper)).toMatchSnapshot();
});

it('renders a button', () => {
const wrapper = shallow(<App />);
const button = <button>Start Game</button>;
expect(wrapper.contains(button)).toEqual(true);
});
3 changes: 3 additions & 0 deletions client/src/__snapshots__/App.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ exports[`renders welcome message 1`] = `
<h2>
Welcome to the Game
</h2>
<button>
Start Game
</button>
</header>
</div>
`;
1 change: 0 additions & 1 deletion spec/features/games_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
visit '/'
expect(page).to have_content 'Welcome to the Game'

pending "there is a fire in the building and we have to leave."
page.find('button').click
end
end
Expand Down

0 comments on commit dde6ff8

Please sign in to comment.