Skip to content

Commit 6d4c046

Browse files
committed
Merge branch 'main' into e2e/feature/RI-3530-investigate-testcafe-preparing-time
2 parents 30078bf + f1495b8 commit 6d4c046

File tree

61 files changed

+1604
-1866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1604
-1866
lines changed

redisinsight/ui/src/components/virtual-table/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ $footerHeight: 38px;
152152
}
153153

154154
:global(.key-list-table) {
155-
height: calc(100% - 58px);
155+
height: 100%;
156156
}
157157

158158
:global(.key-details-table) {

redisinsight/ui/src/pages/browser/BrowserPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ const BrowserPage = () => {
256256
}),
257257
}}
258258
>
259-
<>
259+
<div className={styles.leftPanelContent}>
260260
<KeysHeader
261261
keysState={keysState}
262262
loading={loading}
@@ -285,7 +285,7 @@ const BrowserPage = () => {
285285
loadMoreItems={loadMoreItems}
286286
/>
287287
)}
288-
</>
288+
</div>
289289
</EuiResizablePanel>
290290

291291
<EuiResizableButton

redisinsight/ui/src/pages/browser/components/key-list/styles.module.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
}
1515

1616
.table {
17-
height: calc(100% - 48px);
18-
19-
&__withoutFooter {
20-
height: calc(100% - 50px) !important;
21-
}
17+
height: 100%;
2218
}
2319

2420
:global(.show-cli) .table {

redisinsight/ui/src/pages/browser/components/key-tree/styles.module.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
.body {
2222
display: flex;
23-
height: calc(100% - 20px);
23+
height: 100%;
2424

2525
:global(.ReactVirtualized__Table__headerRow) {
2626
border: none !important;
@@ -53,19 +53,21 @@
5353
position: relative;
5454
padding-top: 6px;
5555

56-
height: calc(100% - 90px);
56+
height: 100%;
5757

5858
flex: 1;
59+
display: flex;
60+
flex-direction: column;
5961
}
6062

6163
.treeContent {
62-
height: calc(100% - 25px);
64+
height: 100%;
6365
position: relative;
6466
width: 100%;
6567
}
6668

6769
.list {
68-
height: calc(100% + 20px);
70+
height: 100%;
6971
flex: 3;
7072
min-width: 400px;
7173
}

redisinsight/ui/src/pages/browser/styles.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ $breakpoint-to-hide-resize-panel: 1124px;
9696
width: 100% !important;
9797
}
9898
}
99+
100+
.leftPanelContent {
101+
display: flex;
102+
flex-direction: column;
103+
height: 100%;
104+
}

redisinsight/ui/src/pages/pubSub/components/messages-list/MessagesList/styles.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@
8282
bottom: 10px;
8383
right: 28px;
8484
background-color: var(--euiColorSecondary) !important;
85+
color: var(--euiColorPrimaryText) !important;
8586
width: 36px !important;
8687
height: 36px !important;
8788

88-
box-shadow: 0px 3px 6px #00000099 !important;
89+
box-shadow: 0 3px 6px #00000099 !important;
8990
border-radius: 18px !important;
9091

9192
svg {

tests/e2e/pageObjects/browser-page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export class BrowserPage {
9191
editZsetButton = Selector('[data-testid^=zset-edit-button-]');
9292
editListButton = Selector('[data-testid^=edit-list-button-]');
9393
workbenchLinkButton = Selector('[data-test-subj=workbench-page-btn]');
94+
cancelStreamGroupBtn = Selector('[data-testid=cancel-stream-groups-btn]');
9495
//CONTAINERS
9596
streamGroupsContainer = Selector('[data-testid=stream-groups-container]');
9697
streamConsumersContainer = Selector('[data-testid=stream-consumers-container]');

tests/e2e/tests/regression/browser/add-keys.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ test('Verify that user can create different types(string, number, null, array, b
3030
await browserPage.addJsonKey(jsonKeys[i][0], jsonKeys[i][1]);
3131
await t.click(browserPage.toastCloseButton);
3232
await t.click(browserPage.refreshKeysButton);
33-
await t.expect(await browserPage.isKeyIsDisplayedInTheList(jsonKeys[i][0])).ok('New keys is displayed');
33+
await t.expect(await browserPage.isKeyIsDisplayedInTheList(jsonKeys[i][0])).ok('New keys are not displayed');
3434
// Add additional check for array elements
3535
if (jsonKeys[i][0].includes('array')) {
3636
for (const j of JSON.parse(jsonKeys[i][1])) {
37-
await t.expect(browserPage.jsonScalarValue.withText(j.toString()).exists).ok('JSON value');
37+
await t.expect(browserPage.jsonScalarValue.withText(j.toString()).exists).ok('JSON value not correct');
3838
}
3939
}
4040
else {
41-
await t.expect(browserPage.jsonKeyValue.withText(jsonKeys[i][1]).exists).ok('JSON value');
41+
await t.expect(browserPage.jsonKeyValue.withText(jsonKeys[i][1]).exists).ok('JSON value not correct');
4242
}
4343
}
4444
});
Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Chance } from 'chance';
21
import { rte } from '../../../helpers/constants';
32
import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
43
import { BrowserPage, CliPage } from '../../../pageObjects';
@@ -7,15 +6,16 @@ import {
76
ossStandaloneConfig
87
} from '../../../helpers/conf';
98
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
9+
import { Common } from '../../../helpers/common';
1010

