Skip to content

Commit 349b2ab

Browse files
e2e - test fixes
1 parent 7cf69b9 commit 349b2ab

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

tests/e2e/pageObjects/browser-page.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export class BrowserPage {
7070
addNewStreamEntry = Selector('[data-testid=add-key-value-items-btn]');
7171
removeEntryButton = Selector('[data-testid^=remove-entry-button-]');
7272
confirmRemoveEntryButton = Selector('[data-testid^=remove-entry-button-]').withExactText('Remove');
73+
clearStreamEntryInputs = Selector('[data-testid=remove-item]');
7374
//LINKS
7475
internalLinkToWorkbench = Selector('[data-testid=internal-workbench-link]');
7576
//OPTION ELEMENTS
@@ -110,7 +111,7 @@ export class BrowserPage {
110111
streamEntryId = Selector('[data-testid=entryId]');
111112
streamField = Selector('[data-testid=field-name]');
112113
streamValue = Selector('[data-testid=field-value]');
113-
addStreamRow = Selector('[data-testid=add-new-row]');
114+
addStreamRow = Selector('[data-testid=add-new-item]');
114115
streamFieldsValues = Selector('[data-testid^=stream-entry-field-]');
115116
//TEXT ELEMENTS
116117
keySizeDetails = Selector('[data-testid=key-size-text]');
@@ -219,18 +220,19 @@ export class BrowserPage {
219220
* @param value The key value
220221
* @param TTL The Time to live value of the key (optional parameter)
221222
*/
222-
async addJsonKey(keyName: string, value = ' ', TTL?: string): Promise<void> {
223+
async addJsonKey(keyName: string, value: string, TTL?: string): Promise<void> {
223224
await t.click(this.plusAddKeyButton);
224225
await t.click(this.keyTypeDropDown);
225226
await t.click(this.jsonOption);
226227
await t.click(this.addKeyNameInput);
227228
await t.typeText(this.addKeyNameInput, keyName);
228229
await t.click(this.jsonKeyValueInput);
229-
await t.typeText(this.jsonKeyValueInput, value);
230+
await t.typeText(this.jsonKeyValueInput, value, { paste: true });
230231
if (TTL !== undefined) {
231232
await t.click(this.keyTTLInput);
232233
await t.typeText(this.keyTTLInput, TTL);
233234
}
235+
await t.debug();
234236
await t.click(this.addKeyButton);
235237
}
236238

tests/e2e/tests/critical-path/browser/stream-key.e2e.ts.ts renamed to 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
@@ -20,7 +20,7 @@ const values = [
2020
'27'
2121
];
2222

23-
fixture `Stream key`
23+
fixture `Stream key entry deletion`
2424
.meta({
2525
type: 'critical_path',
2626
rte: rte.standalone

tests/e2e/tests/critical-path/monitor/save-commands.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { rte } from '../../../helpers/constants';
1111
const monitorPage = new MonitorPage();
1212
const cliPage = new CliPage();
1313
const tempDir = os.tmpdir();
14-
const downloadsDir = `${process.env.HOME}\\Downloads`;
14+
const downloadsDir = `C:*****\\Downloads`;
1515

1616
fixture `Save commands`
1717
.meta({ type: 'regression' })

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ fixture `Different JSON types creation`
2424
await cliPage.sendCommandInCli(commandString);
2525
await deleteDatabase(ossStandaloneConfig.databaseName);
2626
});
27-
test('Verify that user can create different types(string, number, null, array, boolean) of JSON', async t => {
27+
// skipped due the issue https://redislabs.atlassian.net/browse/RI-2966
28+
test.skip('Verify that user can create different types(string, number, null, array, boolean) of JSON', async t => {
2829
for (let i = 0; i < jsonKeys.length; i++) {
2930
await browserPage.addJsonKey(jsonKeys[i][0], jsonKeys[i][1]);
3031
await t.click(browserPage.toastCloseButton);

tests/e2e/tests/regression/browser/last-refresh.e2e.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test
3030
//Hover on the refresh icon
3131
await t.hover(browserPage.refreshKeysButton);
3232
//Verify the last update info
33-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nless than a minute ago', 'tooltip text');
33+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nnow', 'tooltip text');
3434
});
3535
test
3636
.meta({ rte: rte.standalone })
@@ -43,11 +43,11 @@ test
4343
await t.wait(120000);
4444
//Hover on the refresh icon
4545
await t.hover(browserPage.refreshKeyButton);
46-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\n2 minutes ago', 'tooltip text');
46+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\n2 min', 'tooltip text');
4747
//Click on Refresh and check last refresh
4848
await t.click(browserPage.refreshKeyButton);
4949
await t.hover(browserPage.refreshKeyButton);
50-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nless than a minute ago', 'tooltip text');
50+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nnow', 'tooltip text');
5151
});
5252
test
5353
.meta({ rte: rte.standalone })
@@ -59,7 +59,7 @@ test
5959
//Hover on the refresh icon
6060
await t.hover(browserPage.refreshKeyButton);
6161
//Verify the last update info
62-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nless than a minute ago', 'tooltip text');
62+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nnow', 'tooltip text');
6363
});
6464
test
6565
.meta({ rte: rte.standalone })
@@ -71,9 +71,9 @@ test
7171
//Hover on the keys refresh icon
7272
await t.hover(browserPage.refreshKeysButton);
7373
//Verify the last update info
74-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nless than a minute ago', 'tooltip text');
74+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nnow', 'tooltip text');
7575
//Hover on the key in details refresh icon
7676
await t.hover(browserPage.refreshKeyButton);
7777
//Verify the last update info
78-
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nless than a minute ago', 'tooltip text');
78+
await t.expect(browserPage.tooltip.innerText).contains('Last Refresh\nnow', 'tooltip text');
7979
});

0 commit comments

Comments
 (0)