Commit 6c60344f by Diana Huang Committed by Andy Armstrong

Rename the 'Staff Tools' and 'Staff Info' buttons.

parent e601a79d
......@@ -3,8 +3,8 @@
<div class="openassessment__staff-area wrapper--staff-area">
<div class="wrapper--staff-toolbar">
<button class="ui-staff__button button-staff-tools" data-panel="openassessment__staff-tools">{% trans "Staff Tools" %}</button>
<button class="ui-staff__button button-staff-info" data-panel="openassessment__staff-info">{% trans "Staff Info" %}</button>
<button class="ui-staff__button button-staff-tools" data-panel="openassessment__staff-tools">{% trans "Manage Individual Learners" %}</button>
<button class="ui-staff__button button-staff-info" data-panel="openassessment__staff-info">{% trans "View Assignment Statistics" %}</button>
</div>
<div class="openassessment__staff-tools wrapper--staff-tools wrapper--ui-staff is--hidden">
......
......@@ -205,22 +205,22 @@ describe('OpenAssessment.StaffAreaView', function() {
var view = createStaffArea(),
$buttons = $('.ui-staff__button', view.element);
expect($buttons.length).toBe(2);
expect($($buttons[0]).text().trim()).toEqual('Staff Tools');
expect($($buttons[1]).text().trim()).toEqual('Staff Info');
expect($($buttons[0]).text().trim()).toEqual('Manage Individual Learners');
expect($($buttons[1]).text().trim()).toEqual('View Assignment Statistics');
expect(getVisibleStaffPanels(view).length).toBe(0);
});
it('shows the "Staff Tools" panel when the button is clicked', function() {
it('shows the "Manage Individual Learners" panel when the button is clicked', function() {
var view = createStaffArea();
verifyStaffButtonBehavior(view, 'staff-tools');
});
it('shows the "Staff Info" panel when the button is clicked', function() {
it('shows the "View Assignment Statistics" panel when the button is clicked', function() {
var view = createStaffArea();
verifyStaffButtonBehavior(view, 'staff-info');
});
it('hides the "Staff Tools" panel when the button is clicked twice', function() {
it('hides the "Manage Individual Learners" panel when the button is clicked twice', function() {
var view = createStaffArea(),
$staffToolsButton = getStaffButton(view, 'staff-tools');
expect($staffToolsButton).not.toHaveClass('is--active');
......@@ -244,7 +244,7 @@ describe('OpenAssessment.StaffAreaView', function() {
loadFixtures('oa_base_course_staff.html');
});
it('hides the "Staff Tools" panel when the close button is clicked', function() {
it('hides the "Manage Individual Learners" panel when the close button is clicked', function() {
var view = createStaffArea(),
$staffToolsButton = $('.button-staff-tools', view.element),
$staffToolsPanel = $('.wrapper--staff-tools', view.element);
......@@ -400,7 +400,7 @@ describe('OpenAssessment.StaffAreaView', function() {
loadFixtures('oa_base_course_staff.html');
});
it('hides the "Staff Info" panel when the close button is clicked', function() {
it('hides the "View Assignment Statistics" panel when the close button is clicked', function() {
var view = createStaffArea(),
$staffInfoButton = $('.button-staff-info', view.element),
$staffInfoPanel = $('.wrapper--staff-info', view.element);
......
......@@ -313,10 +313,10 @@ class StaffAreaTest(OpenAssessmentTest):
Given I am viewing the staff area of an ORA problem
Then none of the buttons should be active
When I click the "Staff Tools" button
Then only the "Staff Tools" button should be active
When I click the "Staff Info" button
Then only the "Staff Info" button should be active
When I click the "Manage Individual Learners" button
Then only the "Manage Individual Learners" button should be active
When I click the "View Assignment Statistics" button
Then only the "View Assignment Statistics" button should be active
When I click the "Staff Info" button again
Then none of the buttons should be active
"""
......@@ -324,17 +324,17 @@ class StaffAreaTest(OpenAssessmentTest):
self.staff_area_page.visit()
self.assertEqual(self.staff_area_page.selected_button_names, [])
self.staff_area_page.click_staff_toolbar_button("staff-tools")
self.assertEqual(self.staff_area_page.selected_button_names, ["STAFF TOOLS"])
self.assertEqual(self.staff_area_page.selected_button_names, ["MANAGE INDIVIDUAL LEARNERS"])
self.staff_area_page.click_staff_toolbar_button("staff-info")
self.assertEqual(self.staff_area_page.selected_button_names, ["STAFF INFO"])
self.assertEqual(self.staff_area_page.selected_button_names, ["VIEW ASSIGNMENT STATISTICS"])
self.staff_area_page.click_staff_toolbar_button("staff-info")
self.assertEqual(self.staff_area_page.selected_button_names, [])
@retry()
@attr('acceptance')
@ddt.data(
("staff-tools", "STAFF TOOLS"),
("staff-info", "STAFF INFO"),
("staff-tools", "MANAGE INDIVIDUAL LEARNERS"),
("staff-info", "VIEW ASSIGNMENT STATISTICS"),
)
@ddt.unpack
def test_staff_area_panel(self, panel_name, button_label):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment