fix: all auto fixable eslint issues (#31900)
* fix: eslint operator-linebreak issue * fix: eslint quotes issue * fix: react jsx indent and props issues * fix: eslint trailing spaces issues * fix: eslint line around directives issue * fix: eslint prefer template issue * fix: eslint semi rule * fix: eslint newline per chain rule * fix: eslint space infix ops rule * fix: eslint space-in-parens issue * fix: eslint space before function paren issue * fix: eslint space before blocks issue * fix: eslint arrow body style issue * fix: eslint dot-location issue * fix: eslint quotes issue * fix: eslint quote props issue * fix: eslint operator assignment issue * fix: eslint new line after import issue * fix: indent issues * fix: operator assignment issue
This commit is contained in:
committed by
GitHub
parent
118ea3a024
commit
228180b1ef
@@ -126,7 +126,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
};
|
||||
|
||||
selectContentGroup = function(groupId, userPartitionId) {
|
||||
var ids = groupId + ':' + userPartitionId;
|
||||
var ids = `${groupId}:${userPartitionId}`;
|
||||
cohortsView.$('.radio-yes').prop('checked', true).change();
|
||||
cohortsView.$('.input-cohort-group-association').val(ids).change();
|
||||
expect(cohortsView.$('.input-cohort-group-association').prop('disabled')).toBeFalsy();
|
||||
@@ -140,7 +140,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
|
||||
verifyMessage = function(expectedTitle, expectedMessageType, expectedAction, hasDetails) {
|
||||
expect(cohortsView.$('.message-title').text().trim()).toBe(expectedTitle);
|
||||
expect(cohortsView.$('div.message')).toHaveClass('message-' + expectedMessageType);
|
||||
expect(cohortsView.$('div.message')).toHaveClass(`message-${expectedMessageType}`);
|
||||
if (expectedAction) {
|
||||
expect(cohortsView.$('.message-actions .action-primary').text().trim()).toBe(expectedAction);
|
||||
} else {
|
||||
@@ -204,15 +204,15 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
};
|
||||
|
||||
unknownUserMessage = function(name) {
|
||||
return 'Unknown username: ' + name;
|
||||
return `Unknown username: ${name}`;
|
||||
};
|
||||
|
||||
invalidEmailMessage = function(name) {
|
||||
return 'Invalid email address: ' + name;
|
||||
return `Invalid email address: ${name}`;
|
||||
};
|
||||
|
||||
notAllowedUserMessage = function(email) {
|
||||
return 'Cohort assignment not allowed: ' + email;
|
||||
return `Cohort assignment not allowed: ${email}`;
|
||||
};
|
||||
|
||||
beforeEach(function() {
|
||||
@@ -262,8 +262,8 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
// But upload form should not be visible until toggle is clicked.
|
||||
expect(cohortsView.$(fileUploadFormCss).length).toBe(0);
|
||||
uploadCsvToggle = cohortsView.$('.toggle-cohort-management-secondary');
|
||||
expect(uploadCsvToggle.text()).
|
||||
toContain('Assign learners to cohorts by uploading a CSV file');
|
||||
expect(uploadCsvToggle.text())
|
||||
.toContain('Assign learners to cohorts by uploading a CSV file');
|
||||
uploadCsvToggle.click();
|
||||
// After toggle is clicked, it should be hidden.
|
||||
expect(uploadCsvToggle).toHaveClass('hidden');
|
||||
@@ -455,7 +455,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
{cohorts: createMockCohort(defaultCohortName, 1, 0, null, null, assignmentType)}
|
||||
);
|
||||
verifyMessage(
|
||||
'The ' + defaultCohortName + ' cohort has been created.'
|
||||
`The ${defaultCohortName} cohort has been created.`
|
||||
+ ' You can manually add students to this cohort below.',
|
||||
'confirmation'
|
||||
);
|
||||
@@ -704,7 +704,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
addStudents(sixUsers);
|
||||
AjaxHelpers.expectRequest(
|
||||
requests, 'POST', '/mock_service/cohorts/1/add',
|
||||
'users=' + sixUsers.replace(/@/g, '%40').replace(/, /g, '%2C+')
|
||||
`users=${sixUsers.replace(/@/g, '%40').replace(/, /g, '%2C+')}`
|
||||
);
|
||||
respondToAdd({
|
||||
unknown: [
|
||||
@@ -742,7 +742,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, CohortsView, CohortCollectio
|
||||
|
||||
addStudents(sixUsers);
|
||||
AjaxHelpers.expectRequest(requests, 'POST', '/mock_service/cohorts/1/add',
|
||||
'users=' + sixUsers.replace(/@/g, '%40').replace(/, /g, '%2C+')
|
||||
`users=${sixUsers.replace(/@/g, '%40').replace(/, /g, '%2C+')}`
|
||||
);
|
||||
respondToAdd({
|
||||
changed: [
|
||||
|
||||
@@ -92,7 +92,7 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, DiscussionsView, CourseDiscu
|
||||
|
||||
verifyMessage = function(expectedTitle, expectedMessageType, expectedAction, hasDetails) {
|
||||
expect(discussionsView.$('.message-title').text().trim()).toBe(expectedTitle);
|
||||
expect(discussionsView.$('div.message')).toHaveClass('message-' + expectedMessageType);
|
||||
expect(discussionsView.$('div.message')).toHaveClass(`message-${expectedMessageType}`);
|
||||
if (expectedAction) {
|
||||
expect(discussionsView.$('.message-actions .action-primary').text().trim()).toBe(expectedAction);
|
||||
} else {
|
||||
@@ -133,17 +133,17 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, DiscussionsView, CourseDiscu
|
||||
expect($inlineDiscussionsForm.length).toBe(1);
|
||||
expect($courseWideDiscussionsForm.length).toBe(1);
|
||||
|
||||
expect($courseWideDiscussionsForm.text()).
|
||||
toContain('Course-Wide Discussion Topics');
|
||||
expect($courseWideDiscussionsForm.text()).
|
||||
toContain('Select the course-wide discussion topics that you want to divide.');
|
||||
expect($courseWideDiscussionsForm.text())
|
||||
.toContain('Course-Wide Discussion Topics');
|
||||
expect($courseWideDiscussionsForm.text())
|
||||
.toContain('Select the course-wide discussion topics that you want to divide.');
|
||||
|
||||
// Should see the inline discussions form and its content
|
||||
expect($inlineDiscussionsForm.length).toBe(1);
|
||||
expect($inlineDiscussionsForm.text()).
|
||||
toContain('Content-Specific Discussion Topics');
|
||||
expect($inlineDiscussionsForm.text()).
|
||||
toContain('Specify whether content-specific discussion topics are divided.');
|
||||
expect($inlineDiscussionsForm.text())
|
||||
.toContain('Content-Specific Discussion Topics');
|
||||
expect($inlineDiscussionsForm.text())
|
||||
.toContain('Specify whether content-specific discussion topics are divided.');
|
||||
};
|
||||
|
||||
beforeEach(function() {
|
||||
@@ -171,8 +171,8 @@ function(Backbone, $, AjaxHelpers, TemplateHelpers, DiscussionsView, CourseDiscu
|
||||
var courseWideView, assertDividedTopics;
|
||||
|
||||
assertDividedTopics = function(view, type) {
|
||||
expect($('.check-discussion-subcategory-' + type).length).toBe(2);
|
||||
expect($('.check-discussion-subcategory-' + type + ':checked').length).toBe(1);
|
||||
expect($(`.check-discussion-subcategory-${type}`).length).toBe(2);
|
||||
expect($(`.check-discussion-subcategory-${type}:checked`).length).toBe(1);
|
||||
};
|
||||
|
||||
it('renders the view properly', function() {
|
||||
|
||||
Reference in New Issue
Block a user