1
+ describe ( "Create a new" , ( ) => {
2
+ it ( "should be able to create" , ( ) => {
3
+ cy . visit ( "http://localhost:6001" )
4
+
5
+ cy . contains ( "New File" ) . click ( )
6
+ } )
7
+
8
+ it ( 'should be able to import cat images dataset' , ( ) => {
9
+ cy . contains ( "Samples" ) . click ( )
10
+ cy . contains ( "Import Toy Dataset" ) . click ( )
11
+ cy . contains ( "Cats" ) . siblings ( "td" ) . eq ( 2 ) . click ( )
12
+ } ) ;
13
+
14
+ it ( 'should be able to setup image segmentation' , ( ) => {
15
+ cy . contains ( "Setup" ) . click ( )
16
+ cy . contains ( "Image Segmentation" ) . click ( )
17
+ cy . contains ( "bounding-box" ) . click ( )
18
+ cy . get ( "li[data-value=polygon]" ) . click ( )
19
+ cy . get ( "li[data-value=point]" ) . click ( )
20
+ cy . get ( 'body' ) . click ( )
21
+ cy . get ( "input[value=valid]" ) . each ( ( $el , index , $list ) => {
22
+ cy . get ( $el ) . focus ( ) . clear ( ) . type ( "cat" )
23
+ } )
24
+ cy . get ( "input[value=invalid]" ) . each ( ( $el , index , $list ) => {
25
+ cy . get ( $el ) . focus ( ) . clear ( )
26
+ } )
27
+ } ) ;
28
+
29
+ it ( 'should be able to see samples' , ( ) => {
30
+ cy . contains ( "Samples" ) . click ( )
31
+ } )
32
+
33
+ it ( 'should be able start labeling images' , ( ) => {
34
+ cy . contains ( 'div' , '21' ) . click ( )
35
+ } )
36
+
37
+ it ( 'should be able to select add bounding box with "b" which is a shortcut key' , ( ) => {
38
+ cy . get ( 'body' ) . click ( ) . type ( 'b' )
39
+ } )
40
+
41
+ // TODO: change coordinates with cat coordinates
42
+ it ( 'should be able to draw a label box on canvas' , ( ) => {
43
+ cy . get ( 'canvas' )
44
+ . eq ( 0 )
45
+ . trigger ( 'mousedown' , { button : 0 , screenX : 0 , screenY : 210 } )
46
+ . trigger ( 'mousemove' , { button : 0 , screenX : 0 , screenY : 350 } )
47
+ . trigger ( 'mousemove' , { button : 0 , screenX : 100 , screenY : 350 } )
48
+ . trigger ( 'mouseup' , { force : true } )
49
+ cy . wait ( 50 )
50
+ } )
51
+
52
+ it ( 'should be able to label that box as a cat' , ( ) => {
53
+ cy . contains ( "#1" ) . click ( )
54
+ cy . contains ( "Classification" ) . click ( ) . type ( "cat{enter}" )
55
+ cy . wait ( 100 )
56
+ } )
57
+
58
+ it ( 'should be able to go to next image' , ( ) => {
59
+ cy . contains ( "Next" ) . click ( )
60
+ } )
61
+ } )
0 commit comments