Skip to content

Commit

Permalink
use sleep method to resolve timing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Vakmeth committed Feb 27, 2024
1 parent 38e327f commit c3e2b5b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spec/features/skills_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ def fill_out_form
save_button.click
end
end
sleep(2)
edited_skill = Skill.where(title: 'new Title')[0]
until edited_skill
expect(edited_skill.category.title).to eq('Linux-Engineering')
expect(edited_skill.category.parent.title).to eq('System-Engineering')
expect(edited_skill.default_set).to eq(true)
expect(edited_skill.radar).to eq('adopt')
expect(edited_skill.portfolio).to eq('nein')
end
expect(edited_skill.category.title).to eq('Linux-Engineering')
expect(edited_skill.category.parent.title).to eq('System-Engineering')
expect(edited_skill.default_set).to eq(true)
expect(edited_skill.radar).to eq('adopt')
expect(edited_skill.portfolio).to eq('nein')
end

it 'can cancel edited skill' do
Expand Down

0 comments on commit c3e2b5b

Please sign in to comment.