1111
const browserPage = new BrowserPage();
1212
const cliPage = new CliPage();
13-
const chance = new Chance();
13+
const common = new Common();
1414

15-
let keyName = chance.word({ length: 20 });
16-
let consumerGroupName = chance.word({ length: 20 });
17-
const keyField = chance.word({ length: 20 });
18-
const keyValue = chance.word({ length: 20 });
15+
let keyName = common.generateWord(20);
16+
let consumerGroupName = common.generateWord(20);
17+
const keyField = common.generateWord(20);
18+
const keyValue = common.generateWord(20);
1919

2020
fixture `Consumer group`
2121
.meta({ type: 'regression', rte: rte.standalone })
@@ -24,83 +24,76 @@ fixture `Consumer group`
2424
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
2525
})
2626
.afterEach(async t => {
27-
//Clear and delete database
27+
// Clear and delete database
2828
if (await browserPage.closeKeyButton.visible){
2929
await t.click(browserPage.closeKeyButton);
3030
}
3131
await browserPage.deleteKeyByName(keyName);
3232
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
3333
});
3434
test('Verify that when user enter invalid Group Name the error message appears', async t => {
35-
keyName = chance.word({ length: 20 });
36-
consumerGroupName = chance.word({ length: 20 });
35+
const message = 'Your Key has no Consumer Groups available.';
3736
const error = 'BUSYGROUP Consumer Group name already exists';
38-
// Add New Stream Key
39-
await browserPage.addStreamKey(keyName, keyField, keyValue);
40-
// Open Stream consumer groups and add group
41-
await t.click(browserPage.streamTabGroups);
42-
await browserPage.createConsumerGroup(consumerGroupName);
43-
// Verify the error message
44-
await t.click(browserPage.streamTabGroups);
45-
await browserPage.createConsumerGroup(consumerGroupName);
46-
await t.expect(browserPage.errorMessage.textContent).contains(error, 'The error message that the Group name already exists');
47-
});
48-
test('Verify that when user enter invalid format ID the error message appears', async t => {
49-
keyName = chance.word({ length: 20 });
50-
consumerGroupName = chance.word({ length: 20 });
51-
const error = 'ID format is not correct';
37+
const errorFormat = 'ID format is not correct';
5238
const invalidEntryIds = [
5339
'qwerty12344545',
5440
'16545941463181654594146318'
5541
];
42+
keyName = common.generateWord(20);
43+
consumerGroupName = common.generateWord(20);
44+
5645
// Add New Stream Key
5746
await browserPage.addStreamKey(keyName, keyField, keyValue);
58-
// Open Stream consumer groups and enter invalid EntryIds
47+
// Open Stream consumer groups and check message
5948
await t.click(browserPage.streamTabGroups);
49+
// Verify that user can see the message when there are no Consumer Groups
50+
await t.expect(browserPage.streamGroupsContainer.textContent).contains(message, 'No Consumer Groups message not displayed');
51+
52+
// Open Stream consumer groups and enter invalid EntryIds
6053
await t.click(browserPage.addKeyValueItemsButton);
61-
for(const entryId of invalidEntryIds){
54+
// Verify that when user enter invalid format ID the error message appears
55+
for (const entryId of invalidEntryIds) {
6256
await t.typeText(browserPage.consumerIdInput, entryId, { replace: true, paste: true });
6357
await t.click(browserPage.saveGroupsButton);
64-
await t.expect(browserPage.entryIdError.textContent).eql(error, 'The invalid Id error message');
58+
await t.expect(browserPage.entryIdError.textContent).eql(errorFormat, 'The invalid Id error message not displayed');
6559
}
66-
});
67-
test('Verify that user can see the message when there are no Consumer Groups', async t => {
68-
keyName = chance.word({ length: 20 });
69-
const message = 'Your Key has no Consumer Groups available.';
70-
// Add New Stream Key
71-
await browserPage.addStreamKey(keyName, keyField, keyValue);
72-
// Open Stream consumer groups and check message
60+
61+
await t.click(browserPage.cancelStreamGroupBtn);
62+
await browserPage.createConsumerGroup(consumerGroupName);
63+
// Verify the error message
7364
await t.click(browserPage.streamTabGroups);
74-
await t.expect(browserPage.streamGroupsContainer.textContent).contains(message, 'The Consumer Groups message');
65+
await browserPage.createConsumerGroup(consumerGroupName);
66+
await t.expect(browserPage.errorMessage.textContent).contains(error, 'The error message that the Group name already exists not displayed');
7567
});
7668
test('Verify that user can sort Consumer Group column: A>Z / Z>A(A>Z is default table sorting)', async t => {
77-
keyName = chance.word({ length: 20 });
69+
keyName = common.generateWord(20);
7870
const consumerGroupNames = [
7971
'agroup',
8072
'bgroup',
8173
'zgroup'
8274
];
75+
8376
// Add New Stream Key
8477
await browserPage.addStreamKey(keyName, keyField, keyValue);
8578
// Open Stream consumer groups and add few groups
8679
await t.click(browserPage.streamTabGroups);
8780
for(const group of consumerGroupNames){
8881
await browserPage.createConsumerGroup(group);
8982
}
90-
//Verify default sorting
83+
// Verify default sorting
9184
const groupsCount = await browserPage.streamGroupName.count;
9285
for(let i = 0; i < groupsCount; i++){
93-
await t.expect(browserPage.streamGroupName.nth(i).textContent).contains(consumerGroupNames[i], 'The Consumer Groups default sorting');
86+
await t.expect(browserPage.streamGroupName.nth(i).textContent).contains(consumerGroupNames[i], 'The Consumer Groups default sorting not working');
9487
}
95-
//Verify the Z>A sorting
88+
// Verify the Z>A sorting
9689
await t.click(browserPage.scoreButton.nth(0));
9790
for(let i = 0; i < groupsCount; i++){
98-
await t.expect(browserPage.streamGroupName.nth(i).textContent).contains(consumerGroupNames[groupsCount - 1 - i], 'The Consumer Groups Z>A sorting');
91+
await t.expect(browserPage.streamGroupName.nth(i).textContent).contains(consumerGroupNames[groupsCount - 1 - i], 'The Consumer Groups Z>A sorting not working');
9992
}
10093
});
10194
test('Verify that A>Z is default table sorting in Consumer column', async t => {
102-
keyName = chance.word({ length: 20 });
103-
consumerGroupName = chance.word({ length: 20 });
95+
keyName = common.generateWord(20);
96+
consumerGroupName = common.generateWord(20);
10497
const consumerNames = [
10598
'Alice',
10699
'Zalice'
@@ -112,23 +105,24 @@ test('Verify that A>Z is default table sorting in Consumer column', async t => {
112105
`XREADGROUP GROUP ${consumerGroupName} ${consumerNames[0]} COUNT 1 STREAMS ${keyName} >`,
113106
`XREADGROUP GROUP ${consumerGroupName} ${consumerNames[1]} COUNT 1 STREAMS ${keyName} >`
114107
];
115-
//Add New Stream Key with groups and consumers
108+
109+
// Add New Stream Key with groups and consumers
116110
for(const command of cliCommands){
117111
await cliPage.sendCommandInCli(command);
118112
}
119-
//Open Stream consumer info view
113+
// Open Stream consumer info view
120114
await browserPage.openKeyDetails(keyName);
121115
await t.click(browserPage.streamTabGroups);
122116
await t.click(browserPage.consumerGroup);
123-
//Verify default sorting
117+
// Verify default sorting
124118
const consumerCount = await browserPage.streamConsumerName.count;
125119
for(let i = 0; i < consumerCount; i++){
126-
await t.expect(browserPage.streamConsumerName.nth(i).textContent).contains(consumerNames[i], 'The Consumers default sorting');
120+
await t.expect(browserPage.streamConsumerName.nth(i).textContent).contains(consumerNames[i], 'The Consumers default sorting not working');
127121
}
128122
});
129123
test('Verify that user can see error message if enter invalid last delivered ID', async t => {
130-
keyName = chance.word({ length: 20 });
131-
let consumerGroupName = chance.word({ length: 20 });
124+
keyName = common.generateWord(20);
125+
const consumerGroupName = common.generateWord(20);
132126
const cliCommands = [
133127
`XGROUP CREATE ${keyName} ${consumerGroupName} $ MKSTREAM`,
134128
`XADD ${keyName} * message apple`,
@@ -139,6 +133,7 @@ test('Verify that user can see error message if enter invalid last delivered ID'
139133
'12345678901242532366121324'
140134
];
141135
const errorMessage = 'ID format is not correct';
136+
142137
// Add New Stream Key with groups and consumers
143138
for(const command of cliCommands){
144139
await cliPage.sendCommandInCli(command);
@@ -153,6 +148,6 @@ test('Verify that user can see error message if enter invalid last delivered ID'
153148
await t.typeText(browserPage.lastIdInput, id, { replace: true });
154149
await t.click(browserPage.saveButton);
155150
await t.expect(browserPage.streamGroupId.textContent).eql(idBefore, 'The last delivered ID is not modified');
156-
await t.expect(browserPage.entryIdError.textContent).eql(errorMessage, 'The error message');
151+
await t.expect(browserPage.entryIdError.textContent).eql(errorMessage, 'The error message not displayed');
157152
}
158153
});

0 commit comments

Comments
 (0)