Skip to content

Commit 0f725f7

Browse files
fix part the second part of the tests
1 parent 652593c commit 0f725f7

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

tests/e2e/helpers/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { ClientFunction } from 'testcafe';
22
import { commonUrl } from './conf';
33

44
export const goBackHistory = ClientFunction(() => window.history.back());
5-
export const openRedisHomePage = ClientFunction(() => window.open(commonUrl));
5+
export const openRedisHomePage = ClientFunction(() => window.open(commonUrl, '_blank'));

tests/e2e/tests/web/critical-path/browser/search-capabilities.e2e.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
1212
import { Common } from '../../../../helpers/common';
1313
import { verifyKeysDisplayingInTheList } from '../../../../helpers/keys';
1414
import { APIKeyRequests } from '../../../../helpers/api/api-keys';
15+
import { goBackHistory } from '../../../../helpers/utils';
1516

1617
const browserPage = new BrowserPage();
1718
const myRedisDatabasePage = new MyRedisDatabasePage();
@@ -154,16 +155,14 @@ test
154155
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneV5Config);
155156
})('No RediSearch module message', async t => {
156157
const noRedisearchMessage = 'RediSearch is not available for this database';
157-
// const externalPageLink = 'https://redis.com/try-free/?utm_source=redisinsight&utm_medium=app&utm_campaign=redisinsight_browser_search';
158+
const externalPageLink = 'https://redis.com/try-free/?utm_source=redisinsight&utm_medium=app&utm_campaign=redisinsight_browser_search';
158159

159160
await t.click(browserPage.redisearchModeBtn);
160161
// Verify that user can see message in the dialog when he doesn't have RediSearch module
161162
await t.expect(browserPage.noReadySearchDialogTitle.textContent).contains(noRedisearchMessage, 'Invalid text in no redisearch popover');
162-
// update after resolving testcafe Native Automation mode limitations
163-
// // Verify that user can navigate by link to create a Redis db
164-
// await t.click(browserPage.redisearchFreeLink);
165-
// await Common.checkURL(externalPageLink);
166-
// await t.switchToParentWindow();
163+
// Verify that user can navigate by link to create a Redis db
164+
await t.click(browserPage.redisearchFreeLink);
165+
await Common.checkURL(externalPageLink);
167166
});
168167
test
169168
.before(async() => {
@@ -173,7 +172,7 @@ test
173172
await browserPage.Cli.sendCommandInCli(`FT.DROPINDEX ${indexName}`);
174173
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneBigConfig);
175174
})('Index creation', async t => {
176-
// const createIndexLink = 'https://redis.io/commands/ft.create/';
175+
const createIndexLink = 'https://redis.io/commands/ft.create/';
177176

178177
// Verify that user can cancel index creation
179178
await t.click(browserPage.redisearchModeBtn);
@@ -188,11 +187,10 @@ test
188187
await t.click(browserPage.selectIndexDdn);
189188
await t.click(browserPage.createIndexBtn);
190189
await t.expect(browserPage.newIndexPanel.exists).ok('New Index panel is not displayed');
191-
// update after resolving testcafe Native Automation mode limitations
192-
// // Verify that user can see a link to create a profound index and navigate
193-
// await t.click(browserPage.newIndexPanel.find('a'));
194-
// await Common.checkURL(createIndexLink);
195-
// await t.switchToParentWindow();
190+
// Verify that user can see a link to create a profound index and navigate
191+
await t.click(browserPage.newIndexPanel.find('a'));
192+
await Common.checkURL(createIndexLink);
193+
await goBackHistory();
196194

197195
// Verify that user can create an index with multiple prefixes
198196
await t.click(browserPage.indexNameInput);

tests/e2e/tests/web/critical-path/database/import-databases.e2e.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ test.before(async() => {
125125
await t.click(myRedisDatabasePage.closeDialogBtn);
126126
await t.click(myRedisDatabasePage.importDatabasesBtn);
127127
await t.setFilesToUpload(myRedisDatabasePage.importDatabaseInput, [rdmData.path]);
128-
// update after resolving testcafe Native Automation mode limitations
129-
// await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(fileNames.rdmFullJson, 'Filename not displayed in import input');
128+
await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(fileNames.rdmFullJson, 'Filename not displayed in import input');
130129
// Click on remove button
131130
await t.click(myRedisDatabasePage.removeImportedFileBtn);
132131
await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(defaultText, 'File not removed from import input');

0 commit comments

Comments
 (0)