@@ -15,27 +15,21 @@ const workingDirectory = process.env.APP_FOLDER_ABSOLUTE_PATH
15
15
|| ( join ( os . homedir ( ) , process . env . APP_FOLDER_NAME || '.redisinsight-v2' ) ) ;
16
16
if ( fs . existsSync ( workingDirectory ) ) {
17
17
// Guides content
18
- // const guidesTimestampPath = `${workingDirectory}/guides/build.json`;
19
- // const guidesGraphIntroductionFilePath = `${workingDirectory}/guides/quick-guides/graph/introduction.md`;
20
- const guidesTimestampPath = 'E:\\Redis\\RedisInsight\\tests\\e2e\\.redisinsight-v2\\guides\\build.json' ;
21
- const guidesGraphIntroductionFilePath = 'E:\\Redis\\RedisInsight\\tests\\e2e\\.redisinsight-v2\\guides\\quick-guides\\graph\\introduction.md' ;
18
+ const guidesTimestampPath = `${ workingDirectory } /guides/build.json` ;
19
+ const guidesGraphIntroductionFilePath = `${ workingDirectory } /guides/quick-guides/graph/introduction.md` ;
22
20
23
21
// Tutorials content
24
- // const tutorialsTimestampPath = `${workingDirectory}/tutorials/build.json`;
25
- // const tutorialsTimeSeriesFilePath = `${workingDirectory}/guides/quick-guides/graph/introduction.md`;
26
- const tutorialsTimestampPath = 'E:\\Redis\\RedisInsight\\tests\\e2e\\.redisinsight-v2\\tutorials\\build.json' ;
27
- const tutorialsTimeSeriesFilePath = 'E:\\Redis\\RedisInsight\\tests\\e2e\\.redisinsight-v2\\tutorials\\redis_stack\\redis_for_time_series.md' ;
22
+ const tutorialsTimestampPath = `${ workingDirectory } /tutorials/build.json` ;
23
+ const tutorialsTimeSeriesFilePath = `${ workingDirectory } /guides/quick-guides/graph/introduction.md` ;
28
24
29
- // Remove md files
30
- // fs.unlinkSync(guidesGraphIntroductionFilePath);
31
- // fs.unlinkSync(tutorialsTimeSeriesFilePath);
25
+ // Remove md files from local folder. When desktop test will start, files will be updated from remote repository
26
+ fs . unlinkSync ( guidesGraphIntroductionFilePath ) ;
27
+ fs . unlinkSync ( tutorialsTimeSeriesFilePath ) ;
32
28
33
29
// Update timestamp for build files
34
30
const guidesTimestampFile = editJsonFile ( guidesTimestampPath ) ;
35
31
const tutorialsTimestampFile = editJsonFile ( tutorialsTimestampPath ) ;
36
32
37
- console . log ( `guide timestampBeforeUpdate: ${ guidesTimestampFile . get ( 'timestamp' ) } ` ) ;
38
- console . log ( `tutorial timestampBeforeUpdate: ${ tutorialsTimestampFile . get ( 'timestamp' ) } ` ) ;
39
33
const guidesNewTimestamp = guidesTimestampFile . get ( 'timestamp' ) - 10 ;
40
34
const tutorialNewTimestamp = tutorialsTimestampFile . get ( 'timestamp' ) - 10 ;
41
35
@@ -44,9 +38,6 @@ if (fs.existsSync(workingDirectory)) {
44
38
tutorialsTimestampFile . set ( 'timestamp' , tutorialNewTimestamp ) ;
45
39
tutorialsTimestampFile . save ( ) ;
46
40
47
- console . log ( `guide timestamp after file update: ${ guidesTimestampFile . get ( 'timestamp' ) } ` ) ;
48
- console . log ( `tutorial timestamp after file update: ${ tutorialsTimestampFile . get ( 'timestamp' ) } ` ) ;
49
-
50
41
fixture `Automatically update information`
51
42
. meta ( { type : 'critical_path' } )
52
43
. page ( commonUrl )
@@ -56,7 +47,7 @@ if (fs.existsSync(workingDirectory)) {
56
47
. afterEach ( async ( ) => {
57
48
await deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
58
49
} ) ;
59
- test . only
50
+ test
60
51
. meta ( { rte : rte . standalone , env : env . desktop } ) ( 'Verify that user can see updated info in Enablement Area' , async t => {
61
52
// Create new file due to cache-ability
62
53
const guidesTimestampFileNew = editJsonFile ( guidesTimestampPath ) ;
@@ -67,8 +58,9 @@ if (fs.existsSync(workingDirectory)) {
67
58
68
59
// Check Enablement area and validate that removed file is existed in Guides
69
60
await t . click ( workbenchPage . guidesGraphAccordion ) ;
70
- await t . click ( workbenchPage . guidesIntroductionGraphLink ) ;
61
+ await t . click ( workbenchPage . guidesIntroductionGraphLink . nth ( 1 ) ) ;
71
62
await t . expect ( workbenchPage . enablementAreaEmptyContent . visible ) . notOk ( 'Guides folder is not updated' ) ;
63
+ await t . click ( workbenchPage . closeEnablementPage ) ;
72
64
73
65
// Check Enablement area and validate that removed file is existed in Tutorials
74
66
await t . click ( workbenchPage . redisStackTutorialsButton ) ;
0 commit comments