Permalink
Browse files

Add a button to start game

Co-authored-by: Selena Small <selenawiththetattoo@gmail.com>
Co-authored-by: Michael Milewski <saramic@gmail.com>
  • Loading branch information...
3 people committed Nov 24, 2018
1 parent 44b8532 commit dde6ff8949ff6c6e40f1fa9c92465127534c1dd7
Showing with 10 additions and 1 deletion.
  1. +1 −0 client/src/App.js
  2. +6 −0 client/src/App.test.js
  3. +3 −0 client/src/__snapshots__/App.test.js.snap
  4. +0 −1 spec/features/games_spec.rb
@@ -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>
);
@@ -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);
});
@@ -10,6 +10,9 @@ exports[`renders welcome message 1`] = `
<h2>
Welcome to the Game
</h2>
<button>
Start Game
</button>
</header>
</div>
`;
@@ -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

0 comments on commit dde6ff8

Please sign in to comment.