kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
50 lines
1.4 KiB
8 years ago
|
require 'spec_helper'
|
||
|
|
||
|
describe 'Zen mode', js: true do
|
||
|
let(:dev_role) do
|
||
|
FactoryGirl.create :role,
|
||
|
permissions: [:view_work_packages,
|
||
|
:edit_work_packages]
|
||
|
end
|
||
|
let(:dev) do
|
||
|
FactoryGirl.create :user,
|
||
|
firstname: 'Dev',
|
||
|
lastname: 'Guy',
|
||
|
member_in_project: project,
|
||
|
member_through_role: dev_role
|
||
|
end
|
||
|
|
||
|
let(:type) { FactoryGirl.create :type }
|
||
|
let(:project) { FactoryGirl.create(:project, types: [type]) }
|
||
|
|
||
|
let(:work_package) {
|
||
|
work_package = FactoryGirl.create :work_package,
|
||
|
project: project,
|
||
|
type: type,
|
||
|
created_at: 5.days.ago.to_date.to_s(:db)
|
||
|
}
|
||
|
let(:wp_page) { Pages::FullWorkPackage.new(work_package) }
|
||
|
|
||
|
let(:status_from) { work_package.status }
|
||
|
let(:status_intermediate) { FactoryGirl.create :status }
|
||
|
|
||
|
before do
|
||
|
login_as(dev)
|
||
|
|
||
|
work_package
|
||
|
|
||
|
wp_page.visit!
|
||
|
wp_page.ensure_page_loaded
|
||
|
end
|
||
|
|
||
|
it 'hides menus' do
|
||
|
wp_page.expect_no_zen_mode
|
||
|
wp_page.page.find('#work-packages-zen-mode-toggle-button').click
|
||
|
wp_page.expect_zen_mode
|
||
|
wp_page.page.find('.work-packages-list-view-button').click
|
||
|
wp_page.expect_zen_mode
|
||
|
wp_page.page.find('#work-packages-zen-mode-toggle-button').click
|
||
|
wp_page.expect_no_zen_mode
|
||
|
end
|
||
|
end
|