Skip to content

Commit dde6ff8

Browse files
robjacobySelenaSmallsaramic
committed
Add a button to start game
Co-authored-by: Selena Small <selenawiththetattoo@gmail.com> Co-authored-by: Michael Milewski <saramic@gmail.com>
1 parent 44b8532 commit dde6ff8

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

client/src/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class App extends Component {
77
<div className="App">
88
<header className="App-header">
99
<h2>Welcome to the Game</h2>
10+
<button>Start Game</button>
1011
</header>
1112
</div>
1213
);

client/src/App.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ it('renders welcome message', () => {
1515
const welcome = <h2>Welcome to the Game</h2>;
1616
expect(wrapper.contains(welcome)).toEqual(true);
1717
expect(shallowToJson(wrapper)).toMatchSnapshot();
18+
});
19+
20+
it('renders a button', () => {
21+
const wrapper = shallow(<App />);
22+
const button = <button>Start Game</button>;
23+
expect(wrapper.contains(button)).toEqual(true);
1824
});

client/src/__snapshots__/App.test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ exports[`renders welcome message 1`] = `
1010
<h2>
1111
Welcome to the Game
1212
</h2>
13+
<button>
14+
Start Game
15+
</button>
1316
</header>
1417
</div>
1518
`;

spec/features/games_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
visit '/'
66
expect(page).to have_content 'Welcome to the Game'
77

8-
pending "there is a fire in the building and we have to leave."
98
page.find('button').click
109
end
1110
end

0 commit comments

Comments
 (0)