Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Clicking "Attaching a file" does not update active tab selector #1121

Open
Janell-Huyck opened this issue Nov 13, 2023 · 0 comments
Open

Comments

@Janell-Huyck
Copy link
Contributor

Janell-Huyck commented 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 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

Discovered with PR #1120

@Janell-Huyck 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
@scherztc scherztc added this to the Security and Maintenance milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants