Skip to content

Commit ec2b91d

Browse files
authored
Merge pull request #1726 from RedisInsight/e2e/bugfix/regression-fixes
fixes for failed regression tests
2 parents 5bda338 + 1d72e53 commit ec2b91d

File tree

6 files changed

+95
-92
lines changed

6 files changed

+95
-92
lines changed

tests/e2e/tests/critical-path/database/clone-databases.e2e.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ test
114114
await t.click(addRedisDatabasePage.testConnectionBtn);
115115
await t.expect(myRedisDatabasePage.databaseInfoMessage.textContent).contains('Connection is successful', 'Sentinel connection is not successful');
116116

117-
await t.click(addRedisDatabasePage.cloneDatabaseButton);
118117
// Verify that for Sentinel Host and Port fields are replaced with editable Primary Group Name field
119118
await t
120119
.expect(myRedisDatabasePage.editAliasButton.withText('Clone ').exists).ok('Clone panel is not displayed')

tests/e2e/tests/critical-path/workbench/scripting-area.e2e.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,21 @@ fixture `Scripting area at Workbench`
3030
// Update after resolving https://redislabs.atlassian.net/browse/RI-3299
3131
test('Verify that user can resize scripting area in Workbench', async t => {
3232
const commandForSend = 'info';
33-
const offsetY = 200;
34-
const inputHeightStart = await workbenchPage.queryInput.clientHeight;
35-
const inputHeightEnd = inputHeightStart + 150;
33+
const offsetY = 100;
3634

3735
await workbenchPage.sendCommandInWorkbench(commandForSend);
3836
// Verify that user can run any script from CLI in Workbench and see the results
3937
await t.expect(workbenchPage.queryCardContainer.exists).ok('Query card was added');
4038
const sentCommandText = workbenchPage.queryCardCommand.withExactText(commandForSend);
4139
await t.expect(sentCommandText.exists).ok('Result of sent command exists');
4240

41+
const inputHeightStart = await workbenchPage.queryInput.clientHeight;
42+
4343
await t.hover(workbenchPage.resizeButtonForScriptingAndResults);
44-
await t.drag(workbenchPage.resizeButtonForScriptingAndResults, 0, offsetY, { speed: 0.01 });
44+
await t.drag(workbenchPage.resizeButtonForScriptingAndResults, 0, offsetY, { speed: 0.4 });
4545
// Verify that user can resize scripting area
46-
await t.expect(await workbenchPage.queryInput.clientHeight > inputHeightEnd).ok('Scripting area after resize has incorrect size');
46+
const inputHeightEnd = inputHeightStart + 20;
47+
await t.expect(await workbenchPage.queryInput.clientHeight).gt(inputHeightEnd, 'Scripting area after resize has incorrect size');
4748
});
4849
test('Verify that user when he have more than 10 results can request to view more results in Workbench', async t => {
4950
indexName = common.generateWord(5);

tests/e2e/tests/regression/browser/keys-all-databases.e2e.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { t } from 'testcafe';
1+
import { Selector, t } from 'testcafe';
22
import { env, rte } from '../../../helpers/constants';
33
import {
44
acceptLicenseTermsAndAddDatabaseApi,
@@ -40,8 +40,9 @@ const verifyKeysAdded = async(): Promise<void> => {
4040
await t.expect(notification).contains('Key has been added', 'The notification not correct');
4141
// Check that new key is displayed in the list
4242
await browserPage.searchByKeyName(keyName);
43-
const isKeyIsDisplayedInTheList = await browserPage.isKeyIsDisplayedInTheList(keyName);
44-
await t.expect(isKeyIsDisplayedInTheList).ok('The key is not added');
43+
const keyNameInTheList = Selector(`[data-testid="key-${keyName}"]`);
44+
await common.waitForElementNotVisible(browserPage.loader);
45+
await t.expect(keyNameInTheList.exists).ok(`${keyName} key is not added`);
4546
};
4647

4748
fixture `Work with keys in all types of databases`

tests/e2e/tests/regression/browser/onboarding.e2e.ts

Lines changed: 75 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const monitorPage = new MonitorPage();
2121
const setLocalStorageItem = ClientFunction((key: string, value: string) => window.localStorage.setItem(key, value));
2222

2323
fixture `Onboarding new user tests`
24-
.meta({type: 'regression', rte: rte.standalone, env: env.desktop })
24+
.meta({type: 'regression', rte: rte.standalone })
2525
.page(commonUrl)
2626
.beforeEach(async() => {
2727
await acceptTermsAddDatabaseOrConnectToRedisStack(ossStandaloneConfig, ossStandaloneConfig.databaseName);
@@ -31,77 +31,78 @@ fixture `Onboarding new user tests`
3131
.afterEach(async() => {
3232
await deleteDatabase(ossStandaloneConfig.databaseName);
3333
});
34-
test('Verify onbarding new user steps', async t => {
35-
await onBoardActions.startOnboarding();
36-
// verify browser step is visible
37-
await onBoardActions.verifyStepVisible('Browser');
38-
// move to next step
39-
await onBoardActions.clickNextStep();
40-
// verify tree view step is visible
41-
await onBoardActions.verifyStepVisible('Tree view');
42-
await onBoardActions.clickNextStep();
43-
await onBoardActions.verifyStepVisible('Filter and search');
44-
await onBoardActions.clickNextStep();
45-
// verify cli is opened
46-
await t.expect(cliPage.cliPanel.visible).ok('cli is not expanded');
47-
await onBoardActions.verifyStepVisible('CLI');
48-
await onBoardActions.clickNextStep();
49-
// verify command helper area is opened
50-
await t.expect(cliPage.commandHelperArea.visible).ok('command helper is not expanded');
51-
await onBoardActions.verifyStepVisible('Command Helper');
52-
await onBoardActions.clickNextStep();
53-
// verify profiler is opened
54-
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
55-
await onBoardActions.verifyStepVisible('Profiler');
56-
await onBoardActions.clickNextStep();
57-
// verify workbench page is opened
58-
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
59-
await onBoardActions.verifyStepVisible('Try Workbench!');
60-
// click back step button
61-
await onBoardActions.clickBackStep();
62-
// verify one step before is opened
63-
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
64-
await onBoardActions.verifyStepVisible('Profiler');
65-
await onBoardActions.clickNextStep();
66-
// verify workbench page is opened
67-
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
68-
await onBoardActions.verifyStepVisible('Try Workbench!');
69-
await onBoardActions.clickNextStep();
70-
await onBoardActions.verifyStepVisible('Explore and learn more');
71-
await onBoardActions.clickNextStep();
72-
// verify analysis tools page is opened
73-
await t.expect(memoryEfficiencyPage.noReportsText.visible).ok('analysis tools is not opened');
74-
await onBoardActions.verifyStepVisible('Database Analysis');
75-
await onBoardActions.clickNextStep();
76-
// verify slow log is opened
77-
await t.expect(slowLogPage.slowLogTable.visible).ok('slow log is not opened');
78-
await onBoardActions.verifyStepVisible('Slow Log');
79-
await onBoardActions.clickNextStep();
80-
// verify pub/sub page is opened
81-
await t.expect(pubSubPage.subscribeButton.visible).ok('pub/sub page is not opened');
82-
await onBoardActions.verifyStepVisible('Pub/Sub');
83-
await onBoardActions.clickNextStep();
84-
// verify last step of onboarding process is visible
85-
await onBoardActions.verifyStepVisible('Great job!');
86-
await onBoardActions.clickNextStep();
87-
// verify onboarding step completed successfully
88-
await onBoardActions.verifyOnboardingCompleted();
89-
});
90-
test('verify onboard new user skip tour', async() => {
34+
test
35+
.meta({ env: env.desktop })('Verify onbarding new user steps', async t => {
36+
await onBoardActions.startOnboarding();
37+
// verify browser step is visible
38+
await onBoardActions.verifyStepVisible('Browser');
39+
// move to next step
40+
await onBoardActions.clickNextStep();
41+
// verify tree view step is visible
42+
await onBoardActions.verifyStepVisible('Tree view');
43+
await onBoardActions.clickNextStep();
44+
await onBoardActions.verifyStepVisible('Filter and search');
45+
await onBoardActions.clickNextStep();
46+
// verify cli is opened
47+
await t.expect(cliPage.cliPanel.visible).ok('cli is not expanded');
48+
await onBoardActions.verifyStepVisible('CLI');
49+
await onBoardActions.clickNextStep();
50+
// verify command helper area is opened
51+
await t.expect(cliPage.commandHelperArea.visible).ok('command helper is not expanded');
52+
await onBoardActions.verifyStepVisible('Command Helper');
53+
await onBoardActions.clickNextStep();
54+
// verify profiler is opened
55+
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
56+
await onBoardActions.verifyStepVisible('Profiler');
57+
await onBoardActions.clickNextStep();
58+
// verify workbench page is opened
59+
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
60+
await onBoardActions.verifyStepVisible('Try Workbench!');
61+
// click back step button
62+
await onBoardActions.clickBackStep();
63+
// verify one step before is opened
64+
await t.expect(monitorPage.monitorArea.visible).ok('profiler is not expanded');
65+
await onBoardActions.verifyStepVisible('Profiler');
66+
await onBoardActions.clickNextStep();
67+
// verify workbench page is opened
68+
await t.expect(workBenchPage.mainEditorArea.visible).ok('workbench is not opened');
69+
await onBoardActions.verifyStepVisible('Try Workbench!');
70+
await onBoardActions.clickNextStep();
71+
await onBoardActions.verifyStepVisible('Explore and learn more');
72+
await onBoardActions.clickNextStep();
73+
// verify analysis tools page is opened
74+
await t.expect(memoryEfficiencyPage.noReportsText.visible).ok('analysis tools is not opened');
75+
await onBoardActions.verifyStepVisible('Database Analysis');
76+
await onBoardActions.clickNextStep();
77+
// verify slow log is opened
78+
await t.expect(slowLogPage.slowLogTable.visible).ok('slow log is not opened');
79+
await onBoardActions.verifyStepVisible('Slow Log');
80+
await onBoardActions.clickNextStep();
81+
// verify pub/sub page is opened
82+
await t.expect(pubSubPage.subscribeButton.visible).ok('pub/sub page is not opened');
83+
await onBoardActions.verifyStepVisible('Pub/Sub');
84+
await onBoardActions.clickNextStep();
85+
// verify last step of onboarding process is visible
86+
await onBoardActions.verifyStepVisible('Great job!');
87+
await onBoardActions.clickNextStep();
88+
// verify onboarding step completed successfully
89+
await onBoardActions.verifyOnboardingCompleted();
90+
});
91+
test
92+
.meta({ env: env.desktop })('verify onboard new user skip tour', async() => {
9193
// start onboarding process
92-
await onBoardActions.startOnboarding();
93-
// verify browser step is visible
94-
await onBoardActions.verifyStepVisible('Browser');
95-
// move to next step
96-
await onBoardActions.clickNextStep();
97-
// verify tree view step is visible
98-
await onBoardActions.verifyStepVisible('Tree view');
99-
// click skip tour
100-
await onBoardActions.clickSkipTour();
101-
// verify onboarding step completed successfully
102-
await onBoardActions.verifyOnboardingCompleted();
103-
await common.reloadPage();
104-
// verify onboarding step still not visible after refresh page
105-
await onBoardActions.verifyOnboardingCompleted();
106-
});
107-
94+
await onBoardActions.startOnboarding();
95+
// verify browser step is visible
96+
await onBoardActions.verifyStepVisible('Browser');
97+
// move to next step
98+
await onBoardActions.clickNextStep();
99+
// verify tree view step is visible
100+
await onBoardActions.verifyStepVisible('Tree view');
101+
// click skip tour
102+
await onBoardActions.clickSkipTour();
103+
// verify onboarding step completed successfully
104+
await onBoardActions.verifyOnboardingCompleted();
105+
await common.reloadPage();
106+
// verify onboarding step still not visible after refresh page
107+
await onBoardActions.verifyOnboardingCompleted();
108+
});

tests/e2e/tests/regression/browser/resize-columns.e2e.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ const longFieldName = common.generateSentence(20);
1919
const keys = [
2020
{ type: 'Hash',
2121
name: `${keyName}:1`,
22-
offsetX: 100,
22+
offsetX: 50,
2323
fieldWidthStart: 0,
2424
fieldWidthEnd: 0
2525
},
2626
{
2727
type: 'List',
2828
name: `${keyName}:2`,
29-
offsetX: 80,
29+
offsetX: 40,
3030
fieldWidthStart: 0,
3131
fieldWidthEnd: 0
3232
},
3333
{
3434
type: 'Zset',
3535
name: `${keyName}:3`,
36-
offsetX: 50,
36+
offsetX: 30,
3737
fieldWidthStart: 0,
3838
fieldWidthEnd: 0
3939
}
@@ -75,7 +75,7 @@ test('Resize of columns in Hash, List, Zset Key details', async t => {
7575
// Remember initial column width
7676
key.fieldWidthStart = await field.clientWidth;
7777
await t.hover(tableHeaderResizeTrigger);
78-
await t.drag(tableHeaderResizeTrigger, -key.offsetX, 0, { speed: 0.5 });
78+
await t.drag(tableHeaderResizeTrigger, -key.offsetX, 0, { speed: 0.4 });
7979
// Remember last column width
8080
key.fieldWidthEnd = await field.clientWidth;
8181
// Verify that user can resize columns for Hash, List, Zset Keys
@@ -96,9 +96,9 @@ test('Resize of columns in Hash, List, Zset Key details', async t => {
9696
// Go to 2nd database
9797
await myRedisDatabasePage.clickOnDBByName(databasesForAdding[1].databaseName);
9898
// Verify that resize saved for specific data type
99-
for(const key of keys) {
99+
for (const key of keys) {
100100
await browserPage.openKeyDetails(key.name);
101-
await t.expect(field.clientWidth).eql(key.fieldWidthEnd, `Resize context not saved for ${key.type} key when switching between databases`);
101+
await t.expect(field.clientWidth).within(key.fieldWidthEnd - 5, key.fieldWidthEnd + 5, `Resize context not saved for ${key.type} key when switching between databases`);
102102
}
103103

104104
// Change db index for 2nd database

tests/e2e/tests/regression/cli/cli-re-cluster.e2e.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { t } from 'testcafe';
1+
import { Selector, t } from 'testcafe';
22
import { env, rte } from '../../../helpers/constants';
33
import {
44
acceptLicenseTermsAndAddOSSClusterDatabase,
@@ -32,8 +32,9 @@ const verifyCommandsInCli = async(): Promise<void> => {
3232
await t.pressKey('enter');
3333
// Check that the key is added
3434
await browserPage.searchByKeyName(keyName);
35-
const isKeyIsDisplayedInTheList = await browserPage.isKeyIsDisplayedInTheList(keyName);
36-
await t.expect(isKeyIsDisplayedInTheList).ok('The key is added');
35+
const keyNameInTheList = Selector(`[data-testid="key-${keyName}"]`);
36+
await common.waitForElementNotVisible(browserPage.loader);
37+
await t.expect(keyNameInTheList.exists).ok(`${keyName} key is not added`);
3738
};
3839

3940
fixture `Work with CLI in all types of databases`

0 commit comments

Comments
 (0)