Skip to content

Commit

Permalink
Merge pull request #5570 from WikiEducationFoundation/FixSpecs
Browse files Browse the repository at this point in the history
Fix specs
  • Loading branch information
ragesoss authored Jan 2, 2024
2 parents dbd3ada + 1ae1078 commit 01df707
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions spec/features/timeline_editing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@
end

# Open edit mode for the third block
find(".week-1 .block-kind-#{Block::KINDS['milestone']}").hover
milestone_block = find(".week-1 .block-kind-#{Block::KINDS['milestone']}")
scroll_to milestone_block
sleep 0.5
milestone_block.hover

within ".week-1 .block-kind-#{Block::KINDS['milestone']}" do
find('.block__edit-block', match: :first).click
end
Expand Down Expand Up @@ -195,7 +198,9 @@
visit "/courses/#{course_with_timeline.slug}/timeline"

# Change the first block
find(".week-1 .block-kind-#{Block::KINDS['assignment']}").hover
assignment_block = find(".week-1 .block-kind-#{Block::KINDS['assignment']}")
scroll_to assignment_block
assignment_block.hover
sleep 0.5
within ".week-1 .block-kind-#{Block::KINDS['assignment']}" do
find('.block__edit-block', match: :first).click
Expand All @@ -204,7 +209,9 @@
end

# Change the third block
find(".week-1 .block-kind-#{Block::KINDS['milestone']}").hover
milestone_block = find(".week-1 .block-kind-#{Block::KINDS['milestone']}")
scroll_to milestone_block
milestone_block.hover
sleep 0.5
within ".week-1 .block-kind-#{Block::KINDS['milestone']}" do
find('.block__edit-block', match: :first).click
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/alerts/unsubmitted_course_alert_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
submitted: false,
slug: 'last_minute_course',
start: 3.days.from_now,
created_at: 1.week.ago)
created_at: 4.days.ago)
subject.create_alerts
expect(Alert.count).to eq(2)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

Capybara.register_driver :selenium do |app|
options = Selenium::WebDriver::Chrome::Options.new(
args: %w[headless no-sandbox disable-gpu --window-size=1200,1200]
args: %w[--headless=new no-sandbox disable-gpu --window-size=1200,1200]
)
Capybara::Selenium::Driver.new(app,
browser: :chrome,
Expand Down

0 comments on commit 01df707

Please sign in to comment.