generated from openedx/frontend-template-application
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Pearson-Advance/vue/PADV-646
PADV-646 - Add first access, last access and grade columns
- Loading branch information
Showing
3 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,19 @@ describe('Student Table', () => { | |
ccx_name: 'CCX 1', | ||
instructors: ['Instructor 1'], | ||
created: 'Fri, 25 Aug 2023 19:01:22 GMT', | ||
first_access: 'Fri, 25 Aug 2023 19:01:23 GMT', | ||
last_access: 'Fri, 25 Aug 2023 20:20:22 GMT', | ||
grade: true, | ||
}, | ||
{ | ||
learner_name: 'Student 2', | ||
learner_email: '[email protected]', | ||
ccx_name: 'CCX 2', | ||
instructors: ['Instructor 2'], | ||
created: 'Sat, 26 Aug 2023 19:01:22 GMT', | ||
first_access: 'Sat, 26 Aug 2023 19:01:24 GMT', | ||
last_access: 'Sat, 26 Aug 2023 21:22:22 GMT', | ||
grade: false, | ||
}, | ||
]; | ||
|
||
|
@@ -53,10 +59,22 @@ describe('Student Table', () => { | |
expect(component.container).toHaveTextContent('Instructor 1'); | ||
expect(component.container).toHaveTextContent('Instructor 2'); | ||
|
||
// Check datetime is formatted | ||
// Check datetime for created column is formatted | ||
expect(component.container).toHaveTextContent('Fri, 25 Aug 2023 19:01:22 GMT'); | ||
expect(component.container).toHaveTextContent('Sat, 26 Aug 2023 19:01:22 GMT'); | ||
|
||
// Check datetime for first access column is formatted | ||
expect(component.container).toHaveTextContent('Fri, 25 Aug 2023 19:01:23 GMT'); | ||
expect(component.container).toHaveTextContent('Sat, 26 Aug 2023 19:01:24 GMT'); | ||
|
||
// Check datetime for last access column is formatted | ||
expect(component.container).toHaveTextContent('Fri, 25 Aug 2023 20:20:22 GMT'); | ||
expect(component.container).toHaveTextContent('Sat, 26 Aug 2023 21:22:22 GMT'); | ||
|
||
// Check grade | ||
expect(component.container).toHaveTextContent('pass'); | ||
expect(component.container).toHaveTextContent('fail'); | ||
|
||
// Ensure "No students found." is not present | ||
expect(screen.queryByText('No students found.')).toBeNull(); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters