1
1
import { addNewStandaloneDatabase } from '../../../helpers/database' ;
2
- import { WorkbenchPage } from '../../../pageObjects/workbench-page' ;
3
- import { MyRedisDatabasePage , UserAgreementPage , AddRedisDatabasePage } from '../../../pageObjects' ;
2
+ import { MyRedisDatabasePage , UserAgreementPage , AddRedisDatabasePage , WorkbenchPage } from '../../../pageObjects' ;
4
3
import {
5
4
commonUrl ,
6
5
ossStandaloneConfig
@@ -24,25 +23,17 @@ fixture `Default scripts area at Workbench`
24
23
//Go to Workbench page
25
24
await t . click ( myRedisDatabasePage . workbenchButton ) ;
26
25
} )
27
- test ( 'Verify that user can resize(maximize)/(minimize) the enablement area (the one with default scripts)' , async t => {
28
- const offsetX = 100 ;
29
- const areaWidthBefore = await workbenchPage . preselectsAreaContainer . clientWidth ;
30
- //Minimize the area with default scripts
31
- await t . drag ( workbenchPage . resizeButtonForPreselectsArea , - offsetX , 0 , { speed : 0.1 } ) ;
32
- await t . expect ( await workbenchPage . preselectsAreaContainer . clientWidth ) . lt ( areaWidthBefore , 'Default scripts area is smaller after resize' ) ;
33
- //Maximize the area with default scripts
34
- const areaWidthAfter = await workbenchPage . preselectsAreaContainer . clientWidth ;
35
- await t . click ( workbenchPage . preselectsAreaContainer ) ;
36
- await t . drag ( workbenchPage . resizeButtonForPreselectsArea , offsetX , 0 , { speed : 0.1 } ) ;
37
- await t . expect ( await workbenchPage . preselectsAreaContainer . clientWidth ) . gte ( areaWidthAfter , 'Default scripts area is bigger after resize' ) ;
38
- } ) ;
39
26
test ( 'Verify that user can expand/collapse the enablement area' , async t => {
27
+ //Hover over Enablement area
28
+ await t . hover ( workbenchPage . preselectArea ) ;
40
29
//Collapse the area with default scripts
41
- await t . doubleClick ( workbenchPage . resizeButtonForPreselectsArea ) ;
42
- await t . expect ( await workbenchPage . preselectButtons . visible ) . eql ( false , 'Default scripts area after resize is minimized' ) ;
43
- //Expand the area with default scripts
44
- await t . click ( workbenchPage . preselectsAreaContainer ) ;
45
- await t . expect ( await workbenchPage . preselectButtons . visible ) . eql ( true , 'Default scripts area after resize is maximized' ) ;
30
+ await t . click ( workbenchPage . collapsePreselectAreaButton ) ;
31
+ //Validate that Enablement area is not displayed
32
+ await t . expect ( workbenchPage . preselectArea . visible ) . notOk ( 'Enablement area is collapsed' ) ;
33
+ //Expand Enablement area
34
+ await t . click ( workbenchPage . expandPreselectAreaButton ) ;
35
+ //Validate that Enablement area is displayed
36
+ await t . expect ( workbenchPage . preselectArea . visible ) . ok ( 'Enablement area is expanded' ) ;
46
37
} ) ;
47
38
test ( 'Verify that user can see the [Manual] option in the Enablement area' , async t => {
48
39
const optionsForCheck = [
0 commit comments