next try to get inplace edit specs stable

pull/3190/head
Jens Ulferts 9 years ago
parent a79a30c45d
commit 06645249a2
  1. 9
      spec/features/work_packages/details/inplace_editor/description_editor_spec.rb
  2. 8
      spec/features/work_packages/details/inplace_editor/shared_contexts.rb
  3. 9
      spec/features/work_packages/details/inplace_editor/subject_editor_spec.rb

@ -22,10 +22,13 @@ describe 'description inplace editor', js: true do
before do
allow(User).to receive(:current).and_return(user)
visit project_work_packages_path(project) + "/#{work_package.id}/overview"
end
visit project_work_packages_path(project)
ensure_wp_table_loaded
include_context 'ensure wp table loaded'
row = page.find("#work-package-#{work_package.id}")
row.double_click
end
context 'in read state' do
it 'renders the correct text' do

@ -41,11 +41,9 @@ end
# Ensure the page is completely loaded before the spec is run.
# The status filter is loaded very late in the page setup.
shared_context 'ensure wp table loaded' do
before do
expect(page).to have_selector('#operators-status_id', visible: false),
'Work package table page was not loaded in time'
end
def ensure_wp_table_loaded
expect(page).to have_selector('#operators-status_id', visible: false),
'Work package table page was not loaded in time'
end
shared_context 'ensure wp details pane update done' do

@ -15,10 +15,13 @@ describe 'subject inplace editor', js: true do
before do
allow(User).to receive(:current).and_return(user)
visit project_work_packages_path(project) + "/#{work_package.id}/overview"
end
visit project_work_packages_path(project)
ensure_wp_table_loaded
include_context 'ensure wp table loaded'
row = page.find("#work-package-#{work_package.id}")
row.double_click
end
context 'in read state' do
it 'has correct content' do

Loading…
Cancel
Save