Fix broken selectors

pull/6846/head
Oliver Günther 6 years ago
parent 9a200ee0e5
commit d41e1563f2
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 6
      spec/features/wiki/attachment_upload_spec.rb
  2. 2
      spec/support/components/work_packages/columns.rb
  3. 2
      spec/support/pages/work_packages_timeline.rb

@ -73,7 +73,7 @@ describe 'Upload attachment to wiki page', js: true do
editor.in_editor do |container, _|
# Expect URL is mapped to the correct URL
expect(container).to have_selector('img[src^="/api/v3/attachments/"')
expect(container).to have_selector('img[src^="/api/v3/attachments/"]')
expect(container).to have_no_selector('img[src="image.png"]')
end
@ -87,10 +87,10 @@ describe 'Upload attachment to wiki page', js: true do
expect(page).to have_selector('attachment-list-item', text: 'image.png', count: 2)
# Rendered once through the name in the backend
expect(page).to have_selector('img[src^="/attachments', count: 1)
expect(page).to have_selector('img[src^="/attachments"]', count: 1)
# And once with the full url
expect(page).to have_selector('img[src^="/api/v3/attachments/"', count: 1)
expect(page).to have_selector('img[src^="/api/v3/attachments/"]', count: 1)
expect(wiki_page_content).to include '![my-first-image](image.png)'
expect(wiki_page_content).to include '![](/api/v3/attachments'

@ -88,7 +88,7 @@ module Components
if impaired
within_modal do
input = find "input[type=checkbox][title='#{name}'"
input = find "input[type=checkbox][title='#{name}']"
input.set true
end
else

@ -100,7 +100,7 @@ module Pages
raise ArgumentError, "Invalid value"
end
expect(page).to have_selector(".wp-table-timeline--header-inner[data-current-zoom-level='#{value}'")
expect(page).to have_selector(".wp-table-timeline--header-inner[data-current-zoom-level='#{value}']")
end
def expect_timeline_element(work_package)

Loading…
Cancel
Save