Skip to content

Commit

Permalink
Rename vocab subject variable for clarity
Browse files Browse the repository at this point in the history
Not sure why I called this thing "title" ever, but it confused and
annoyed me enough just now that I've fixed it.
  • Loading branch information
jechols committed Jan 17, 2014
1 parent 4fb1852 commit f8bade4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/features/ingest_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ def mark_as_reviewed
fill_out_dummy_data

subject_div = all(:css, ".nested-fields[data-group=subject]").first
title = "Canned foods industry--Accidents"
vocab_subject = "Canned foods industry--Accidents"

# Now you don't see it...
expect(page).not_to have_content(title)
expect(page).not_to have_content(vocab_subject)

within(subject_div) do
select('subject', :from => "Type")
Expand All @@ -133,10 +133,10 @@ def mark_as_reviewed
value_field.native.send_key("food")

# ...now you do! Find it, click it, and ingest
expect(page).to have_content(title)
expect(page).to have_content(vocab_subject)

autocomplete_p_tags = all(:css, '.tt-suggestions p')
autocomplete_p_tags.select {|tag| tag.text == title}.first.click
autocomplete_p_tags.select {|tag| tag.text == vocab_subject}.first.click

# Validate the internal field
nodes = ingest_group_nodes("subject")
Expand All @@ -157,6 +157,7 @@ def mark_as_reviewed
expect(page).to include_ingest_fields_for("subject", "subject", "http://id.loc.gov/authorities/subjects/sh2007009834")

pending "When translation is fixed, get rid of that internal element showing up!"
expect(page).to include_ingest_fields_for("subject", "subject", vocab_subject)

# Verify on the show page as well
visit(catalog_path(@pid))
Expand Down

0 comments on commit f8bade4

Please sign in to comment.