Skip to content

Add system tests (for events calendar view)#1314

Open
fbacall wants to merge 5 commits into
masterfrom
copilot/add-system-test-calendar-view
Open

Add system tests (for events calendar view)#1314
fbacall wants to merge 5 commits into
masterfrom
copilot/add-system-test-calendar-view

Conversation

@fbacall
Copy link
Copy Markdown
Member

@fbacall fbacall commented May 27, 2026

Summary of changes

  • Adds system tests using Capybara/Selenium.
  • Tests the events calendar view tab will load the calendar (via AJAX) when clicked.

Motivation and context

Catches the issue that was resolved by #1309

Can be used to test other JS features.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

@fbacall fbacall force-pushed the copilot/add-system-test-calendar-view branch from b49f4e3 to f96cd49 Compare May 27, 2026 09:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Rails system test infrastructure (Capybara/Selenium) and a system test to validate that the Events “Calendar” tab loads the calendar via AJAX and renders an event, intended to guard against regressions like the jQuery/CSP issue fixed in #1309.

Changes:

  • Add Capybara + Selenium WebDriver and a base ApplicationSystemTestCase for headless Chrome system tests.
  • Add a system test covering the Events calendar tab AJAX load/render path.
  • Update CI workflow to run system tests.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test_helper.rb Adjust VCR config to ignore localhost requests.
test/application_system_test_case.rb Introduces shared system test base class using headless Chrome (Selenium).
test/system/events_calendar_system_test.rb New system test asserting calendar tab loads and renders an event.
Gemfile Adds capybara and selenium-webdriver to the test group.
Gemfile.lock Locks new test dependencies (Capybara, Selenium, transitive deps).
.github/workflows/test.yml Renames workflow and adds a step to run rails test:system.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

class EventsCalendarSystemTest < ApplicationSystemTestCase
test 'calendar tab loads and renders events with javascript' do
freeze_time(Time.utc(2026, 5, 20, 12, 0, 0)) do
Event.create!(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants