@@ -3,34 +3,46 @@ import {
3
3
acceptTermsAddDatabaseOrConnectToRedisStack , deleteDatabase
4
4
} from '../../../helpers/database' ;
5
5
import {
6
- commonUrl , ossStandaloneConfig
6
+ commonUrl , ossStandaloneConfigEmpty
7
7
} from '../../../helpers/conf' ;
8
8
import { env , rte } from '../../../helpers/constants' ;
9
9
import { Common } from '../../../helpers/common' ;
10
10
import { OnboardActions } from '../../../common-actions/onboard-actions' ;
11
- import { CliPage , MemoryEfficiencyPage , SlowLogPage , WorkbenchPage , PubSubPage , MonitorPage } from '../../../pageObjects' ;
11
+ import {
12
+ CliPage ,
13
+ MemoryEfficiencyPage ,
14
+ SlowLogPage ,
15
+ WorkbenchPage ,
16
+ PubSubPage ,
17
+ MonitorPage ,
18
+ OnboardingPage
19
+ } from '../../../pageObjects' ;
12
20
13
21
const common = new Common ( ) ;
14
22
const onBoardActions = new OnboardActions ( ) ;
23
+ const onboardingPage = new OnboardingPage ( ) ;
15
24
const cliPage = new CliPage ( ) ;
16
25
const memoryEfficiencyPage = new MemoryEfficiencyPage ( ) ;
17
26
const workBenchPage = new WorkbenchPage ( ) ;
18
27
const slowLogPage = new SlowLogPage ( ) ;
19
28
const pubSubPage = new PubSubPage ( ) ;
20
29
const monitorPage = new MonitorPage ( ) ;
21
30
const setLocalStorageItem = ClientFunction ( ( key : string , value : string ) => window . localStorage . setItem ( key , value ) ) ;
31
+ const indexName = common . generateWord ( 10 ) ;
22
32
23
33
fixture `Onboarding new user tests`
24
34
. meta ( { type : 'regression' , rte : rte . standalone } )
25
35
. page ( commonUrl )
26
36
. beforeEach ( async ( ) => {
27
- await acceptTermsAddDatabaseOrConnectToRedisStack ( ossStandaloneConfig , ossStandaloneConfig . databaseName ) ;
37
+ await acceptTermsAddDatabaseOrConnectToRedisStack ( ossStandaloneConfigEmpty , ossStandaloneConfigEmpty . databaseName ) ;
28
38
await setLocalStorageItem ( 'onboardingStep' , '0' ) ;
29
39
await common . reloadPage ( ) ;
30
40
} )
31
41
. afterEach ( async ( ) => {
32
- await deleteDatabase ( ossStandaloneConfig . databaseName ) ;
42
+ await cliPage . sendCommandInCli ( `DEL ${ indexName } ` ) ;
43
+ await deleteDatabase ( ossStandaloneConfigEmpty . databaseName ) ;
33
44
} ) ;
45
+ // https://redislabs.atlassian.net/browse/RI-4070, https://redislabs.atlassian.net/browse/RI-4067
34
46
test
35
47
. meta ( { env : env . desktop } ) ( 'Verify onbarding new user steps' , async t => {
36
48
await onBoardActions . startOnboarding ( ) ;
55
67
await t . expect ( monitorPage . monitorArea . visible ) . ok ( 'profiler is not expanded' ) ;
56
68
await onBoardActions . verifyStepVisible ( 'Profiler' ) ;
57
69
await onBoardActions . clickNextStep ( ) ;
70
+ // Verify that client list command visible when there is not any index created
71
+ await t . expect ( onboardingPage . wbOnbardingCommand . withText ( 'CLIENT LIST' ) . visible ) . ok ( 'CLIENT LIST command is not visible' ) ;
72
+ await t . expect ( onboardingPage . copyCodeButton . visible ) . ok ( 'copy code button is not visible' ) ;
58
73
// verify workbench page is opened
59
74
await t . expect ( workBenchPage . mainEditorArea . visible ) . ok ( 'workbench is not opened' ) ;
60
75
await onBoardActions . verifyStepVisible ( 'Try Workbench!' ) ;
61
76
// click back step button
62
77
await onBoardActions . clickBackStep ( ) ;
78
+ // create index in order to see in FT.INFO {index} in onboarding step
79
+ await cliPage . sendCommandInCli ( `FT.CREATE ${ indexName } ON HASH PREFIX 1 test SCHEMA "name" TEXT` ) ;
63
80
// verify one step before is opened
64
81
await t . expect ( monitorPage . monitorArea . visible ) . ok ( 'profiler is not expanded' ) ;
65
82
await onBoardActions . verifyStepVisible ( 'Profiler' ) ;
66
83
await onBoardActions . clickNextStep ( ) ;
67
84
// verify workbench page is opened
85
+ await t . expect ( onboardingPage . wbOnbardingCommand . withText ( `FT.INFO ${ indexName } ` ) . visible ) . ok ( `FT.INFO ${ indexName } command is not visible` ) ;
86
+ await t . expect ( onboardingPage . copyCodeButton . visible ) . ok ( 'copy code button is not visible' ) ;
68
87
await t . expect ( workBenchPage . mainEditorArea . visible ) . ok ( 'workbench is not opened' ) ;
69
88
await onBoardActions . verifyStepVisible ( 'Try Workbench!' ) ;
70
89
await onBoardActions . clickNextStep ( ) ;
75
94
await onBoardActions . verifyStepVisible ( 'Database Analysis' ) ;
76
95
await onBoardActions . clickNextStep ( ) ;
77
96
// verify slow log is opened
78
- await t . expect ( slowLogPage . slowLogTable . visible ) . ok ( 'slow log is not opened' ) ;
97
+ await t . expect ( slowLogPage . slowLogConfigureButton . visible ) . ok ( 'slow log is not opened' ) ;
79
98
await onBoardActions . verifyStepVisible ( 'Slow Log' ) ;
80
99
await onBoardActions . clickNextStep ( ) ;
81
100
// verify pub/sub page is opened
88
107
// verify onboarding step completed successfully
89
108
await onBoardActions . verifyOnboardingCompleted ( ) ;
90
109
} ) ;
110
+ // https://redislabs.atlassian.net/browse/RI-4067
91
111
test
92
112
. meta ( { env : env . desktop } ) ( 'verify onboard new user skip tour' , async ( ) => {
93
113
// start onboarding process
0 commit comments