Adapt tests to corrected route

pull/4935/head
Oliver Günther 8 years ago
parent 05a3f8c13c
commit 9ee8297886
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      features/support/paths.rb
  2. 3
      spec/features/work_packages/create_child_spec.rb
  3. 2
      spec/features/work_packages/details/inplace_editor/custom_field_spec.rb
  4. 2
      spec/features/work_packages/navigation_spec.rb
  5. 4
      spec/support/pages/work_packages_table.rb

@ -147,7 +147,7 @@ module NavigationHelpers
work_package = WorkPackage.find_by(subject: $1)
project = Project.find_by(identifier: $2)
"/projects/#{project.identifier}/work_packages/#{work_package.id}"
"/projects/#{project.identifier}/work_packages/#{work_package.id}/activity"
when /^the new work_package page (?:for|of) the project called "([^\"]+)"$/
"/projects/#{$1}/work_packages/new"

@ -124,8 +124,7 @@ RSpec.feature 'Work package create children', js: true, selenium: true do
child_work_package_page.ensure_page_loaded
child_work_package_page.expect_subject
expect(current_path)
.to eq("/projects/#{project.identifier}/work_packages/#{child_work_package.id}")
child_work_package_page.expect_current_path
child_work_package_page.expect_parent(original_work_package)
end

@ -2,7 +2,7 @@ require 'spec_helper'
require 'features/work_packages/work_packages_page'
require 'features/work_packages/details/inplace_editor/shared_examples'
describe 'custom field inplace editor', js: true, selenium: true do
describe 'custom field inplace editor', js: true do
let(:user) { FactoryGirl.create :admin }
let(:type) { FactoryGirl.create(:type_standard, custom_fields: custom_fields) }
let(:project) {

@ -100,7 +100,7 @@ RSpec.feature 'Work package navigation', js: true, selenium: true do
global_work_packages.open_full_screen_by_link(work_package)
full_work_package.expect_subject
expect(current_path).to eq project_work_package_path(project, work_package)
full_work_package.expect_current_path
# Safeguard: ensure spec to have finished loading everything before proceeding to the next spec
full_work_package.ensure_page_loaded

@ -99,7 +99,7 @@ module Pages
loading_indicator_saveguard
page.driver.browser.mouse.double_click(row(work_package).native)
FullWorkPackage.new(work_package)
FullWorkPackage.new(work_package, project)
end
def open_full_screen_by_button(work_package)
@ -108,7 +108,7 @@ module Pages
click_button(I18n.t('js.label_activate') + ' ' + I18n.t('js.button_show_view'))
FullWorkPackage.new(work_package)
FullWorkPackage.new(work_package, project)
end
def open_full_screen_by_link(work_package)

Loading…
Cancel
Save