@@ -4,7 +4,12 @@ import { AddNewRdiParameters, RdiApiRequests } from '../../../../helpers/api/api
4
4
import { commonUrl , ossStandaloneConfig } from '../../../../helpers/conf' ;
5
5
import { DatabaseHelper } from '../../../../helpers' ;
6
6
import { MyRedisDatabasePage } from '../../../../pageObjects' ;
7
- import { RdiPopoverOptions , RedisOverviewPage } from '../../../../helpers/constants' ;
7
+ import {
8
+ RdiPopoverOptions ,
9
+ RdiTemplateDatabaseType ,
10
+ RdiTemplatePipelineType ,
11
+ RedisOverviewPage
12
+ } from '../../../../helpers/constants' ;
8
13
import { RdiInstancesListPage } from '../../../../pageObjects/rdi-instances-list-page' ;
9
14
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database' ;
10
15
@@ -23,7 +28,7 @@ const rdiInstance: AddNewRdiParameters = {
23
28
} ;
24
29
25
30
//skip the tests until rdi integration is added
26
- fixture . skip `Rdi Navigation`
31
+ fixture `Rdi Navigation`
27
32
. meta ( { type : 'critical_path' , feature : 'rdi' } )
28
33
. page ( commonUrl )
29
34
. beforeEach ( async ( ) => {
@@ -55,6 +60,7 @@ test.before(async() => {
55
60
const rdiName = rdiInstancePage . RdiHeader . rdiNameLinkBreadcrumbs . textContent ;
56
61
await t . expect ( rdiName ) . eql ( rdiInstance . name , 'instance name in breadcrumbs is not correct' ) ;
57
62
63
+ await rdiInstancePage . selectStartPipelineOption ( RdiPopoverOptions . Pipeline ) ;
58
64
await t . click ( rdiInstancePage . NavigationPanel . myRedisDBButton ) ;
59
65
await myRedisDatabasePage . setActivePage ( RedisOverviewPage . DataBase ) ;
60
66
count = await myRedisDatabasePage . NavigationPanel . getButtonsCount ( ) ;
@@ -82,3 +88,26 @@ test('Verify that Insight and Sign in buttons are displayed ', async() => {
82
88
await t . expect ( tab ) . eql ( 'Explore' ) ;
83
89
await t . expect ( rdiInstancePage . RdiHeader . cloudSignInButton . exists ) . ok ( 'sight in button is not exist' ) ;
84
90
} ) ;
91
+
92
+ test ( 'Verify that confirmation message is displayed, if there are unsaved changes ' , async ( ) => {
93
+ const jobName = 'jobName' ;
94
+ const textForMonaco = 'here should be a job' ;
95
+
96
+ await rdiInstancePage . PipelineManagementPanel . addJob ( jobName ) ;
97
+ await rdiInstancePage . PipelineManagementPanel . openJobByName ( jobName ) ;
98
+ await t . click ( rdiInstancePage . templateCancelButton ) ;
99
+ await rdiInstancePage . MonacoEditor . sendTextToMonaco ( rdiInstancePage . jobsInput , textForMonaco , false ) ;
100
+ await t . click ( rdiInstancePage . RdiHeader . breadcrumbsLink ) ;
101
+ await t . expect ( rdiInstancePage . downloadNavigateDialog . exists ) . ok ( 'the user can not download' ) ;
102
+ await t . click ( rdiInstancePage . closeConfirmNavigateDialog ) ;
103
+
104
+ const text = await rdiInstancePage . MonacoEditor . getTextFromMonaco ( ) ;
105
+ await t . expect ( text ) . eql ( textForMonaco , 'changes is not saved' ) ;
106
+
107
+ await t . click ( rdiInstancePage . PipelineManagementPanel . configurationTabLink ) ;
108
+ await t . click ( rdiInstancePage . templateButton ) ;
109
+ await rdiInstancePage . setTemplateDropdownValue ( RdiTemplatePipelineType . Ingest , RdiTemplateDatabaseType . MySql ) ;
110
+ await t . click ( rdiInstancePage . NavigationPanel . myRedisDBButton ) ;
111
+ await t . click ( rdiInstancePage . proceedNavigateDialog ) ;
112
+ await t . expect ( rdiInstancesListPage . rdiInstanceButton . exists ) . ok ( 'the user is not navigated to the panel' ) ;
113
+ } ) ;
0 commit comments