Skip to content

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Nov 6, 2024
1 parent d4c81b1 commit 8b1bbc5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 69 deletions.
6 changes: 3 additions & 3 deletions src/course-checklist/CourseChecklist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const CourseChecklist = ({
bestPracticeData,
} = useSelector(state => state.courseChecklist);

const { bestPracticeChecklistStatus, launchChecklistStatus } = loadingStatus;
const { bestPracticeChecklistLoadingStatus, launchChecklistLoadingStatus, launchChecklistStatus } = loadingStatus;

const isCourseLaunchChecklistLoading = bestPracticeChecklistStatus === RequestStatus.IN_PROGRESS;
const isCourseBestPracticeChecklistLoading = launchChecklistStatus === RequestStatus.IN_PROGRESS;
const isCourseLaunchChecklistLoading = bestPracticeChecklistLoadingStatus === RequestStatus.IN_PROGRESS;
const isCourseBestPracticeChecklistLoading = launchChecklistLoadingStatus === RequestStatus.IN_PROGRESS;
const isLoadingDenied = launchChecklistStatus === RequestStatus.DENIED;

if (isLoadingDenied) {
Expand Down
1 change: 0 additions & 1 deletion src/course-outline/data/thunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export function fetchCourseOutlineIndexQuery(courseId) {
if (error.response && error.response.status === 403) {
dispatch(updateOutlineIndexLoadingStatus({

Check warning on line 103 in src/course-outline/data/thunk.js

View check run for this annotation

Codecov / codecov/patch

src/course-outline/data/thunk.js#L103

Added line #L103 was not covered by tests
status: RequestStatus.DENIED,
errors: getErrorDetails(error, false),
}));
} else {
dispatch(updateOutlineIndexLoadingStatus({
Expand Down
4 changes: 2 additions & 2 deletions src/grading-settings/GradingSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
useGradingSettings,
useGradingSettingUpdater,
} from 'CourseAuthoring/grading-settings/data/apiHooks';
import { RequestStatus } from 'CourseAuthoring/data/constants';
import PropTypes from 'prop-types';
import React, { useEffect, useState } from 'react';
import { Helmet } from 'react-helmet';
Expand Down Expand Up @@ -47,8 +48,7 @@ const GradingSettings = ({ courseId }) => {

const courseAssignmentLists = gradingSettings?.courseAssignmentLists;
const courseGradingDetails = gradingSettings?.courseDetails;

const isLoadingDenied = loadingStatus === RequestStatus.DENIED;
const isLoadingDenied = isCourseSettingsLoading === RequestStatus.DENIED;
const [showSuccessAlert, setShowSuccessAlert] = useState(false);
const isLoading = isCourseSettingsLoading || isGradingSettingsLoading;
const [isQueryPending, setIsQueryPending] = useState(false);
Expand Down
63 changes: 0 additions & 63 deletions src/grading-settings/data/thunks.js

This file was deleted.

0 comments on commit 8b1bbc5

Please sign in to comment.