-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
WIP Refactored schedule tree #11647
Closed
Closed
WIP Refactored schedule tree #11647
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -10,16 +10,16 @@ | |
from common.test.acceptance.pages.lms.ccx_dashboard_page import CoachDashboardPage | ||
|
||
|
||
@attr(shard=7) | ||
class CreateCCXCoachTest(EventsTestMixin, UniqueCourseTest): | ||
@attr('shard_7') | ||
class BaseCCXCoachTest(EventsTestMixin, UniqueCourseTest): | ||
""" | ||
Test ccx end to end process. | ||
Base methods for CCX dashboard testing. | ||
""" | ||
USERNAME = "coach_tester" | ||
EMAIL = "[email protected]" | ||
|
||
def setUp(self): | ||
super(CreateCCXCoachTest, self).setUp() | ||
super(BaseCCXCoachTest, self).setUp() | ||
self.course_info.update({"settings": {"enable_ccx": "true"}}) | ||
self.course_fixture = CourseFixture(**self.course_info) | ||
self.course_fixture.add_advanced_settings({ | ||
|
@@ -45,14 +45,46 @@ def visit_coach_dashboard(self): | |
coach_dashboard_page.visit() | ||
return coach_dashboard_page | ||
|
||
def test_create_ccx(self): | ||
def create_ccx(self): | ||
""" | ||
Assert that ccx created. | ||
create ccx | ||
""" | ||
ccx_name = "Test ccx" | ||
|
||
self.coach_dashboard_page.fill_ccx_name_text_box(ccx_name) | ||
self.coach_dashboard_page.wait_for_page() | ||
|
||
|
||
@attr('shard_7') | ||
class CreateCCXCoachTest(BaseCCXCoachTest): | ||
""" | ||
Test ccx end to end process. | ||
""" | ||
def test_create_ccx(self): | ||
""" | ||
Assert that ccx created. | ||
""" | ||
self.create_ccx() | ||
# Assert that new ccx is created and we are on ccx dashboard/enrollment tab. | ||
self.assertTrue(self.coach_dashboard_page.is_browser_on_enrollment_page()) | ||
|
||
|
||
@attr('a11y') | ||
class ScheduleTabA11yTest(BaseCCXCoachTest): | ||
""" | ||
Class to test schedule tab accessibility. | ||
""" | ||
|
||
def test_schedule_tab_a11y(self): | ||
""" | ||
Test schedule tab accessibility. | ||
""" | ||
self.create_ccx() | ||
schedule_section = self.coach_dashboard_page.select_schedule() | ||
|
||
schedule_section.a11y_audit.config.set_rules({ | ||
'ignore': [ | ||
'link-href', 'skip-link' # TODO: AC-233 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these ignores really necessary because of OAuth settings (which is what https://openedx.atlassian.net/browse/AC-233 refers to)? I only include ignores if they are necessary, and if they are related to something different from AC-233, create a new accessibility ticket. |
||
], | ||
}) | ||
schedule_section.a11y_audit.check_for_accessibility_errors() |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(function(define) { | ||
'use strict'; | ||
define([ | ||
'js/ccx/view/ccx_schedule', | ||
'js/ccx/collection/schedule_collection' | ||
], function(CcxScheduleView, ScheduleCollection) { | ||
return function($container, scheduleJson, saveUrl) { | ||
var scheduleCollection = new ScheduleCollection(scheduleJson); | ||
var view = new CcxScheduleView({ | ||
el: $container, | ||
saveCCXScheduleUrl: saveUrl, | ||
collection: scheduleCollection | ||
}); | ||
return view; | ||
}; | ||
}); | ||
}).call(this, define || RequireJS.define); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the schedule populated with some units?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sorry, i think.. need some processing to add units, let me add.