Fix optimistic selector

The new 'Edit documents' link was matching the `text: "Edit"` selector
in Capybara. The selector is now more specific (check that a link to the
edit page exists and has the text "Edit").