Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add E2E testing to teammates pages in v7 #9536

Closed
26 of 27 tasks
jacoblipech opened this issue Mar 4, 2019 · 2 comments
Closed
26 of 27 tasks

Add E2E testing to teammates pages in v7 #9536

jacoblipech opened this issue Mar 4, 2019 · 2 comments
Labels
a-CodeQuality Code/design quality-related traits, static analysis a-Testing Testing-related traits such as efficiency, robustness, coverage c.Epic Feature/task that is worth many smaller sub-features/sub-tasks help wanted Moderate difficulty, small localized change; suitable for novice contributors

Comments

@jacoblipech
Copy link
Contributor

jacoblipech commented Mar 4, 2019

Migrate end to end tests for all the pages below from v6 to v7

  • Student Home Page
  • Student Profile Page
  • Student Course Details Page
  • Admin Home Page
  • Admin Accounts Page
  • Admin Search Page
  • Admin Sessions Page
  • Instructor Home Page
  • Instructor Course Details Page
  • Instructor Courses Page
  • Instructor Course Edit Page
  • Instructor Course Enroll Page
  • Instructor Course Student Details Page
  • Instructor Course Student Edit Page
  • Instructor Search Page (ticked by default; see division of cases)
    • Students table
    • Responses + response comments table
  • Instructor Student List Page
  • Instructor Student Records Page (ticked by default; see division of cases)
    • Student details
    • Feedback responses given/received by student
  • Instructor Session Edit Page
  • Instructor Sessions Page
  • Instructor Session Result Page
  • Session Submission Page
  • Session Result Page
  • Course Join Page
@wkurniawan07
Copy link
Member

While we can use the browser tests in V6 as reference, we need to significantly re-think how to structure the tests such that they are indeed E2E level. In V6 and before, there were way too many stuffs tested in the browser tests that should be tested in lower level. It does not help that our severe overuse of God mode has eroded the value of testing (now we can barely remember what to pay attention to for each HTML test file). Of course, to be fair, there are factors such as lack of supporting infrastructure.

@wkurniawan07 wkurniawan07 added c.Epic Feature/task that is worth many smaller sub-features/sub-tasks a-Testing Testing-related traits such as efficiency, robustness, coverage a-CodeQuality Code/design quality-related traits, static analysis labels Mar 5, 2019
jacoblipech added a commit that referenced this issue Mar 6, 2019
* migrate files with “New” behind to different v6 and v7 files. Unable to remove v6 files due to strong dependency on AppPage

* migrate studentHomePageE2ETest and and update BaseE2ETestCase

* implement NewBackDoor methods to handle different calls to front end for testing

* Initialise a new BackDoorTestAction which needs further implementation to link to the specific front end urls

* uncomment out loginAdminAsInstructor to log in studentHome as Admin

* `containsExpectedPageContents` is not needed to work anymore as `getPageSource()` no longer gets the entire page content.

* remove jQueryAjaxHandler

* change the way comment out is used

* add id to front end elements to handle selenium

* add additional dependencies to compile and build

* remove unused methods

* as pageSource does not work anymore, uses another way to populate different title at each page to check accuracy of the page.

* endpoint for data bundle action

* remove unnecessary methods in NewBackDoor

* remove html verification and persistent login method, add comments to request help

* waitForPageToLoad() always load probably due to front end being generated from angular. Hence it no longer works and needs to be replaced with visibility function

* update html frontend to show title message despite error

* Implement endpoints to persist and remove data bundle

* Add NewBackDoor method to persist data bundle

* Remove duplicated classes

* Add CS suppressions for methods/variables in pageobjects package

* Add Macker rule exception

* Separate removing and persisting of data bundle

* Move old BackDoor back to teammates.test package

* Rename NewBackDoor -> BackDoor

* Remove HtmlHelper to prevent further misuse

* Add servlet to handle logging out

* update student e2e behaviour tests

* remove unused methods in migrated AppPageNew

* migrate all pages related to StudentHomeE2ETest and add New to the class such as LoginPageNew.
Also handled check style errors and import statements.

* add all the basic testing functions of StudentHomePageE2ETest and remove unnecessary methods in AppPageNew

* Remove migrated files

* fix javadoc, comments, refactor code

* remove unnecessary unused tests

* fix lint error and remove unnecessary id populated

* reorganise test json file to remove unnecessary information and fix StudentHomeE2ETest cases

* Add test accounts

* Rename AppPageNew -> AppPage

* fix javadoc for pages in e2e tests

* remove unnecessary changes and fix `kebab-case` in ids

* fix naming and logic for student home e2e tests

* refactor appPage to separate script into javascript files

* Removing the waitForPageToLoad() function as the refactored code for `waitForPageToLoad()` function causes it to timeout

* Fix waitForPageToLoad issue in home page

* Remove mentions to development server where unnecessary
jacoblipech added a commit that referenced this issue Mar 18, 2019
* migrate relevant pages used for student profile page

* add java docs for migrated pages

* remove and migrate unnecessary images

