-
Notifications
You must be signed in to change notification settings - Fork 32
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 #1319 from openedx/saleem-latif/ENT-9436
feat: Updated leaderboard data table to use new API endpoint.
- Loading branch information
Showing
7 changed files
with
15 additions
and
223 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -27,11 +27,11 @@ const mockAnalyticsCompletionsChartsData = { | |
const mockAnalyticsLeaderboardTableData = [ | ||
{ | ||
email: '[email protected]', | ||
dailySessions: 243, | ||
sessionCount: 243, | ||
learningTimeSeconds: 1111, | ||
learningTimeHours: 3.4, | ||
averageSessionLength: 1.6, | ||
courseCompletions: 4, | ||
courseCompletionCount: 4, | ||
}, | ||
]; | ||
|
||
|
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
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 |
---|---|---|
|
@@ -28,24 +28,24 @@ const mockLeaderboardData = { | |
results: [ | ||
{ | ||
email: '[email protected]', | ||
daily_sessions: 74, | ||
session_count: 74, | ||
learning_time_hours: 13.1, | ||
average_session_length: 1.8, | ||
course_completions: 3, | ||
course_completion_count: 3, | ||
}, | ||
{ | ||
email: '[email protected]', | ||
daily_sessions: 48, | ||
session_count: 48, | ||
learning_time_hours: 131.9, | ||
average_session_length: 2.7, | ||
course_completions: 1, | ||
course_completion_count: 1, | ||
}, | ||
{ | ||
email: '[email protected]', | ||
daily_sessions: 92, | ||
session_count: 92, | ||
learning_time_hours: 130, | ||
average_session_length: 1.4, | ||
course_completions: 3, | ||
course_completion_count: 3, | ||
}, | ||
], | ||
}; | ||
|
@@ -134,9 +134,9 @@ describe('Leaderboard Component', () => { | |
const rowCells = within(rows[index + 1]).getAllByRole('cell'); // Skip header row | ||
expect(rowCells[0]).toHaveTextContent(user.email); | ||
expect(rowCells[1]).toHaveTextContent(user.learning_time_hours); | ||
expect(rowCells[2]).toHaveTextContent(user.daily_sessions); | ||
expect(rowCells[2]).toHaveTextContent(user.session_count); | ||
expect(rowCells[3]).toHaveTextContent(user.average_session_length); | ||
expect(rowCells[4]).toHaveTextContent(user.course_completions); | ||
expect(rowCells[4]).toHaveTextContent(user.course_completion_count); | ||
}); | ||
}); | ||
}); | ||
|
89 changes: 0 additions & 89 deletions
89
src/components/AdvanceAnalyticsV2/tests/DownloadCSV.test.jsx
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -18,11 +18,11 @@ const mockAnalyticsSkillsData = { | |
const mockAnalyticsLeaderboardTableData = [ | ||
{ | ||
email: '[email protected]', | ||
dailySessions: 243, | ||
sessionCount: 243, | ||
learningTimeSeconds: 1111, | ||
learningTimeHours: 3.4, | ||
averageSessionLength: 1.6, | ||
courseCompletions: 4, | ||
courseCompletionCount: 4, | ||
}, | ||
]; | ||
|
||
|