You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test it 'matches active tab to form content' do from file spec/features/form_tab_nav_js_spec.rb:39 fails. The instructions click_link "Attaching a file" will take the user down the page to the section on attaching a file, but it does NOT update the "active" tab as it should according to the test line expect(page).to have_selector("ul li.active a", text: 'Files')
When I attempted to update the test from expect(page).to have_selector("ul li.active a", Files') to expect(page).to have_selector("ul li.active a", text: 'Files') to get rid of a Capybara warning, this test started failing. What's going on is that previously "Files" wasn't actually being passed in to Capybara. There was indeed an "active" list item in the unordered list, but the active item had the text "Metadata" not "Files". When I added the capybara selector text:, it started looking for an active list item of "Files" but that doesn't exist on the page.
The bug lies in the workflow for "Navigating the tabs in the create work form".
Expected behavior
When the user clicks on "Attaching a file", the page jumps to the appropriate section and the active tab selector will change from "Metadata" to "Files".
Actual behavior
The page jumps to the requested location, but the active tab selector does not change
Janell-Huyck
changed the title
Bug: Clicking "Attachign a file" does not update active tab selector
Bug: Clicking "Attaching a file" does not update active tab selector
Nov 13, 2023
Descriptive summary
The test
it 'matches active tab to form content' do
from file spec/features/form_tab_nav_js_spec.rb:39 fails. The instructionsclick_link "Attaching a file"
will take the user down the page to the section on attaching a file, but it does NOT update the "active" tab as it should according to the test lineexpect(page).to have_selector("ul li.active a", text: 'Files')
When I attempted to update the test from
expect(page).to have_selector("ul li.active a", Files')
toexpect(page).to have_selector("ul li.active a", text: 'Files')
to get rid of a Capybara warning, this test started failing. What's going on is that previously "Files" wasn't actually being passed in to Capybara. There was indeed an "active" list item in the unordered list, but the active item had the text "Metadata" not "Files". When I added the capybara selectortext:
, it started looking for an active list item of "Files" but that doesn't exist on the page.The bug lies in the workflow for "Navigating the tabs in the create work form".
Expected behavior
When the user clicks on "Attaching a file", the page jumps to the appropriate section and the active tab selector will change from "Metadata" to "Files".
Actual behavior
The page jumps to the requested location, but the active tab selector does not change
Discovered with PR #1120
The text was updated successfully, but these errors were encountered: