@@ -1767,7 +1767,7 @@ describe('<CourseOutline />', () => {
1767
1767
. reply ( 200 , { dummy : 'value' } ) ;
1768
1768
const expectedSection = moveSubsection ( [
1769
1769
...courseOutlineIndexMock . courseStructure . childInfo . children ,
1770
- ] , 0 , 0 , 1 ) [ 0 ] [ 0 ] ;
1770
+ ] as unknown as XBlock [ ] , 0 , 0 , 1 ) [ 0 ] [ 0 ] ;
1771
1771
axiosMock
1772
1772
. onGet ( getXBlockApiUrl ( section . id ) )
1773
1773
. reply ( 200 , expectedSection ) ;
@@ -1805,7 +1805,7 @@ describe('<CourseOutline />', () => {
1805
1805
. reply ( 200 , { dummy : 'value' } ) ;
1806
1806
const expectedSections = moveSubsectionOver ( [
1807
1807
...courseOutlineIndexMock . courseStructure . childInfo . children ,
1808
- ] , 1 , 0 , 0 , firstSection . childInfo . children . length + 1 ) [ 0 ] ;
1808
+ ] as unknown as XBlock [ ] , 1 , 0 , 0 , firstSection . childInfo . children . length + 1 ) [ 0 ] ;
1809
1809
axiosMock
1810
1810
. onGet ( getXBlockApiUrl ( firstSection . id ) )
1811
1811
. reply ( 200 , expectedSections [ 0 ] ) ;
@@ -1842,7 +1842,7 @@ describe('<CourseOutline />', () => {
1842
1842
. reply ( 200 , { dummy : 'value' } ) ;
1843
1843
const expectedSections = moveSubsectionOver ( [
1844
1844
...courseOutlineIndexMock . courseStructure . childInfo . children ,
1845
- ] , 0 , lastSubsectionIdx , 1 , 0 ) [ 0 ] ;
1845
+ ] as unknown as XBlock [ ] , 0 , lastSubsectionIdx , 1 , 0 ) [ 0 ] ;
1846
1846
axiosMock
1847
1847
. onGet ( getXBlockApiUrl ( section . id ) )
1848
1848
. reply ( 200 , expectedSections [ 0 ] ) ;
@@ -1929,7 +1929,9 @@ describe('<CourseOutline />', () => {
1929
1929
axiosMock
1930
1930
. onPut ( getCourseItemApiUrl ( store . getState ( ) . courseOutline . sectionsList [ 1 ] . childInfo . children [ 1 ] . id ) )
1931
1931
. reply ( 200 , { dummy : 'value' } ) ;
1932
- const expectedSection = moveUnit ( [ ...courseOutlineIndexMock . courseStructure . childInfo . children ] , 1 , 1 , 0 , 1 ) [ 0 ] [ 1 ] ;
1932
+ const expectedSection = moveUnit ( [
1933
+ ...courseOutlineIndexMock . courseStructure . childInfo . children ,
1934
+ ] as unknown as XBlock [ ] , 1 , 1 , 0 , 1 ) [ 0 ] [ 1 ] ;
1933
1935
axiosMock
1934
1936
. onGet ( getXBlockApiUrl ( section . id ) )
1935
1937
. reply ( 200 , expectedSection ) ;
@@ -1970,7 +1972,7 @@ describe('<CourseOutline />', () => {
1970
1972
. reply ( 200 , { dummy : 'value' } ) ;
1971
1973
const expectedSections = moveUnitOver ( [
1972
1974
...courseOutlineIndexMock . courseStructure . childInfo . children ,
1973
- ] , 1 , 1 , 0 , 1 , 0 , firstSubsection . childInfo . children . length ) [ 0 ] ;
1975
+ ] as unknown as XBlock [ ] , 1 , 1 , 0 , 1 , 0 , firstSubsection . childInfo . children . length ) [ 0 ] ;
1974
1976
axiosMock
1975
1977
. onGet ( getXBlockApiUrl ( section . id ) )
1976
1978
. reply ( 200 , expectedSections [ 1 ] ) ;
@@ -2004,7 +2006,7 @@ describe('<CourseOutline />', () => {
2004
2006
. onPut ( getCourseItemApiUrl ( firstSectionLastSubsection . id ) )
2005
2007
. reply ( 200 , { dummy : 'value' } ) ;
2006
2008
const expectedSections = moveUnitOver (
2007
- [ ...courseOutlineIndexMock . courseStructure . childInfo . children ] ,
2009
+ [ ...courseOutlineIndexMock . courseStructure . childInfo . children ] as unknown as XBlock [ ] ,
2008
2010
1 ,
2009
2011
0 ,
2010
2012
0 ,
@@ -2050,7 +2052,7 @@ describe('<CourseOutline />', () => {
2050
2052
. reply ( 200 , { dummy : 'value' } ) ;
2051
2053
const expectedSections = moveUnitOver ( [
2052
2054
...courseOutlineIndexMock . courseStructure . childInfo . children ,
2053
- ] , 1 , 0 , lastUnitIdx , 1 , 1 , 0 ) [ 0 ] ;
2055
+ ] as unknown as XBlock [ ] , 1 , 0 , lastUnitIdx , 1 , 1 , 0 ) [ 0 ] ;
2054
2056
axiosMock
2055
2057
. onGet ( getXBlockApiUrl ( section . id ) )
2056
2058
. reply ( 200 , expectedSections [ 1 ] ) ;
@@ -2086,7 +2088,7 @@ describe('<CourseOutline />', () => {
2086
2088
. onPut ( getCourseItemApiUrl ( thirdSectionFirstSubsection . id ) )
2087
2089
. reply ( 200 , { dummy : 'value' } ) ;
2088
2090
const expectedSections = moveUnitOver (
2089
- [ ...courseOutlineIndexMock . courseStructure . childInfo . children ] ,
2091
+ [ ...courseOutlineIndexMock . courseStructure . childInfo . children ] as unknown as XBlock [ ] ,
2090
2092
1 ,
2091
2093
lastSubIndex ,
2092
2094
lastUnitIdx ,
@@ -2173,7 +2175,7 @@ describe('<CourseOutline />', () => {
2173
2175
. reply ( 200 , { dummy : 'value' } ) ;
2174
2176
const expectedSection = moveSubsection ( [
2175
2177
...courseOutlineIndexMock . courseStructure . childInfo . children ,
2176
- ] , 0 , 1 , 0 ) [ 0 ] [ 0 ] ;
2178
+ ] as unknown as XBlock [ ] , 0 , 1 , 0 ) [ 0 ] [ 0 ] ;
2177
2179
axiosMock
2178
2180
. onGet ( getXBlockApiUrl ( section . id ) )
2179
2181
. reply ( 200 , expectedSection ) ;
@@ -2236,7 +2238,7 @@ describe('<CourseOutline />', () => {
2236
2238
axiosMock
2237
2239
. onPut ( getCourseItemApiUrl ( subsection . id ) )
2238
2240
. reply ( 200 , { dummy : 'value' } ) ;
2239
- const expectedSection = moveUnit ( [ ...sections ] , 2 , 0 , 1 , 0 ) [ 0 ] [ 2 ] ;
2241
+ const expectedSection = moveUnit ( [ ...sections ] as unknown as XBlock [ ] , 2 , 0 , 1 , 0 ) [ 0 ] [ 2 ] ;
2240
2242
axiosMock
2241
2243
. onGet ( getXBlockApiUrl ( section . id ) )
2242
2244
. reply ( 200 , expectedSection ) ;
@@ -2270,7 +2272,7 @@ describe('<CourseOutline />', () => {
2270
2272
axiosMock
2271
2273
. onPut ( getCourseItemApiUrl ( subsection . id ) )
2272
2274
. reply ( 500 ) ;
2273
- const expectedSection = moveUnit ( [ ...sections ] , 2 , 0 , 1 , 0 ) [ 0 ] [ 2 ] ;
2275
+ const expectedSection = moveUnit ( [ ...sections ] as unknown as XBlock [ ] , 2 , 0 , 1 , 0 ) [ 0 ] [ 2 ] ;
2274
2276
axiosMock
2275
2277
. onGet ( getXBlockApiUrl ( section . id ) )
2276
2278
. reply ( 200 , expectedSection ) ;
0 commit comments