@@ -4,8 +4,6 @@ import { initializeMockApp } from '@edx/frontend-platform';
44import { render , waitFor , fireEvent } from '@testing-library/react' ;
55
66import GradingScale from './GradingScale' ;
7- import GradingScaleHandle from './components/GradingScaleHandle' ;
8- import GradingScaleSegment from './components/GradingScaleSegment.tsx' ;
97
108const gradeCutoffs = { A : 0.9 , B : 0.8 , C : 0.7 } ;
119
@@ -124,48 +122,6 @@ describe('<GradingScale />', () => {
124122 } ) ;
125123 } ) ;
126124
127- it ( 'renders GradingScaleHandle with default isEditable=true when prop is omitted' , ( ) => {
128- const gradingSegments = [
129- { current : 90 , previous : 0 } ,
130- { current : 100 , previous : 90 } ,
131- ] ;
132- const { container } = render (
133- < GradingScaleHandle
134- idx = { 0 }
135- value = { 90 }
136- gradingSegments = { gradingSegments }
137- getHandleProps = { ( ) => ( { } ) }
138- /> ,
139- ) ;
140- const btn = container . querySelector ( '.grading-scale-segment-btn-resize' ) ;
141- expect ( btn ) . toBeInTheDocument ( ) ;
142- expect ( btn ) . not . toBeDisabled ( ) ;
143- } ) ;
144-
145- it ( 'renders GradingScaleSegment with default isEditable=true when prop is omitted' , async ( ) => {
146- const gradingSegments = [
147- { current : 100 , previous : 0 } ,
148- { current : 50 , previous : 0 } ,
149- { current : 30 , previous : 0 } ,
150- ] ;
151- const { getAllByTestId } = render (
152- < IntlProvider locale = "en" messages = { { } } >
153- < GradingScaleSegment
154- idx = { 1 }
155- value = { 50 }
156- getSegmentProps = { ( ) => ( { } ) }
157- handleLetterChange = { jest . fn ( ) }
158- letters = { [ 'A' , 'B' , 'C' ] }
159- gradingSegments = { gradingSegments }
160- removeGradingSegment = { jest . fn ( ) }
161- />
162- </ IntlProvider > ,
163- ) ;
164- await waitFor ( ( ) => {
165- getAllByTestId ( 'grading-scale-segment-input' ) . forEach ( ( input ) => expect ( input ) . not . toBeDisabled ( ) ) ;
166- } ) ;
167- } ) ;
168-
169125 it ( 'should disable inputs and buttons when isEditable is false' , async ( ) => {
170126 const { getAllByTestId, queryAllByTestId } = render (
171127 < IntlProvider locale = "en" messages = { { } } >
0 commit comments