pull/5456/head
Oliver Günther 8 years ago
parent d464a01453
commit 8d6e457452
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 6
      app/assets/stylesheets/layout/_work_packages_full_view.sass
  2. 2
      spec/features/work_packages/details/details_relations_spec.rb
  3. 2
      spec/features/work_packages/indem_sums_spec.rb
  4. 6
      spec/features/work_packages/pagination_spec.rb
  5. 2
      spec/support/pages/split_work_package.rb
  6. 4
      spec/support/pages/work_packages_table.rb
  7. 10
      spec/support/pages/work_packages_timeline.rb

@ -29,8 +29,14 @@
//++
body.controller-work_packages.action-show
body.controller-work_packages.full-create
overflow-x: auto
// Fix selenium scrolling the #content which shouldn't be possible
// This appears to be caused by somehow setting the scrollTop to move to an element.
#content
overflow: visible
.work-packages--show-view
display: flex
flex-direction: column

@ -256,7 +256,7 @@ describe 'Work package relations tab', js: true, selenium: true do
add_relation('follows', relatable)
# Switch to full view
find('.work-packages-show-view-button').click
find('.work-packages--details-fullscreen-icon').click
# Expect to have row
created_row = find(".relation-row-#{relatable.id}", wait: 10)

@ -52,7 +52,7 @@ RSpec.feature 'Work package index sums', js: true do
scenario 'calculates summs correctly' do
expect(page).to have_content('Work packages')
within('#work-packages-index') do
within('.work-packages-list-view--container') do
expect(page).to have_content(work_package_1.subject)
expect(page).to have_content(work_package_2.subject)
end

@ -50,7 +50,7 @@ RSpec.feature 'Work package pagination', js: true do
scenario do
expect(page).to have_content('Work packages')
within('#work-packages-index') do
within('.work-packages-list-view--container') do
expect(page).to have_content(work_package_1.subject)
expect(page).to_not have_content(work_package_2.subject)
end
@ -59,7 +59,7 @@ RSpec.feature 'Work package pagination', js: true do
click_link '2'
end
within('#work-packages-index') do
within('.work-packages-list-view--container') do
expect(page).to have_content(work_package_2.subject)
expect(page).to_not have_content(work_package_1.subject)
end
@ -68,7 +68,7 @@ RSpec.feature 'Work package pagination', js: true do
click_link '50'
end
within('#work-packages-index') do
within('.work-packages-list-view--container') do
expect(page).to have_content(work_package_1.subject)
expect(page).to have_content(work_package_2.subject)
end

@ -43,7 +43,7 @@ module Pages
end
def switch_to_fullscreen
find('.work-packages-show-view-button').click
find('.work-packages--details-fullscreen-icon').click
FullWorkPackage.new(work_package, project)
end

@ -118,14 +118,14 @@ module Pages
def click_on_row(work_package)
loading_indicator_saveguard
page.driver.browser.mouse.click(row(work_package).native)
page.driver.browser.action.click(row(work_package).native).perform
end
def open_full_screen_by_doubleclick(work_package)
loading_indicator_saveguard
# The 'id' column should have enough space to be clicked
click_target = row(work_package).find('.wp-table--cell-span.id')
page.driver.browser.mouse.double_click(click_target.native)
page.driver.browser.action.double_click(click_target.native).perform
FullWorkPackage.new(work_package, project)
end

@ -35,19 +35,23 @@ module Pages
find('#work-packages-timeline-toggle-button').click
end
def timeline_row_selector(wp_id)
"#wp-timeline-row-#{wp_id}"
end
def expect_timeline!(open: true)
if open
expect(page).to have_selector('#work-packages-timeline-toggle-button.-active')
expect(page).to have_selector('.work-package-table .wp-timeline-cell')
expect(page).to have_selector('.wp-table-timeline--container .wp-timeline-cell')
else
expect(page).to have_no_selector('#work-packages-timeline-toggle-button.-active')
expect(page).to have_no_selector('.work-package-table .wp-timeline-cell', visible: true)
expect(page).to have_no_selector('.wp-table-timeline--container .wp-timeline-cell', visible: true)
end
end
def expect_timeline_element(work_package)
type = work_package.milestone? ? :milestone : :bar
expect(page).to have_selector("#{work_package_row_selector(work_package)} .timeline-element.#{type}")
expect(page).to have_selector("#{timeline_row_selector(work_package.id)} .timeline-element.#{type}")
end
end
end

Loading…
Cancel
Save