Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { App } from '@openedx/frontend-base';
import { appId } from './constants';
import routes from './routes';
import messages from './i18n';
import { appId } from '@src/constants';
import routes from '@src/routes';
import messages from '@src/i18n';

const app: App = {
appId,
Expand Down
2 changes: 1 addition & 1 deletion src/cohorts/CohortsPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import CohortsPage from './CohortsPage';
import { useCohorts, useCohortStatus, useToggleCohorts } from './data/apiHook';
import { renderWithIntl } from '../testUtils';
import { renderWithIntl } from '@src/testUtils';
import messages from './messages';
import { CohortProvider } from './components/CohortContext';

Expand Down
2 changes: 1 addition & 1 deletion src/cohorts/components/DisableCohortsModal.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import DisableCohortsModal from './DisableCohortsModal';
import { renderWithIntl } from '../../testUtils';
import { renderWithIntl } from '@src/testUtils';
import messages from '../messages';

describe('DisableCohortsModal', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/cohorts/components/DisabledCohortsView.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { screen } from '@testing-library/react';
import { renderWithIntl } from '../../testUtils';
import { renderWithIntl } from '@src/testUtils';
import messages from '../messages';
import DisabledCohortsView from './DisabledCohortsView';
import userEvent from '@testing-library/user-event';
Expand Down
2 changes: 1 addition & 1 deletion src/cohorts/data/api.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getCohortStatus, getCohorts, toggleCohorts } from './api';
import { camelCaseObject, getAppConfig, getAuthenticatedHttpClient } from '@openedx/frontend-base';
import { appId } from '../../constants';
import { appId } from '@src/constants';

jest.mock('@openedx/frontend-base');

Expand Down
2 changes: 1 addition & 1 deletion src/cohorts/data/queryKeys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { appId } from '../../constants';
import { appId } from '@src/constants';

export const cohortsQueryKeys = {
all: [appId, 'cohorts'] as const,
Expand Down
2 changes: 1 addition & 1 deletion src/courseInfo/CourseInfoPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import CourseInfoPage from './CourseInfoPage';
import { renderWithIntl } from '../testUtils';
import { renderWithIntl } from '@src/testUtils';

jest.mock('./components/generalCourseInfo', () => ({
GeneralCourseInfo: () => <div>General Course Info Component</div>,
Expand Down
2 changes: 1 addition & 1 deletion src/courseInfo/CourseInfoPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Container } from '@openedx/paragon';
import { GeneralCourseInfo } from './components/generalCourseInfo';
import { GeneralCourseInfo } from '@src/courseInfo/components/generalCourseInfo';

const CourseInfoPage = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { screen } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom';
import { GeneralCourseInfo } from './GeneralCourseInfo';
import { useCourseInfo } from '../../../data/apiHook';
import { useCourseInfo } from '@src/data/apiHook';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { createQueryMock, renderWithIntl } from '../../../testUtils';
import { createQueryMock, renderWithIntl } from '@src/testUtils';

jest.mock('../../../data/apiHook');
jest.mock('@src/data/apiHook');
jest.mock('react-router', () => ({
useParams: () => ({ courseId: 'test-course-id' }),
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Card, Skeleton } from '@openedx/paragon';
import { StatusBadge } from './StatusBadge';
import { useCourseInfo } from '../../../data/apiHook';
import { useCourseInfo } from '@src/data/apiHook';
import { useParams } from 'react-router';
import { FormattedDate, useIntl } from '@openedx/frontend-base';
import { useCallback } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/data/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { camelCaseObject, getAppConfig, getAuthenticatedHttpClient } from '@openedx/frontend-base';
import { appId } from '../constants';
import { appId } from '@src/constants';

export const getApiBaseUrl = () => getAppConfig(appId).LMS_BASE_URL;

Expand Down
2 changes: 1 addition & 1 deletion src/data/queryKeys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { appId } from '../constants';
import { appId } from '@src/constants';

export const courseInfoQueryKeys = {
all: [appId, 'courseInfo'] as const,
Expand Down
6 changes: 3 additions & 3 deletions src/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CohortsPage from './cohorts/CohortsPage';
import CourseInfoPage from './courseInfo/CourseInfoPage';
import Main from './Main';
import CohortsPage from '@src/cohorts/CohortsPage';
import CourseInfoPage from '@src/courseInfo/CourseInfoPage';
import Main from '@src/Main';

const routes = [
{
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"compilerOptions": {
"rootDir": ".",
"outDir": "dist",
"paths": {
"@src/*": ["./src/*"]
}
},
"include": [
"src/**/*",
Expand Down
Loading