|
|
|
@ -111,9 +111,20 @@ describe 'Switching work package view', |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context 'switching to mobile card view' do |
|
|
|
|
let!(:height_before) do |
|
|
|
|
page.driver.browser.manage.window.size.height |
|
|
|
|
end |
|
|
|
|
let!(:width_before) do |
|
|
|
|
page.driver.browser.manage.window.size.width |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
page.driver.browser.manage.window.resize_to(width_before, height_before) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it 'can switch the representation automatically on mobile after a refresh' do |
|
|
|
|
# Change browser size to mobile |
|
|
|
|
page.driver.browser.manage.window.resize_to(679,1080) |
|
|
|
|
page.driver.browser.manage.window.resize_to(679, 1080) |
|
|
|
|
|
|
|
|
|
# Expect the representation to switch to card on mobile |
|
|
|
|
page.driver.browser.navigate.refresh |
|
|
|
@ -133,7 +144,7 @@ describe 'Switching work package view', |
|
|
|
|
expect(url).not_to match(/query_props=.+/) |
|
|
|
|
|
|
|
|
|
# Since the query is unchanged, the WPs will be displayed as list on larger screens again |
|
|
|
|
page.driver.browser.manage.window.resize_to(680,1080) |
|
|
|
|
page.driver.browser.manage.window.resize_to(680, 1080) |
|
|
|
|
page.driver.browser.navigate.refresh |
|
|
|
|
wp_table.expect_work_package_listed wp_1, wp_2 |
|
|
|
|
wp_table.expect_work_package_order wp_1, wp_2 |
|
|
|
|