-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(KUI-1146): Add supplementaryInfo och courseDisposition (#241)
* Adds editing of “course disposition” in the form/page for editing course introduction (aka “selling text”) and image * Adds a new page/form for “supplementary info” * Adds a new start page for choosing which part to edit (course intro/disposition/image or supplementary info) * Removes default Kopps text for selling text * Adds new design for text input with collapsable edit section (<EditorSection />) * Includes multiple refactorings including more shared components (<ControlButtons /> <ProgressBar/> etc) and a new take on building and using web context state among other things
- Loading branch information
karlandindrakryggen
authored
Mar 6, 2024
1 parent
4109d91
commit dcb65f4
Showing
78 changed files
with
3,075 additions
and
1,980 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const mockGetAsync = jest.fn().mockResolvedValue({ | ||
response: { | ||
statusCode: 200, | ||
ok: true, | ||
}, | ||
}) | ||
|
||
const mockPatchAsync = jest.fn().mockResolvedValue({ | ||
response: { | ||
statusCode: 201, | ||
ok: true, | ||
}, | ||
}) | ||
|
||
const mockPaths = { | ||
getCourseInfoByCourseCode: { uri: '/get123' }, | ||
patchCourseInfoByCourseCode: { uri: '/patch123' }, | ||
} | ||
|
||
module.exports = { | ||
mockGetAsync, | ||
mockPatchAsync, | ||
mockPaths, | ||
Connections: { | ||
setup: () => ({ | ||
kursinfoApi: { | ||
paths: mockPaths, | ||
client: { | ||
getAsync: mockGetAsync, | ||
patchAsync: mockPatchAsync, | ||
resolve: jest.fn((uri, { courseCode }) => `${uri}/${courseCode}`), | ||
}, | ||
}, | ||
}), | ||
}, | ||
} |
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,6 @@ | ||
module.exports = { | ||
init: jest.fn(), | ||
debug: jest.fn(), | ||
error: jest.fn(), | ||
info: jest.fn(), | ||
} |
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
Oops, something went wrong.