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
3 changes: 2 additions & 1 deletion tests/e2e/pageObjects/browser-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ export class BrowserPage {
streamEntryColumns = Selector(this.streamEntriesContainer.find('[aria-colcount]'));
streamEntryRows = Selector(this.streamEntriesContainer.find('[aria-rowcount]'));
streamEntryDate = Selector('[data-testid*=-date][data-testid*=stream-entry]');
streamEntryIdValue = Selector('.streamEntryId[data-testid*=stream-entry]');
streamFields = Selector('[data-test-id=stream-entries-container] .truncateText span');
streamEntryFields = Selector('[data-testid^=stream-entry-field]');
confirmationMessagePopover = Selector('div.euiPopover__panel');
confirmationMessagePopover = Selector('div.euiPopover__panel .euiText ');

/**
* Common part for Add any new key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('Verify that the Stream information is refreshed and the deleted entry is r
const fieldName = await browserPage.streamFields.nth(i).textContent;
await t.expect(fieldName).notEql(fieldForDeletion, 'The deleted entry is removed from the Stream');
}
await t.click(browserPage.fullScreenModeButton.nth(1));
await t.click(browserPage.fullScreenModeButton);
});
test('Verify that when user delete the last Entry from the Stream the Stream key is not deleted', async t => {
keyName = chance.word({length: 20});
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/tests/critical-path/browser/stream-key.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
const browserPage = new BrowserPage();
const chance = new Chance();

const keyName = chance.word({ length: 20 });
let keyName = chance.word({ length: 20 });
const keyField = chance.word({ length: 20 });
const keyValue = chance.word({ length: 20 });

Expand All @@ -28,6 +28,7 @@ fixture `Stream Key`
await deleteDatabase(ossStandaloneConfig.databaseName);
});
test('Verify that user can create Stream key via Add New Key form', async t => {
keyName = chance.word({ length: 20 });
// Add New Stream Key
await browserPage.addStreamKey(keyName, keyField, keyValue);
// Verify that user can see Stream details opened after key creation
Expand Down Expand Up @@ -64,6 +65,7 @@ test('Verify that user can add several fields and values during Stream key creat
await t.expect(browserPage.keyNameFormDetails.withExactText(keyName).visible).ok('Stream Key Name');
});
test('Verify that user can add new Stream Entry for Stream data type key which has an Entry ID, Field and Value', async t => {
keyName = chance.word({ length: 20 });
// Add New Stream Key
await browserPage.addStreamKey(keyName, keyField, keyValue);
// Verify that when user adds a new Entry with not existed Field name, a new Field is added to the Stream
Expand All @@ -81,6 +83,7 @@ test('Verify that user can add new Stream Entry for Stream data type key which h
await t.expect(paramsAfterExistedFieldAdding[1]).eql(toString(toNumber(paramsBeforeExistedFieldAdding[1]) + 1), 'Increased number of rows after adding');
});
test('Verify that during new entry adding to existing Stream, user can clear the value and the row itself', async t => {
keyName = chance.word({ length: 20 });
// Generate data for stream
const fields = [keyField, chance.word({ length: 20 })];
const values = [keyValue, chance.word({ length: 20 })];
Expand All @@ -107,6 +110,7 @@ test('Verify that during new entry adding to existing Stream, user can clear the
await t.expect(browserPage.streamField.count).eql(fieldsNumberAfterDeletion, 'Number of fields after deletion');
});
test('Verify that user can add several fields and values to the existing Stream Key', async t => {
keyName = chance.word({ length: 20 });
// Generate field value data
const entryQuantity = 10;
const fields: string[] = [];
Expand Down
6 changes: 4 additions & 2 deletions tests/e2e/tests/regression/browser/stream-key.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test('Verify that user can see all the columns are displayed by default for Stre
const fieldName = await browserPage.streamFields.nth(i).textContent;
await t.expect(fieldName).eql(fields[i], 'All the columns are displayed by default for Stream');
}
await t.click(browserPage.fullScreenModeButton.nth(1));
await t.click(browserPage.fullScreenModeButton);
});
test('Verify that the multi-line cell value tooltip is available on hover as per standard key details behavior', async t => {
keyName = chance.word({length: 20});
Expand All @@ -111,12 +111,14 @@ test('Verify that the multi-line cell value tooltip is available on hover as per
test('Verify that user can see a confirmation message when request to delete an entry in the Stream', async t => {
keyName = chance.word({length: 20});
field = 'fieldForRemoving';
const confirmationMessage = 'This Entry will be removed from';
const confirmationMessage = `will be removed from ${keyName}`;
//Add new Stream key with 1 field
await cliPage.sendCommandInCli(`XADD ${keyName} * ${field} ${value}`);
//Open key details and click on delete entry
await browserPage.openKeyDetails(keyName);
const entryId = await browserPage.streamEntryIdValue.textContent;
await t.click(browserPage.removeEntryButton);
//Check the confirmation message
await t.expect(browserPage.confirmationMessagePopover.textContent).contains(confirmationMessage, `The confirmation message ${keyName}`);
await t.expect(browserPage.confirmationMessagePopover.textContent).contains(entryId, `The confirmation message for removing Entry`);
});
2 changes: 1 addition & 1 deletion tests/e2e/tests/regression/cli/cli-command-helper.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ test
'BF.MEXISTS key item [item ...]',
'CMS.QUERY key item [item ...]',
'TDIGEST.RESET key',
'TOPK.LIST key numKeys withcount',
'TOPK.LIST key withcount',
'CF.ADD key item'
];
externalPageLinks = [
Expand Down