Skip to content

Commit ba2a4a8

Browse files
fix e2es
1 parent 7d2bb83 commit ba2a4a8

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

tests/e2e/pageObjects/browser-page.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,10 @@ export class BrowserPage {
172172
streamEntryColumns = Selector(this.streamEntriesContainer.find('[aria-colcount]'));
173173
streamEntryRows = Selector(this.streamEntriesContainer.find('[aria-rowcount]'));
174174
streamEntryDate = Selector('[data-testid*=-date][data-testid*=stream-entry]');
175+
streamEntryIdValue = Selector('.streamEntryId[data-testid*=stream-entry]');
175176
streamFields = Selector('[data-test-id=stream-entries-container] .truncateText span');
176177
streamEntryFields = Selector('[data-testid^=stream-entry-field]');
177-
confirmationMessagePopover = Selector('div.euiPopover__panel');
178+
confirmationMessagePopover = Selector('div.euiPopover__panel .euiText ');
178179

179180
/**
180181
* Common part for Add any new key

tests/e2e/tests/critical-path/browser/stream-key-entry-deletion.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('Verify that the Stream information is refreshed and the deleted entry is r
5555
const fieldName = await browserPage.streamFields.nth(i).textContent;
5656
await t.expect(fieldName).notEql(fieldForDeletion, 'The deleted entry is removed from the Stream');
5757
}
58-
await t.click(browserPage.fullScreenModeButton.nth(1));
58+
await t.click(browserPage.fullScreenModeButton);
5959
});
6060
test('Verify that when user delete the last Entry from the Stream the Stream key is not deleted', async t => {
6161
keyName = chance.word({length: 20});

tests/e2e/tests/critical-path/browser/stream-key.e2e.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
const browserPage = new BrowserPage();
1313
const chance = new Chance();
1414

15-
const keyName = chance.word({ length: 20 });
15+
let keyName = chance.word({ length: 20 });
1616
const keyField = chance.word({ length: 20 });
1717
const keyValue = chance.word({ length: 20 });
1818

@@ -28,6 +28,7 @@ fixture `Stream Key`
2828
await deleteDatabase(ossStandaloneConfig.databaseName);
2929
});
3030
test('Verify that user can create Stream key via Add New Key form', async t => {
31+
keyName = chance.word({ length: 20 });
3132
// Add New Stream Key
3233
await browserPage.addStreamKey(keyName, keyField, keyValue);
3334
// Verify that user can see Stream details opened after key creation
@@ -64,6 +65,7 @@ test('Verify that user can add several fields and values during Stream key creat
6465
await t.expect(browserPage.keyNameFormDetails.withExactText(keyName).visible).ok('Stream Key Name');
6566
});
6667
test('Verify that user can add new Stream Entry for Stream data type key which has an Entry ID, Field and Value', async t => {
68+
keyName = chance.word({ length: 20 });
6769
// Add New Stream Key
6870
await browserPage.addStreamKey(keyName, keyField, keyValue);
6971
// Verify that when user adds a new Entry with not existed Field name, a new Field is added to the Stream
@@ -81,6 +83,7 @@ test('Verify that user can add new Stream Entry for Stream data type key which h
8183
await t.expect(paramsAfterExistedFieldAdding[1]).eql(toString(toNumber(paramsBeforeExistedFieldAdding[1]) + 1), 'Increased number of rows after adding');
8284
});
8385
test('Verify that during new entry adding to existing Stream, user can clear the value and the row itself', async t => {
86+
keyName = chance.word({ length: 20 });
8487
// Generate data for stream
8588
const fields = [keyField, chance.word({ length: 20 })];
8689
const values = [keyValue, chance.word({ length: 20 })];
@@ -107,6 +110,7 @@ test('Verify that during new entry adding to existing Stream, user can clear the
107110
await t.expect(browserPage.streamField.count).eql(fieldsNumberAfterDeletion, 'Number of fields after deletion');
108111
});
109112
test('Verify that user can add several fields and values to the existing Stream Key', async t => {
113+
keyName = chance.word({ length: 20 });
110114
// Generate field value data
111115
const entryQuantity = 10;
112116
const fields: string[] = [];

tests/e2e/tests/regression/browser/stream-key.e2e.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ test('Verify that user can see all the columns are displayed by default for Stre
9090
const fieldName = await browserPage.streamFields.nth(i).textContent;
9191
await t.expect(fieldName).eql(fields[i], 'All the columns are displayed by default for Stream');
9292
}
93-
await t.click(browserPage.fullScreenModeButton.nth(1));
93+
await t.click(browserPage.fullScreenModeButton);
9494
});
9595
test('Verify that the multi-line cell value tooltip is available on hover as per standard key details behavior', async t => {
9696
keyName = chance.word({length: 20});
@@ -111,12 +111,14 @@ test('Verify that the multi-line cell value tooltip is available on hover as per
111111
test('Verify that user can see a confirmation message when request to delete an entry in the Stream', async t => {
112112
keyName = chance.word({length: 20});
113113
field = 'fieldForRemoving';
114-
const confirmationMessage = 'This Entry will be removed from';
114+
const confirmationMessage = `will be removed from ${keyName}`;
115115
//Add new Stream key with 1 field
116116
await cliPage.sendCommandInCli(`XADD ${keyName} * ${field} ${value}`);
117117
//Open key details and click on delete entry
118118
await browserPage.openKeyDetails(keyName);
119+
const entryId = await browserPage.streamEntryIdValue.textContent;
119120
await t.click(browserPage.removeEntryButton);
120121
//Check the confirmation message
121122
await t.expect(browserPage.confirmationMessagePopover.textContent).contains(confirmationMessage, `The confirmation message ${keyName}`);
123+
await t.expect(browserPage.confirmationMessagePopover.textContent).contains(entryId, `The confirmation message for removing Entry`);
122124
});

tests/e2e/tests/regression/cli/cli-command-helper.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ test
217217
'BF.MEXISTS key item [item ...]',
218218
'CMS.QUERY key item [item ...]',
219219
'TDIGEST.RESET key',
220-
'TOPK.LIST key numKeys withcount',
220+
'TOPK.LIST key withcount',
221221
'CF.ADD key item'
222222
];
223223
externalPageLinks = [

0 commit comments

Comments
 (0)