fixed feature spec selector

pull/9766/head
Eric Schubert 3 years ago
parent 3cb0690563
commit 3e5cd88c94
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 8
      modules/bim/spec/support/pages/ifc_models/show_default.rb

@ -56,22 +56,22 @@ module Pages
def model_viewer_visible(visible)
# Ensure the canvas is present
canvas_selector = '.op-ifc-viewer--model-canvas'
expect(page).to (visible ? have_selector(canvas_selector, wait: 10) : have_no_selector(canvas_selector, wait: 10))
expect(page).to(visible ? have_selector(canvas_selector, wait: 10) : have_no_selector(canvas_selector, wait: 10))
# Ensure Xeokit is initialized. Only then the toolbar is generated.
toolbar_selector = '.xeokit-toolbar'
expect(page).to (visible ? have_selector(toolbar_selector, wait: 10) : have_no_selector(toolbar_selector, wait: 10))
expect(page).to(visible ? have_selector(toolbar_selector, wait: 10) : have_no_selector(toolbar_selector, wait: 10))
end
def model_viewer_shows_a_toolbar(visible)
selector = '.xeokit-btn'
if visible
within ('[data-qa-selector="op-ifc-viewer--toolbar"]') do
within('[data-qa-selector="op-ifc-viewer--toolbar-container"]') do
expect(page).to have_selector(selector, count: 9)
end
else
expect(page).to have_no_selector(selector)
expect(page).to have_no_selector('[data-qa-selector="op-ifc-viewer--toolbar"]')
expect(page).to have_no_selector('[data-qa-selector="op-ifc-viewer--toolbar-container"]')
end
end

Loading…
Cancel
Save