Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

[3:1] Write a feature spec for the when a Purchase is entered with no exisiting barcode (see notes) #4

Open
armahillo opened this issue Jan 24, 2019 · 0 comments · May be fixed by #8
Assignees

Comments

@armahillo
Copy link
Collaborator

Summary

We have an existing feature spec marked pending. (Pending means that it won't prevent the build, but that it's also not checking for breakage). It's effectively a test IOU.

The spec is here:
https://github.com/loyno-mathcs/diaper/blob/master/spec/features/purchase_spec.rb#L146

It has the steps necessary for that flow, you'll need to write the Capybara commands to get this test to run correctly.

You might find it helpful to spin up the rails server (rails s) and walk through the steps manually in your browser, first. This will help you know what to put into the example. (Use the DOM inspector in your browser to get the id / names of the fields, for Capybara's selectors).

Lifehack

This test suite has "focus run" enabled, meaning you can tell RSpec to only run the tests you want it to. It also has the "Guard" gem, which will auto-run the test files as you modify them (on save). Since you're only adjusting one spec, you might find it easiest to do a "focus run". To do this, change:

scenario "a user can add items that do not yet have a barcode" do

to

scenario "a user can add items that do not yet have a barcode", :focus do

OR

fscenario "a user can add items that do not yet have a barcode" do

(either is ok). Then when you execute the suite:

$ bundle exec rake

it will only execute that one example.

BE SURE TO REMOVE THE FOCUS MARK BEFORE OPENING YOUR PR (if you forget to, just fix it and re-push)

Reference

@nihonjinrxs nihonjinrxs changed the title Write a feature spec for the when a Purchase is entered with no exisiting barcode (see notes) [3] Write a feature spec for the when a Purchase is entered with no exisiting barcode (see notes) Jan 25, 2019
@JessicaKCao JessicaKCao self-assigned this Feb 11, 2019
@madisonlemmond madisonlemmond self-assigned this Feb 11, 2019
@nihonjinrxs nihonjinrxs changed the title [3] Write a feature spec for the when a Purchase is entered with no exisiting barcode (see notes) [3:1] Write a feature spec for the when a Purchase is entered with no exisiting barcode (see notes) Feb 12, 2019
@madisonlemmond madisonlemmond linked a pull request Feb 27, 2019 that will close this issue
@nihonjinrxs nihonjinrxs reopened this Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants