@@ -60,11 +60,11 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
60
60
const scaleFrom400 = 12.5 ;
61
61
const width = 400 * scaleFrom400 ; // =5000
62
62
const height = 400 * scaleFrom400 ;
63
- const delta = 3 ; // ???
63
+ const delta = 3 ; // ??? probably requires bigger delta or something else
64
64
const maxTextWidth = undefined ;
65
65
const textHeightPx = 77 * scaleFrom400 ;
66
66
const posX = 10 * scaleFrom400 ;
67
- const posY = 10 * scaleFrom400 ; // TODO: determine scale of picture
67
+ const posY = 10 * scaleFrom400 ;
68
68
const archiveName = `${ imageFileName } .zip` ;
69
69
const archivePath = `cypress/fixtures/${ archiveName } ` ;
70
70
const imagesFolder = `cypress/fixtures/${ imageFileName } ` ;
@@ -81,17 +81,12 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
81
81
// cy.task('log', `x:${posX + i * 5}, y:${posY + i * 5}`);
82
82
// cy.imageGenerator(imagesFolder, imageFileName + i, width, height, color, posX + i * 5,
83
83
// posY + i * 5, labelName, 1, extension);
84
- // TODO: compare times, makeCustomImage might take to long (from 00:58 to 1:30)
85
84
cy . makeCustomImage ( imagesFolder , `${ imageFileName } _${ i } ` ,
86
85
width , height ,
87
86
fontSize , color , textColor ,
88
87
posX + i * 5 * scaleFrom400 , posY + i * 5 * scaleFrom400 ,
89
88
`${ labelName } . Num ${ i } ` , extension ,
90
89
maxTextWidth ) ;
91
- /* TODO:
92
- 1. recreate scale and position of the text as it was previously with jimp but now with canvas
93
- - side quest: draw from ofscreencanvas
94
- */
95
90
}
96
91
cy . createZipArchive ( directoryToArchive , archivePath ) ;
97
92
cy . createAnnotationTask ( taskName , labelName , attrName , textDefaultValue , archiveName ) ;
@@ -116,7 +111,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
116
111
cy . opencvCreateShape ( createOpencvShapeSecondLabel ) ;
117
112
} ) ;
118
113
119
- it . skip ( 'Change the number of points when the shape is drawn. Cancel drawing.' , ( ) => {
114
+ it ( 'Change the number of points when the shape is drawn. Cancel drawing.' , ( ) => {
120
115
cy . interactOpenCVControlButton ( ) ;
121
116
cy . get ( '.cvat-opencv-drawing-tool' ) . click ( ) ;
122
117
pointsMap . forEach ( ( element ) => {
@@ -132,7 +127,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
132
127
. find ( '[role="slider"]' )
133
128
. type ( generateString ( 4 , 'rightarrow' ) ) ;
134
129
cy . get ( '.cvat_canvas_interact_intermediate_shape' ) . then ( ( _intermediateShape ) => {
135
- // Get count of points againe
130
+ // Get count of points again
136
131
const intermediateShapeNumberPointsAfterChange = _intermediateShape . attr ( 'points' ) . split ( ' ' ) . length ;
137
132
// expected 7 to be below 10
138
133
expect ( intermediateShapeNumberPointsBeforeChange ) . to . be . lt (
@@ -166,7 +161,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
166
161
cy . get ( '.cvat_canvas_shape' ) . should ( 'have.length' , 2 ) ;
167
162
} ) ;
168
163
169
- it . skip ( 'Check "Intelligent scissors blocking feature". Cancel drawing.' , ( ) => {
164
+ it ( 'Check "Intelligent scissors blocking feature". Cancel drawing.' , ( ) => {
170
165
cy . interactOpenCVControlButton ( ) ;
171
166
cy . get ( '.cvat-opencv-drawing-tool' ) . click ( ) ;
172
167
cy . get ( '.cvat-annotation-header-block-tool-button' ) . click ( ) ;
@@ -194,7 +189,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
194
189
cy . get ( 'body' ) . type ( '{Esc}' ) ;
195
190
} ) ;
196
191
197
- it . skip ( 'Check "Histogram Equalization" feature.' , ( ) => {
192
+ it ( 'Check "Histogram Equalization" feature.' , ( ) => {
198
193
cy . checkPopoverHidden ( 'opencv-control' ) ;
199
194
cy . interactOpenCVControlButton ( ) ;
200
195
cy . get ( '.cvat-opencv-control-popover' ) . contains ( '[role="tab"]' , 'Image' ) . click ( ) ;
@@ -246,7 +241,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
246
241
// });
247
242
// cy.get('#cvat_canvas_shape_4').invoke('attr', 'y').then((yVal) => {
248
243
// expect(parseFloat(yVal)).to.be.closeTo(y + i * 5 * scaleFrom400, delta);
249
- // }); // TODO: refactor to $shape
244
+ // });
250
245
cy . get ( '#cvat_canvas_shape_4' ) . then ( ( $shape ) => {
251
246
cy . task ( 'log' , `x:${ + $shape . attr ( 'x' ) } , y:${ + $shape . attr ( 'x' ) } ` ) ;
252
247
expect ( + $shape . attr ( 'x' ) ) . to . be . closeTo ( x + i * 5 * scaleFrom400 , delta ) ;
@@ -260,34 +255,5 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', ()
260
255
}
261
256
} ) ;
262
257
} ) ;
263
- // after(() => assert(0));
264
- } ) ;
265
- function loadOpenCV ( ) {
266
- cy . interactOpenCVControlButton ( ) ;
267
- cy . get ( '.cvat-opencv-control-popover' ) . within ( ( ) => {
268
- cy . contains ( 'OpenCV is loading' ) . should ( 'not.exist' ) ;
269
- } ) ;
270
- cy . get ( 'body' ) . click ( ) ;
271
- }
272
-
273
- describe . skip ( 'Testing issue 8894' , ( ) => {
274
- // TODO: activate it after the fix
275
- it ( 'Create a shape with "TrackerMIL" on a big picture. Look out for a tracking error' , ( ) => {
276
- const shapeNumber = 1 ;
277
- loadOpenCV ( ) ;
278
- // We will start testing tracking from 2nd frame because it's a bit unstable on inintialization
279
- cy . goToNextFrame ( 1 ) ;
280
- cy . createOpenCVTrack ( createRectangleTrack2Points ) ;
281
- cy . get ( '.cvat-tracking-notice' ) . should ( 'not.exist' ) ;
282
- cy . get ( `#cvat_canvas_shape_${ shapeNumber } ` )
283
- . then ( ( ) => {
284
- cy . get ( '.cvat-tracking-notice' ) . should ( 'not.exist' ) ;
285
- cy . get ( `#cvat-objects-sidebar-state-item-${ shapeNumber } ` )
286
- . should ( 'contain' , 'RECTANGLE TRACK' ) ;
287
- // We don't actually check tracking functionality, we just doing load testing
288
- } ) ;
289
- cy . goToNextFrame ( 2 ) ;
290
- cy . get ( '.ant-notification-notice-message' ) . contains ( 'Tracking error' ) . should ( 'not.exist' ) ;
291
- } ) ;
292
258
} ) ;
293
259
} ) ;
0 commit comments