|
|
|
@ -29,22 +29,23 @@ describe 'subject inplace editor', js: true, selenium: true do |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let(:property_name) { :version } |
|
|
|
|
let!(:work_package) { FactoryGirl.create :work_package, project: project } |
|
|
|
|
let(:work_package) { FactoryGirl.create :work_package, project: project } |
|
|
|
|
let(:user) { FactoryGirl.create :admin } |
|
|
|
|
let(:work_packages_page) { WorkPackagesPage.new(project) } |
|
|
|
|
let(:field) { WorkPackageField.new page, property_name } |
|
|
|
|
let(:work_package_page) { Pages::FullWorkPackage.new(work_package) } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
login_as(user) |
|
|
|
|
work_packages_page.visit_index(work_package) |
|
|
|
|
within '.panel-toggler' do |
|
|
|
|
find('a', text: 'Show all attributes').click |
|
|
|
|
end |
|
|
|
|
field.activate_edition |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it 'renders hierarchical versions' do |
|
|
|
|
work_package_page.visit! |
|
|
|
|
work_package_page.view_all_attributes |
|
|
|
|
work_package_page.ensure_page_loaded |
|
|
|
|
|
|
|
|
|
field = work_package_page.work_package_field(:version) |
|
|
|
|
|
|
|
|
|
field.activate_edition |
|
|
|
|
|
|
|
|
|
expect(page).to have_selector("#{field.field_selector} select") |
|
|
|
|
|
|
|
|
|
options = page.all("#{field.field_selector} select option") |
|
|
|
|