Skip to content

Simon Tinsley - #2118

Open
simon-2357 wants to merge 2 commits into
makersacademy:mainfrom
simon-2357:main
Open

Simon Tinsley#2118
simon-2357 wants to merge 2 commits into
makersacademy:mainfrom
simon-2357:main

Conversation

@simon-2357

Copy link
Copy Markdown

No description provided.

@gawainhewitt gawainhewitt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simon, I really like your project. The presentation is clean and elegant, it works well and playing it is fun and behaves as expected. The CSS styling is a great addition. The specific test fail can be moved forward to a new failing test (:grimacing:) by using click_link "Rock" instead of click_button "Rock". The capybara documentation is not super helpful to be honest in this area, and I've been struggling on the same. I used find_by_id("Rock").click in mine - but I'm not sure that works - clink link on yours seemed to move it forward. More comments in the review on GH

Comment thread lib/game.rb
"Sorry, you lose! You picked scissors and the computer picked rock."
end
end
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how simple this is to follow - it's a nice way to have implemented the logic - nice work.

Comment thread views/play.erb
<a href="/paper"><button id="paper">Paper</button></a>
<a href="/scissors"><button id="scissors">Scissors</button></a>
</div>
</body> No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely work - elegant routing and selfishly it answers the question I was stuck on. Nice

Comment thread public/style.css
h1 {font-size: 48px; margin-bottom: 16px;}
.container {max-width: 1200px; text-align: center; background-color: #fff; margin: 40px auto 0 auto; padding: 20px; border-radius: 10px}
button {background-color: #072a6c; color: #fff; border-radius: 10px; padding: 10px 30px; margin: 10px; border: 0}
p {margin-bottom: 16px;} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dude - this is a triumph of simple elegant styling - nice work

Comment thread spec/feature_tests/game_feature_spec.rb Outdated
scenario "I select rock and I'm told I've won" do
allow_any_instance_of(Game).to receive(:name).and_return(2)
enter_name
click_button "Rock"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem with these tests is in how you are clicking the buttons. My understanding is that Cabybara will only find a click form button with this syntax. Instead try click_link("Rock")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However I put that in and theres a new problem, but at least we're kicking down the TDD path...

…k from here - thanks to Gawain for finding the previous problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants