File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3224,6 +3224,7 @@ describe('<CourseUnit />', () => {
32243224 expect ( openResponseCollapsible ) . toBeInTheDocument ( ) ;
32253225 const problemCollapsible = screen . getByTestId ( 'problem-collapsible' ) ;
32263226 expect ( problemCollapsible ) . toBeInTheDocument ( ) ;
3227+ expect ( screen . getByRole ( 'button' , { name : 'Problem Bank' } ) ) . toBeInTheDocument ( ) ;
32273228
32283229 // Check text templates
32293230 await user . click ( within ( textCollapsible ) . getByText ( / t e x t / i) ) ;
@@ -3277,6 +3278,10 @@ describe('<CourseUnit />', () => {
32773278 name : 'Drag Drop' ,
32783279 blockType : 'drag-and-drop-v2' ,
32793280 } ,
3281+ {
3282+ name : 'Problem Bank' ,
3283+ blockType : 'itembank' ,
3284+ } ,
32803285 ] . forEach ( ( { name, blockType } ) => {
32813286 it ( `calls appropriate handlers on new button click for ${ name } block` , async ( ) => {
32823287 const blockButton = await screen . findByRole ( 'button' , { name } ) ;
Original file line number Diff line number Diff line change @@ -148,6 +148,9 @@ const AddNewContent = () => {
148148 case COMPONENT_TYPES . openassessment :
149149 void handleCreateXBlock ( { boilerplate : moduleName , category : type , parentLocator : blockId } ) ;
150150 break ;
151+ case COMPONENT_TYPES . itembank :
152+ void handleCreateXBlock ( { type, category : 'itembank' , parentLocator : blockId } ) ;
153+ break ;
151154 case COMPONENT_TYPES . html :
152155 void handleCreateXBlock ( {
153156 type,
@@ -181,6 +184,10 @@ const AddNewContent = () => {
181184 blockType : 'problem' ,
182185 name : intl . formatMessage ( messages . sidebarAddProblemButton ) ,
183186 } ,
187+ {
188+ blockType : 'itembank' ,
189+ name : intl . formatMessage ( messages . sidebarAddProblemBankButton ) ,
190+ } ,
184191 {
185192 blockType : 'drag-and-drop-v2' ,
186193 name : intl . formatMessage ( messages . sidebarAddDragDropButton ) ,
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ const messages = defineMessages({
4646 defaultMessage : 'Open Response' ,
4747 description : 'Label for the button to create a new Open Response block' ,
4848 } ,
49+ sidebarAddProblemBankButton : {
50+ id : 'course-authoring.unit-page.sidebar.add.new.problem-bank' ,
51+ defaultMessage : 'Problem Bank' ,
52+ description : 'Label for the button to create a new Problem Bank block' ,
53+ } ,
4954 sidebarAddDragDropButton : {
5055 id : 'course-authoring.unit-page.sidebar.add.new.drag-and-drop' ,
5156 defaultMessage : 'Drag Drop' ,
Original file line number Diff line number Diff line change 277277
278278.icon-with-border-problem ,
279279.icon-with-border-drag-and-drop-v2 ,
280+ .icon-with-border-itembank ,
280281.icon-with-border-openassessment {
281282 border : 1px solid var (--content-library-component-primary-color );
282283
You can’t perform that action at this time.
0 commit comments