Skip to content

Commit 353645b

Browse files
Merge pull request #522 from RedisInsight/feature/e2e-test-fixes
fix e2e tests
2 parents 279733a + e1cf61a commit 353645b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/e2e/tests/critical-path/browser/filtering.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ test
8080
for (const { textType } of keyTypes) {
8181
await browserPage.selectFilterGroupType(textType);
8282
//Check key type label
83-
await t.expect(browserPage.filteringLabel.getAttribute('title')).eql(textType.toUpperCase( ), `The label of type ${textType} is dispalyed`);
83+
await t.expect((await browserPage.filteringLabel.textContent).toUpperCase).eql(textType.toUpperCase, `The label of type ${textType} is dispalyed`);
8484
await t.expect(browserPage.keysNumberOfResults.visible).ok(`The filter ${textType} is applied`);
8585
}
8686
//Check removing of the label

tests/e2e/tests/regression/workbench/cypher.e2e.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ test
3737
test
3838
.meta({ rte: rte.standalone })
3939
('Verify that when user clicks on the “X” control or use shortcut “ESC” popover Editor is closed and changes are not saved', async t => {
40+
const cypherCommand = `${command} "query"`;
4041
//Type command and open the popover editor
41-
await t.typeText(workbenchPage.queryInput, `${command} "query"`, { replace: true });
42+
await t.typeText(workbenchPage.queryInput, cypherCommand, { replace: true });
4243
await t.pressKey('left');
4344
await t.click(workbenchPage.monacoWidget);
4445
//Do some changes in the Editor and close by “X” control
@@ -47,14 +48,14 @@ test
4748
//Verify that editor is closed and changes are not saved
4849
let commandAfter = await workbenchPage.scriptsLines.textContent;
4950
await t.expect(workbenchPage.queryInput.nth(1).exists).notOk('The popover Editor is closed');
50-
await t.expect(commandAfter.replace(/\s/g, ' ')).eql(command, 'The changes are not saved from the Editor');
51+
await t.expect(commandAfter.replace(/\s/g, ' ')).eql(cypherCommand, 'The changes are not saved from the Editor');
5152
//Re-open the Editor and do some changes and close by shortcut “ESC”
5253
await t.click(workbenchPage.monacoWidget);
5354
await t.typeText(workbenchPage.queryInput.nth(1), 'test', { replace: true });
5455
await t.pressKey('esc');
5556
//Verify that editor is closed and changes are not saved
5657
commandAfter = await workbenchPage.scriptsLines.textContent;
57-
await t.expect(commandAfter.replace(/\s/g, ' ')).eql(command, 'The changes are not saved from the Editor');
58+
await t.expect(commandAfter.replace(/\s/g, ' ')).eql(cypherCommand, 'The changes are not saved from the Editor');
5859
});
5960
test
6061
.meta({ rte: rte.standalone })
@@ -112,6 +113,6 @@ test
112113
await t.expect(workbenchPage.queryInput.nth(1).clientHeight).eql(editorHeight + offsetY, 'The non-Redis editor is resized by the top border');
113114
//Check that user can resize editor by bottom border
114115
editorHeight = await workbenchPage.queryInput.nth(1).clientHeight;
115-
await t.drag(workbenchPage.nonRedisEditorResizeBottom.nth(1), 0, -offsetY, { speed: 0.4 });
116+
await t.drag(workbenchPage.nonRedisEditorResizeBottom, 0, -offsetY, { speed: 0.4 });
116117
await t.expect(workbenchPage.queryInput.nth(1).clientHeight).eql(editorHeight - offsetY, 'The non-Redis editor is resized by the bottom border');
117118
});

0 commit comments

Comments
 (0)