Skip to content

Commit

Permalink
Merge pull request #2835 from RedisInsight/e2e/bugfix/fix-failed-e2e
Browse files Browse the repository at this point in the history
fixes for failed after hooks
  • Loading branch information
vlad-dargel committed Nov 30, 2023
2 parents 3134ac1 + 4223bf6 commit 215fa83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/pageObjects/browser-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ export class BrowserPage extends InstancePage {
const rememberedScanResults = Number((await this.keysNumberOfResults.textContent).replace(/\s/g, ''));
await t.expect(this.progressKeyList.exists).notOk('Progress Bar is still displayed', { timeout: 30000 });
const scannedValueText = this.scannedValue.textContent;
const regExp = new RegExp(`${i} 00` + '.');
const regExp = new RegExp(`${i} ` + '...');
await t
.expect(scannedValueText).match(regExp, `The database is not automatically scanned by ${i} 000 keys`)
.click(this.scanMoreButton);
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/tests/web/critical-path/browser/scan-keys.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ fixture `Browser - Specify Keys to Scan`
await t.click(myRedisDatabasePage.NavigationPanel.settingsButton);
await t.click(settingsPage.accordionAdvancedSettings);
await settingsPage.changeKeysToScanValue('10000');
// Open Browser page
await t.click(myRedisDatabasePage.NavigationPanel.browserButton);
//Clear and delete database
await browserPage.Cli.sendCommandInCli(`DEL ${keys.join(' ')}`);
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
Expand Down
28 changes: 14 additions & 14 deletions tests/e2e/tests/web/critical-path/settings/settings.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ fixture `Settings`
.clientScripts({ content: `(${explicitErrorHandler.toString()})()` })
.beforeEach(async() => {
await databaseHelper.acceptLicenseTerms();
})
.afterEach(async() => {
await settingsPage.changeKeysToScanValue('10000');
});
test('Verify that user can customize a number of keys to scan in filters per key name or key type', async t => {
test
.after(async() => {
await settingsPage.changeKeysToScanValue('10000');
})('Verify that user can customize a number of keys to scan in filters per key name or key type', async t => {
// Go to Settings page
await t.click(myRedisDatabasePage.NavigationPanel.settingsButton);
// Change keys to Scan
await t.click(settingsPage.accordionAdvancedSettings);
await settingsPage.changeKeysToScanValue('1500');
// Reload Page
await myRedisDatabasePage.reloadPage();
// Check that value was set
await t.click(settingsPage.accordionAdvancedSettings);
await t.expect(settingsPage.keysToScanValue.textContent).eql('1500', 'Keys to Scan has proper value');
});
await t.click(myRedisDatabasePage.NavigationPanel.settingsButton);
// Change keys to Scan
await t.click(settingsPage.accordionAdvancedSettings);
await settingsPage.changeKeysToScanValue('1500');
// Reload Page
await myRedisDatabasePage.reloadPage();
// Check that value was set
await t.click(settingsPage.accordionAdvancedSettings);
await t.expect(settingsPage.keysToScanValue.textContent).eql('1500', 'Keys to Scan has proper value');
});
test('Verify that user can turn on/off Analytics in Settings in the application', async t => {
// Go to Settings page
await t.click(myRedisDatabasePage.NavigationPanel.settingsButton);
Expand Down

0 comments on commit 215fa83

Please sign in to comment.