Skip to content

Commit af2dca0

Browse files
Merge pull request #528 from RedisInsight/feature/e2e-test-fixes
e2e-fix tests with new link
2 parents 628cdea + 6f66637 commit af2dca0

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

tests/e2e/tests/regression/cli/cli-command-helper.e2e.ts

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,13 @@ test
8989
//Verify Command helper information
9090
await t.expect(cliPage.cliHelperTitleArgs.textContent).contains(commandToCheck, 'Command Helper information persists after reopening');
9191
});
92-
//skipped due the changes of url
93-
test.skip
92+
test
9493
.meta({ env: env.web, rte: rte.standalone })
9594
('Verify that user can see in Command helper and click on new group "JSON", can choose it and see list of commands in the group', async t => {
9695
filteringGroup = 'JSON';
9796
commandToCheck = 'JSON.SET';
9897
commandArgumentsToCheck = 'JSON.SET key path value [NX|XX]';
99-
externalPageLink = '/#jsonset';
98+
externalPageLink = 'https://redis.io/commands/json.set/';
10099
//Open Command Helper
101100
await t.click(cliPage.expandCommandHelperButton);
102101
//Select one command from the list
@@ -107,19 +106,16 @@ test.skip
107106
//Click on Read More link for selected command
108107
await t.click(cliPage.readMoreButton);
109108
//Check new opened window page with the correct URL
110-
await t.expect(getPageUrl()).contains(externalPageLink);
111-
//Check that command info is displayed on the page
112-
await t.expect(cliPage.cliReadMoreJSONCommandDocumentation().textContent).contains('JSON.SET');
109+
await t.expect(getPageUrl()).eql(externalPageLink, 'The opened page');
113110
await t.switchToParentWindow();
114111
});
115-
//skipped due the changes of url
116-
test.skip
112+
test
117113
.meta({ env: env.web, rte: rte.standalone })
118114
('Verify that user can see in Command helper and click on new group "Search", can choose it and see list of commands in the group', async t => {
119115
filteringGroup = 'Search';
120116
commandToCheck = 'FT.EXPLAIN';
121117
commandArgumentsToCheck = 'FT.EXPLAIN index query [dialect]';
122-
externalPageLink = '/#ftexplain';
118+
externalPageLink = 'https://redis.io/commands/ft.explain/';
123119
//Open Command Helper
124120
await t.click(cliPage.expandCommandHelperButton);
125121
//Select one command from the list
@@ -130,9 +126,7 @@ test.skip
130126
//Click on Read More link for selected command
131127
await t.click(cliPage.readMoreButton);
132128
//Check new opened window page with the correct URL
133-
await t.expect(getPageUrl()).contains(externalPageLink);
134-
//Check that command info is displayed on the page
135-
await t.expect(cliPage.cliReadMoreRediSearchCommandDocumentation().textContent).contains(commandToCheck);
129+
await t.expect(getPageUrl()).eql(externalPageLink, 'The opened page');
136130
await t.switchToParentWindow();
137131
});
138132
test
@@ -141,7 +135,7 @@ test
141135
filteringGroup = 'HyperLogLog';
142136
commandToCheck = 'PFCOUNT';
143137
commandArgumentsToCheck = 'PFCOUNT key [key ...]';
144-
externalPageLink = '/pfcount';
138+
externalPageLink = 'https://redis.io/commands/pfcount/';
145139
//Open Command Helper
146140
await t.click(cliPage.expandCommandHelperButton);
147141
//Select one command from the list
@@ -152,7 +146,7 @@ test
152146
//Click on Read More link for selected command
153147
await t.click(cliPage.readMoreButton);
154148
//Check new opened window page with the correct URL
155-
await t.expect(getPageUrl()).contains(externalPageLink);
149+
await t.expect(getPageUrl()).eql(externalPageLink, 'The opened page');
156150
await t.switchToParentWindow();
157151
});
158152
test
@@ -172,10 +166,10 @@ test
172166
'AI.TENSORSET key FLOAT|DOUBLE|INT8|INT16|INT32|INT64|UINT8|UINT16|STRING|BOOL shape [shape ...] [BLOB blob] [VALUES value [VALUES value ...]]'
173167
];
174168
externalPageLinks = [
175-
'/#aimodeldel',
176-
'/#aiscriptstore',
177-
'/#aiscriptexecute',
178-
'/#aitensorset'
169+
'https://redis.io/commands/ai.modeldel',
170+
'https://redis.io/commands/ai.scriptstore',
171+
'https://redis.io/commands/ai.scriptexecute',
172+
'https://redis.io/commands/ai.tensorset'
179173
];
180174
//Open Command Helper
181175
await t.click(cliPage.expandCommandHelperButton);
@@ -190,7 +184,7 @@ test
190184
//Click on Read More link for selected command
191185
await t.click(cliPage.readMoreButton);
192186
//Check new opened window page with the correct URL
193-
await t.expect(getPageUrl()).contains(externalPageLinks[i]);
187+
await t.expect(getPageUrl()).eql(externalPageLinks[i], 'The opened page');
194188
//Close the window with external link to switch to the application window
195189
await t.closeWindow();
196190
i++;
@@ -202,7 +196,7 @@ test
202196
filteringGroup = 'Gears';
203197
commandToCheck = 'RG.GETEXECUTION';
204198
commandArgumentsToCheck = 'RG.GETEXECUTION id [SHARD|CLUSTER]';
205-
externalPageLink = '#rggetexecution';
199+
externalPageLink = 'https://redis.io/commands/rg.getexecution';
206200
//Open Command Helper
207201
await t.click(cliPage.expandCommandHelperButton);
208202
//Verify that user can see Gears group in Command Helper (RedisGears module)
@@ -214,7 +208,7 @@ test
214208
//Verify that user can use Read More link for Gears group in Command Helper (RedisGears module)
215209
await t.click(cliPage.readMoreButton);
216210
//Check new opened window page with the correct URL
217-
await t.expect(getPageUrl()).contains(externalPageLink);
211+
await t.expect(getPageUrl()).eql(externalPageLink, 'The opened page');
218212
//Close the window with external link to switch to the application window
219213
await t.closeWindow();
220214
});
@@ -237,11 +231,11 @@ test
237231
'CF.ADD key item'
238232
];
239233
externalPageLinks = [
240-
'/#bfmexists',
241-
'/#cmsquery',
242-
'tdigest.reset',
243-
'/#topklist',
244-
'/#cfadd'
234+
'https://redis.io/commands/bf.mexists/',
235+
'https://redis.io/commands/cms.query/',
236+
'https://redis.io/commands/tdigest.reset/',
237+
'https://redis.io/commands/topk.list/',
238+
'https://redis.io/commands/cf.add/'
245239
];
246240
//Open Command Helper
247241
await t.click(cliPage.expandCommandHelperButton);
@@ -256,7 +250,7 @@ test
256250
//Verify that user can use Read More link for Bloom, Cuckoo, CMS, TDigest, TopK groups in Command Helper (RedisBloom module).
257251
await t.click(cliPage.readMoreButton);
258252
//Check new opened window page with the correct URL
259-
await t.expect(getPageUrl()).contains(externalPageLinks[i]);
253+
await t.expect(getPageUrl()).eql(externalPageLinks[i], 'The opened page');
260254
//Close the window with external link to switch to the application window
261255
await t.closeWindow();
262256
i++;

tests/e2e/tests/regression/monitor/monitor.e2e.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,13 @@ test
115115
});
116116
test
117117
.meta({ rte: rte.standalone })
118-
.before(async() => {
118+
.before(async t => {
119119
await acceptLicenseTermsAndAddDatabase(ossStandaloneConfig, ossStandaloneConfig.databaseName);
120120
await cliPage.sendCommandInCli('acl setuser noperm nopass on +@all ~* -monitor');
121+
//Check command result in CLI
122+
await t.click(cliPage.cliExpandButton);
123+
await t.expect(cliPage.cliOutputResponseSuccess.textContent).eql('"OK"', 'Command from autocomplete was found & executed');
124+
await t.click(cliPage.cliCollapseButton);
121125
await deleteDatabase(ossStandaloneConfig.databaseName);
122126
await addNewStandaloneDatabase(ossStandaloneNoPermissionsConfig);
123127
await myRedisDatabasePage.clickOnDBByName(ossStandaloneNoPermissionsConfig.databaseName);

0 commit comments

Comments
 (0)