Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:web": "yarn --cwd ../../ build:web",
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --native-automation --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots/,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots/,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
"test:chrome:ci": "ts-node ./web.runner.ts",
"test": "yarn test:chrome",
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
Expand All @@ -28,8 +28,8 @@
},
"resolutions": {
"@types/lodash": "4.14.192",
"@types/node": "18.11.9",
"testcafe-hammerhead": "24.2.1"
"@types/node": "20.3.1",
"testcafe-hammerhead": "31.4.5"
},
"devDependencies": {
"@types/archiver": "^5.3.2",
Expand All @@ -53,12 +53,12 @@
"redis": "3.1.1",
"sqlite3": "^5.1.6",
"supertest": "^4.0.2",
"testcafe": "2.6.2",
"testcafe": "3.0.0",
"testcafe-browser-provider-electron": "0.0.19",
"testcafe-reporter-html": "1.4.6",
"testcafe-reporter-json": "2.2.0",
"testcafe-reporter-spec": "2.1.1",
"ts-node": "^10.5.0",
"typescript": "4.1.5"
"ts-node": "10.9.1",
"typescript": "5.1.3"
}
}
6 changes: 6 additions & 0 deletions tests/e2e/pageObjects/browser-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ export class BrowserPage extends InstancePage {
* @param members The key members
*/
async addSetKey(keyName: string, TTL = ' ', members = ' '): Promise<void> {
if (await this.Toast.toastCloseButton.exists) {
await t.click(this.Toast.toastCloseButton);
}
await Common.waitForElementNotVisible(this.progressLine);
await Common.waitForElementNotVisible(this.loader);
await t.click(this.plusAddKeyButton);
Expand Down Expand Up @@ -407,6 +410,9 @@ export class BrowserPage extends InstancePage {
* @param value The value of the key
*/
async addHashKey(keyName: string, TTL = ' ', field = ' ', value = ' '): Promise<void> {
if (await this.Toast.toastCloseButton.exists) {
await t.click(this.Toast.toastCloseButton);
}
await Common.waitForElementNotVisible(this.progressLine);
await Common.waitForElementNotVisible(this.loader);
await t.click(this.plusAddKeyButton);
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/pageObjects/components/browser/bulk-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export class BulkActions {
* Open Bulk Actions and confirm deletion
*/
async startBulkDelete(): Promise<void> {
// Wait for Bulk actions animation ends
await t.wait(1000);
await t
.click(this.actionButton)
.click(this.bulkApplyButton);
Expand Down
10 changes: 8 additions & 2 deletions tests/e2e/tests/critical-path/browser/bulk-delete.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ const keyToAddParameters2 = { keysCount: 500000, keyNameStartWith: 'hashKey' };
fixture `Bulk Delete`
.meta({ type: 'critical_path', rte: rte.standalone })
.page(commonUrl)
.beforeEach(async() => {
.beforeEach(async t => {
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
await browserPage.addHashKey(keyNames[0], '100000', Common.generateWord(20), Common.generateWord(20));
await browserPage.addSetKey(keyNames[1], '100000', Common.generateWord(20));
if (await browserPage.Toast.toastCloseButton.exists) {
await t.click(browserPage.Toast.toastCloseButton);
}
})
.afterEach(async() => {
// Clear and delete database
Expand Down Expand Up @@ -131,9 +134,12 @@ test('Verify that when bulk deletion is completed, status Action completed is di
await t.expect(browserPage.BulkActions.bulkDeleteSummary.innerText).contains('Scanned 100% (2/2) and found 1 keys', 'Bulk delete summary is not correct');
});
test
.before(async() => {
.before(async t => {
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
await browserPage.addSetKey(keyNames[1], '100000', Common.generateWord(20));
if (await browserPage.Toast.toastCloseButton.exists) {
await t.click(browserPage.Toast.toastCloseButton);
}
// Add 10000 Hash keys
await populateDBWithHashes(dbParameters.host, dbParameters.port, keyToAddParameters);
// Filter by Hash keys
Expand Down
12 changes: 5 additions & 7 deletions tests/e2e/tests/critical-path/browser/search-capabilities.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,17 @@ test
.after(async() => {
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
})('No RediSearch module message', async t => {

// TODO: check
const noRedisearchMessage = 'Looks like RediSearch is not available for this database';
const externalPageLink = 'https://redis.com/try-free/?utm_source=redisinsight&utm_medium=app&utm_campaign=redisinsight_browser_search';
// const externalPageLink = 'https://redis.com/try-free/?utm_source=redisinsight&utm_medium=app&utm_campaign=redisinsight_browser_search';

await t.click(browserPage.redisearchModeBtn);
// Verify that user can see message in the dialog when he doesn't have RediSearch module
await t.expect(browserPage.noReadySearchDialogTitle.textContent).contains(noRedisearchMessage, 'Invalid text in no redisearch popover');
// update after resolving testcafe Native Automation mode limitations
// // Verify that user can navigate by link to create a Redis db
await t.click(browserPage.redisearchFreeLink);
await Common.checkURL(externalPageLink);
await t.switchToParentWindow();
// await t.click(browserPage.redisearchFreeLink);
// await Common.checkURL(externalPageLink);
// await t.switchToParentWindow();
});
test
.before(async() => {
Expand All @@ -170,7 +168,7 @@ test
await browserPage.Cli.sendCommandInCli(`FT.DROPINDEX ${indexName}`);
await deleteStandaloneDatabaseApi(ossStandaloneBigConfig);
})('Index creation', async t => {
const createIndexLink = 'https://redis.io/commands/ft.create/';
// const createIndexLink = 'https://redis.io/commands/ft.create/';

// Verify that user can cancel index creation
await t.click(browserPage.redisearchModeBtn);
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/web.runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ import testcafe from 'testcafe';
assertionTimeout: 5000,
speed: 1,
quarantineMode: { successThreshold: 1, attemptLimit: 3 },
pageRequestTimeout: 8000,
nativeAutomation: true,
pageRequestTimeout: 8000
});
})
.then((failedCount) => {
Expand Down
Loading