teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Data Migration: pageobjects migration to SQL-based versions

Open DhiraPT opened this issue 7 months ago • 3 comments

Add SQL-based versions of pageobject classes to support E2E test migration.

  • Abstract out methods into new SQL-based classes.

  • Do not combine SQL-based code with old Datastore-based code in the same class.

Task List: Migrate PageObjects to SQL-based versions (only classes that need migration)

  • [x] AdminSearchPage

  • [ ] AppPage (retain existing name)

  • [x] FeedbackResultsPage

  • [x] FeedbackSubmitPage

  • [x] InstructorCourseDetailsPage

  • [x] InstructorCourseEditPage

  • [x] InstructorCourseEnrollPage

  • [ ] InstructorCoursesPage

  • [x] InstructorCourseStudentDetailsEditPage

  • [x] InstructorCourseStudentDetailsViewPage

  • [x] InstructorFeedbackEditPage

  • [ ] InstructorFeedbackResultsPage

  • [ ] InstructorFeedbackSessionsPage

  • [x] InstructorHomePage

  • [ ] InstructorSearchPage

  • [ ] InstructorSessionIndividualExtensionPage

  • [x] InstructorStudentListPage

  • [ ] InstructorStudentRecordsPage

  • [ ] StudentCourseDetailsPage

  • [ ] UserNotificationsPage

DhiraPT avatar Apr 27 '25 21:04 DhiraPT

@DhiraPT Hi! May I attempt to contribute to this PR for InstructorFeedbackResultsPage?

twhjames avatar Jul 04 '25 04:07 twhjames

@twhjames Yes, sure!

DhiraPT avatar Jul 04 '25 08:07 DhiraPT

@myrilla12 Yes, thank you!

Also for @twhjames, some tips for the migration:

  1. Copy the entire old pageobject to the new file and then add "Sql" to the file name and class name.
  2. Remove the imports from teammates.common.datatransfer.attributes (so we can easily see which entity to replace).
  3. Replace all the entity with their sql entity (e.g. StudentAttributes to Student).
  4. Remove any non-sql methods from the new class (e.g., methods that only apply to Attributes) and remove sql-related methods from the old class.
  5. Update any sql test classes that are using the old pageobject.

These are just some of the basic tips. Sometimes you may need additional adjustments, so I would recommend understanding the existing logic first (what the class does and how it is being used). Maybe you can also uncover some hidden bugs in the current implementation.

DhiraPT avatar Jul 04 '25 19:07 DhiraPT