* front end changes to allow web elements to find the correct elements

* add basic workflow of a student using the student profile page features

* additional styling issues

* revert back images stored

* remove unnecessary and unused files (html pages, EntityNotFound and StudenProfilePicturePage) from v6

* remove unnecessary method calls and refactor codes

* retrieves StudentProfileAttribute and verify profile pic url has correct picturekey value

* remove unnecessary json test cases and simplify data initialisation process

* continue to use TEST_STUDENT2_ACCOUNT as student1_account conflicts with studentHomeE2E test

* fix marven error to generate StudentProfileAttributes in another way
jacoblipech added a commit that referenced this issue Mar 24, 2019
* migrate student course details page E2E test from v6 to v7

* remove unnecessary pages from for student course details page

* add studentcoursedetailspagee2eTest to testing-e2e.xml file

* refactor studentViewTeamBtn to StudentHomePage

* refactor e2e tests and fix e2e stability on travis
wkurniawan07 added a commit that referenced this issue Mar 27, 2019
#9605)

* Add snapshot tests for admin home page

* Add AdminHomePageE2ETest

* Remove legacy admin home page UI test

* Remove dependency of existing E2E tests to real accounts

* Add admin home page front-end tests
madanalogy added a commit that referenced this issue May 27, 2020
* Update InstructorCourseEnrollPageE2ETest

* Fix bugs and lint InstructorCourseEnrollPageE2ETest

* Fix bugs causing Travis failure

* Add backend checks and reduce rows added in test

Co-authored-by: Ahmed Bahajjaj <Ahmed_Bahajjaj@u.nus.edu>
jtankw3 added a commit that referenced this issue May 28, 2020
* Update InstructorCourseEditPageE2ETest

* Fix bugs and linting

* Add some methods to BackDoor to facilitate checking datastore

* Add extra checks to InstructorCourseEditPageE2ETest to account for backend

* Some changes to InstructorCourseEditPage to reduce intermittent failing

* Add extra wait

* Remove wait from AppPage that causes timeouts

* Delete old files

* Remove wait

* Change import order

* Use existing verify datastore methods

Co-authored-by: Wilson Kurniawan <wkurniawan.92@gmail.com>
madanalogy pushed a commit that referenced this issue Jun 15, 2020
* Add Backdoor methods to access archived course details

* Add InstructorCoursesPage

* Add InstructorCoursesPageE2ETest

* Standardize lower case for test case description

* Update snapshots

* Use system default zoneId for date string comparison

* Delete old files

* Get course statistics programmically

* Add retries for archive course verification

* Use system default timezone for deleted details

* Fix code quality issues
madanalogy pushed a commit that referenced this issue Jul 14, 2020
* Fix flaky StudentCourseDetailsPageE2ETest

* Update snapshots
@wkurniawan07 wkurniawan07 added this to In progress in Launch of new E2E tests Oct 17, 2020
jtankw3 added a commit that referenced this issue Nov 1, 2020
* Remove student key from submit page urls

* Add one reload if page is stuck loading

* Add waits to submit page object

* Add wait for feedback edit page

* Add BaseFeedbackQuestionE2ETest

* Exclude all base classes from TestNgXmlTest

* Fix lint errors
jtankw3 added a commit that referenced this issue Nov 1, 2020
* Add StudentFeedbackResultsPageE2ETest

* Add loaded question check for unregistered student

* Skip response check for contrib question in page object

* Refactor for code quality

* Use lineSeparator

* Replace statistics with hardcoded expected

* Use AssertionError instead of RuntimeException
jtankw3 added a commit that referenced this issue Nov 3, 2020
* Update docs for E2E testing

* Edit e2e testing doc

* Update README

* Add abstract method testAll

* Clean up docs

* Clean up TimezoneSyncerTest

* Shift E2E running details to e2e-testing.md

* Improve document layout and wording

Co-authored-by: Ahmed Bahajjaj <Ahmed_Bahajjaj@u.nus.edu>
wkurniawan07 pushed a commit that referenced this issue Nov 11, 2020
* Fix submit page access issues

* Fix email related issues

* Add changes to improve stability

* Run E2E in single thread for production server

* Fix timing issues

* Remove logouts

* Fix chrome preference settings

* Improve email checks

* Update E2E documetation

* Remove infinite loop in FeedbackSubmitPage

* Use getListOfUnreadEmailFromSender for getUserAuthenticated
@wkurniawan07 wkurniawan07 unpinned this issue Dec 6, 2020
@wkurniawan07 wkurniawan07 moved this from In progress to Done in Launch of new E2E tests Dec 14, 2020
@wkurniawan07
Copy link
Member

This can be considered as done as we have sufficient E2E tests now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-CodeQuality Code/design quality-related traits, static analysis a-Testing Testing-related traits such as efficiency, robustness, coverage c.Epic Feature/task that is worth many smaller sub-features/sub-tasks help wanted Moderate difficulty, small localized change; suitable for novice contributors
Projects
No open projects
Development

No branches or pull requests

3 participants