|
37 | 37 | test
|
38 | 38 | .meta({ rte: rte.standalone })
|
39 | 39 | ('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"`; |
40 | 41 | //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 }); |
42 | 43 | await t.pressKey('left');
|
43 | 44 | await t.click(workbenchPage.monacoWidget);
|
44 | 45 | //Do some changes in the Editor and close by “X” control
|
|
47 | 48 | //Verify that editor is closed and changes are not saved
|
48 | 49 | let commandAfter = await workbenchPage.scriptsLines.textContent;
|
49 | 50 | 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'); |
51 | 52 | //Re-open the Editor and do some changes and close by shortcut “ESC”
|
52 | 53 | await t.click(workbenchPage.monacoWidget);
|
53 | 54 | await t.typeText(workbenchPage.queryInput.nth(1), 'test', { replace: true });
|
54 | 55 | await t.pressKey('esc');
|
55 | 56 | //Verify that editor is closed and changes are not saved
|
56 | 57 | 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'); |
58 | 59 | });
|
59 | 60 | test
|
60 | 61 | .meta({ rte: rte.standalone })
|
|
112 | 113 | await t.expect(workbenchPage.queryInput.nth(1).clientHeight).eql(editorHeight + offsetY, 'The non-Redis editor is resized by the top border');
|
113 | 114 | //Check that user can resize editor by bottom border
|
114 | 115 | 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 }); |
116 | 117 | await t.expect(workbenchPage.queryInput.nth(1).clientHeight).eql(editorHeight - offsetY, 'The non-Redis editor is resized by the bottom border');
|
117 | 118 | });
|
0 commit comments