@@ -9,77 +9,60 @@ describe('Test all Aas List features (Resolution 1920 x 1080)', function () {
99 cy . setResolution ( resolutions [ 0 ] ) ;
1010 cy . visit ( '/list' ) ;
1111 } ) ;
12- it ( 'should redirect to aas list when pressing the aas list button on the homepage' , function ( ) {
13- cy . visit ( '/' ) ;
14- cy . getByTestId ( 'aasList-Button-Home' ) . click ( ) ;
15- cy . url ( ) . should ( 'contain' , '/list' ) ;
16- } ) ;
17- it ( 'should redirect to the viewer page when clicking on an aas list entry' , function ( ) {
18- cy . getByTestId ( 'list-to-detailview-button' ) . first ( ) . click ( ) ;
19- cy . wait ( 100 ) ;
20- cy . url ( ) . should ( 'contain' , '/viewer/' ) ;
21- } ) ;
22- it ( 'should show the selected aas in the comparison list and enable the button' , function ( ) {
23- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
24- cy . get ( '[data-testid="selected-https://mnestix.io/aas/listTest1' ) . should ( 'exist' ) ;
25- cy . getByTestId ( 'compare-button' ) . should ( 'not.be.disabled' ) ;
26- } ) ;
27- it ( 'should remove the aas from the comparison list when deselected and disable the button' , function ( ) {
28- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
29- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
30- cy . get ( '[data-testid="selected-https://mnestix.io/aas/listTest1' ) . should ( 'not.exist' ) ;
31- cy . getByTestId ( 'compare-button' ) . should ( 'be.disabled' ) ;
32- } ) ;
33- it ( 'should disable checkboxes and show a warning when the user tries to select more than 3 aas' , function ( ) {
34- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
35- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
36- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest3"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
37- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest4"]' )
38- . findByTestId ( 'list-checkbox' )
39- . parent ( )
40- . click ( ) ;
41- cy . get ( '.MuiAlert-root' ) . should ( 'exist' ) ;
42- } ) ;
43- it ( 'should redirect to the comparison page when one aas is selected and button is pressed' , function ( ) {
44- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
45- cy . getByTestId ( 'compare-button' ) . click ( ) ;
46- cy . wait ( 100 ) ;
47- cy . url ( ) . should ( 'contain' , '/compare' ) ;
48- } ) ;
49- it ( 'should filter the aas list when a product class is selected' , function ( ) {
50- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) ;
51-
52- cy . getByTestId ( 'product-class-select' ) . click ( ) ;
53- cy . getByTestId ( 'product-class-select-Actuator' ) . click ( ) ;
5412
13+ it ( 'should load the first list page of the default repository and display the data' , function ( ) {
5514 cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' )
56- . findByTestId ( 'product-class-chip ' )
57- . contains ( 'Actuator ' ) ;
58- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2 "]' ) . should ( 'not.exist' ) ;
59- cy . get ( '[data-testid=" list-row-https://mnestix.io/aas/listTest3"]' ) . should ( 'not.exist' ) ;
60- cy . get ( '[data-testid="list-row- https://mnestix.io/aas/listTest4"]' ) . should ( 'not.exist ') ;
61- } ) ;
62- it ( 'should update the filtered aas list when another product class is selected' , function ( ) {
63- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/ listTest1"]' ) . findByTestId ( 'list-checkbox ') ;
64-
65- cy . getByTestId ( ' product-class-select' ) . click ( ) ;
66- cy . getByTestId ( 'product-class-select-Control-system' ) . click ( ) ;
15+ . findByTestId ( 'list-aasId ' )
16+ . contains ( 'https://mnestix.io/aas/listTest1 ' ) ;
17+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1 "]' )
18+ . findByTestId ( ' list-assetId' )
19+ . contains ( ' https://mnestix.io/listTest1 ') ;
20+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' )
21+ . findByTestId ( 'list-manufacturer-name' )
22+ . contains ( ' listTest1 Manufacturer Name ') ;
23+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' )
24+ . findByTestId ( 'list- product-designation' )
25+ . contains ( 'listTest1 Product Designation' ) ;
6726
68- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . should ( 'not.exist' ) ;
69- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' ) . should ( 'exist' ) ;
70- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest3"]' ) . should ( 'not.exist' ) ;
71- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest4"]' ) . should ( 'not.exist' ) ;
27+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' )
28+ . findByTestId ( 'list-aasId' )
29+ . contains ( 'https://mnestix.io/aas/listTest2' ) ;
30+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' )
31+ . findByTestId ( 'list-assetId' )
32+ . contains ( 'https://mnestix.io/listTest2' ) ;
33+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' )
34+ . findByTestId ( 'list-manufacturer-name' )
35+ . contains ( 'listTest2 Manufacturer Name' ) ;
36+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' )
37+ . findByTestId ( 'list-product-designation' )
38+ . contains ( 'listTest2 Product Designation' ) ;
7239 } ) ;
73- it ( 'should show the full aas list when the product class is reset' , function ( ) {
74- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) ;
75-
76- cy . getByTestId ( 'product-class-select' ) . click ( ) ;
77- cy . getByTestId ( 'product-class-select-all' ) . click ( ) ;
7840
79- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . should ( 'exist' ) ;
80- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' ) . should ( 'exist' ) ;
81- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest3"]' ) . should ( 'exist' ) ;
82- cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest4"]' ) . should ( 'exist' ) ;
41+ describe ( 'comparison list' , function ( ) {
42+ it ( 'should show the selected aas in the comparison list, and comparison button redirects to comparison' , function ( ) {
43+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
44+ cy . get ( '[data-testid="selected-https://mnestix.io/aas/listTest1' ) . should ( 'exist' ) ;
45+ cy . getByTestId ( 'compare-button' ) . should ( 'not.be.disabled' ) ;
46+ cy . getByTestId ( 'compare-button' ) . click ( ) ;
47+ cy . wait ( 100 ) ;
48+ cy . url ( ) . should ( 'contain' , '/compare' ) ;
49+ } ) ;
50+ it ( 'should remove the aas from the comparison list when deselected and disable the button' , function ( ) {
51+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
52+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
53+ cy . get ( '[data-testid="selected-https://mnestix.io/aas/listTest1' ) . should ( 'not.exist' ) ;
54+ cy . getByTestId ( 'compare-button' ) . should ( 'be.disabled' ) ;
55+ } ) ;
56+ it ( 'should disable checkboxes and show a warning when the user tries to select more than 3 aas' , function ( ) {
57+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest1"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
58+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest2"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
59+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest3"]' ) . findByTestId ( 'list-checkbox' ) . click ( ) ;
60+ cy . get ( '[data-testid="list-row-https://mnestix.io/aas/listTest4"]' )
61+ . findByTestId ( 'list-checkbox' )
62+ . parent ( )
63+ . click ( ) ;
64+ cy . get ( '.MuiAlert-root' ) . should ( 'exist' ) ;
65+ } ) ;
8366 } ) ;
8467
8568 after ( function ( ) {
0 commit comments