Skip to content

[#12048] Migrate E2E Tests for InstructorStudentActivityLogsPage#13450

Merged
mingyuancode merged 19 commits intoTEAMMATES:masterfrom
WeeJean:migrate-InstructorStudentActivityLogsPage
Feb 6, 2026
Merged

[#12048] Migrate E2E Tests for InstructorStudentActivityLogsPage#13450
mingyuancode merged 19 commits intoTEAMMATES:masterfrom
WeeJean:migrate-InstructorStudentActivityLogsPage

Conversation

@WeeJean
Copy link
Contributor

@WeeJean WeeJean commented Jan 28, 2026

Overview
This PR migrates the testing infrastructure for the Instructor Student Activity Logs page to the SQL path. It includes updates to the underlying test data (JSON) and the E2E test class to ensure compatibility with the SQL-migrated environment.

Changes

  • JSON Migration: Migrated InstructorStudentActivityLogsPageE2ETest.json to a SQL-compatible format.

  • E2E Test Updates: Refactored InstructorStudentActivityLogsPageE2ETest.java to work with the SQL page objects.

Page Object Updates

  • Fixed setLogsFromDateTime typo: Corrected a critical bug in InstructorStudentActivityLogsPage.java where the "From" date setter was erroneously overwriting the "To" timepicker. This was causing search ranges to be invalid in SQL-strict environments.
  • Added getLogsOutputText(): Introduced a helper method to retrieve the raw text from the logs output for easier and more robust assertions.
  • Added waitForLogsToLoad(): Abstracted the Selenium waitForElementPresence logic into the Page Object to comply with project architecture and keep Selenium imports out of test cases.

@github-actions
Copy link

Hi @WeeJean, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contribution guidelines:

  • Description must reference the issue number the PR is fixing, e.g. Fixes #<issue-number> (or Part of #<issue-number> if the PR does not address the issue fully)

Please address the above before we proceed to review your PR.

@WeeJean WeeJean marked this pull request as draft January 28, 2026 02:04
@samuelfangjw samuelfangjw added the c.Task Other non-user-facing works, e.g. refactoring, adding tests label Jan 28, 2026
@samuelfangjw samuelfangjw added this to the V9.0.0-beta.7 milestone Jan 28, 2026
@DhiraPT DhiraPT changed the title [#13324] Migrate E2E Tests for InstructorStudentActivityLogsPage [#12048] Migrate E2E Tests for InstructorStudentActivityLogsPage Jan 30, 2026
@WeeJean WeeJean marked this pull request as ready for review February 1, 2026 05:49
Copy link

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

This PR migrates the E2E test for the Instructor Student Activity Logs page from the legacy datastore to SQL. It includes test data migration to SQL-compatible format, updates to the E2E test class, and important fixes to the page object.

Changes:

  • Migrated test data from datastore format to SQL entities with proper UUIDs and foreign key relationships
  • Updated E2E test to use SQL entities (Course, Student, FeedbackSession, etc.) instead of datastore attributes
  • Fixed a critical typo in InstructorStudentActivityLogsPage.java where setLogsFromDateTime was incorrectly setting the "To" timepicker instead of the "From" timepicker
  • Added helper methods getLogsOutputText() and waitForLogsToLoad() to the page object for better abstraction

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
testng-unstable-e2e-sql.xml Added the SQL version of InstructorStudentActivityLogsPageE2ETest to the unstable SQL test suite
InstructorStudentActivityLogsPageE2ETestSql.json Complete test data migration with SQL-compatible structure including UUIDs, accounts, sections, and teams
InstructorStudentActivityLogsPage.java Fixed critical bug in setLogsFromDateTime and added helper methods for test assertions
InstructorStudentActivityLogsPageE2ETest.java New SQL version of the E2E test with updated entity references and enhanced date/time filtering

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

Copy link

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

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


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

Student student = sqlLogic.getStudent(studentId);
FeedbackSession feedbackSession = sqlLogic.getFeedbackSession(fsId);

FeedbackSessionLog feedbacksessionlog = new FeedbackSessionLog(student, feedbackSession,
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The variable name feedbacksessionlog doesn't follow Java camelCase naming conventions. It should be feedbackSessionLog to maintain consistency with the rest of the codebase, where variables of type FeedbackSessionLog are named using proper camelCase (similar to how student and feedbackSession are named on lines 59-60).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@mingyuancode mingyuancode left a comment

Choose a reason for hiding this comment

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

Fix the copilot n my comment and we should be good to go

FeedbackSessionLog feedbacksessionlog = new FeedbackSessionLog(student, feedbackSession,
convertedFslType, Instant.now());

// Necessary to assist local testing. For production usage, this will be a no-op.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this comment here too, it doesnt apply any more

* Gets the expected number of submissions for a feedback session.
*
* <br>Preconditions: <br>
* <br>Preconditions: <br/>
Copy link
Contributor

Choose a reason for hiding this comment

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

is it required to add the / ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While not strictly required by the Java compiler, adding the / is highly recommended to ensure the Javadoc is well-formed XML and to prevent potential build warnings from the documentation tool. This is also to ensure consistency with the
usage in multiple instances in this file before.

@WeeJean WeeJean requested a review from mingyuancode February 6, 2026 15:33
Copy link
Contributor

@mingyuancode mingyuancode left a comment

Choose a reason for hiding this comment

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

LGTM

@mingyuancode mingyuancode merged commit dd51a22 into TEAMMATES:master Feb 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c.Task Other non-user-facing works, e.g. refactoring, adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants