@@ -16,8 +16,8 @@ const telemetry = new Telemetry();
16
16
let indexName = chance . word ( { length : 5 } ) ;
17
17
let keyName = chance . word ( { length : 5 } ) ;
18
18
const logger = telemetry . createLogger ( ) ;
19
- const telemetryEvent = 'WORKBENCH_ENABLEMENT_AREA_GUIDE_OPENED ' ;
20
- const telemetryPath = 'static/guides/quick-guides/document/working-with- hashes.md' ;
19
+ const telemetryEvent = 'EXPLORE_PANEL_TUTORIAL_OPENED ' ;
20
+ const telemetryPath = 'static/tutorials/ds/ hashes.md' ;
21
21
const expectedProperties = [
22
22
'databaseId' ,
23
23
'path'
46
46
`HMSET product:1 name "${ keyName } "` ,
47
47
`HMSET product:2 name "${ keyName } "`
48
48
] ;
49
+ const addedScript = `FT._LIST // Return a list of all indices\n' +
50
+ '\n' +
51
+ 'FT.INFO "${ indexName } "" // Display information about a particular index` ;
49
52
// Send commands
50
53
await workbenchPage . sendCommandInWorkbench ( commandsForSend . join ( '\n' ) ) ;
51
54
// Run automatically added "FT._LIST" and "FT.INFO {index}" scripts
57
60
// Verify that telemetry event 'WORKBENCH_ENABLEMENT_AREA_GUIDE_OPENED' sent and has all expected properties
58
61
await telemetry . verifyEventHasProperties ( telemetryEvent , expectedProperties , logger ) ;
59
62
await telemetry . verifyEventPropertyValue ( telemetryEvent , 'path' , telemetryPath , logger ) ;
60
- await tutorials . runBlockCode ( 'Additional index information' ) ;
63
+
64
+ await workbenchPage . sendCommandInWorkbench ( addedScript ) ;
65
+
61
66
// Check the FT._LIST result
62
67
await t . expect ( workbenchPage . queryTextResult . textContent ) . contains ( indexName , 'The result of the FT._LIST command not found' ) ;
63
68
// Check the FT.INFO result
@@ -76,13 +81,7 @@ test('Verify that user can edit and run automatically added "Search" script in W
76
81
// Send commands
77
82
await workbenchPage . sendCommandInWorkbench ( commandsForSend . join ( '\n' ) ) ;
78
83
// Run automatically added FT.SEARCH script with edits
79
- await workbenchPage . InsightsPanel . togglePanel ( true ) ;
80
- const tutorials = await workbenchPage . InsightsPanel . setActiveTab ( ExploreTabs . Explore ) ;
81
- await t . click ( tutorials . dataStructureAccordionTutorialButton ) ;
82
- await t . click ( tutorials . internalLinkWorkingWithHashes ) ;
83
- await tutorials . runBlockCode ( 'Exact text search' ) ;
84
84
85
- await t . pressKey ( 'ctrl+a delete' ) ;
86
85
await workbenchPage . sendCommandInWorkbench ( searchCommand ) ;
87
86
// Check the FT.SEARCH result
88
87
await t . switchToIframe ( workbenchPage . iframe ) ;
@@ -103,13 +102,6 @@ test('Verify that user can edit and run automatically added "Aggregate" script i
103
102
// Send commands
104
103
await workbenchPage . sendCommandInWorkbench ( commandsForSend . join ( '\n' ) , 0.5 ) ;
105
104
// Run automatically added FT.Aggregate script with edits
106
- await workbenchPage . InsightsPanel . togglePanel ( true ) ;
107
- const tab = await workbenchPage . InsightsPanel . setActiveTab ( ExploreTabs . Explore ) ;
108
- await t . click ( tab . dataStructureAccordionTutorialButton ) ;
109
- await t . click ( tab . internalLinkWorkingWithHashes ) ;
110
- await tab . runBlockCode ( 'Group by & sort by aggregation: COUNT' ) ;
111
- //await t.click(workbenchPage.preselectGroupBy);
112
- await t . pressKey ( 'ctrl+a delete' ) ;
113
105
await workbenchPage . sendCommandInWorkbench ( searchCommand ) ;
114
106
// Check the FT.Aggregate result
115
107
await t . switchToIframe ( workbenchPage . iframe ) ;
0 commit comments