|
11 | 11 | import 'reflect-metadata'; |
12 | 12 |
|
13 | 13 | import { e2eContainer } from '../../configs/inversify.config'; |
14 | | -import { |
15 | | - ActivityBar, |
16 | | - ContextMenu, |
17 | | - EditorView, |
18 | | - Key, |
19 | | - Locators, |
20 | | - NewScmView, |
21 | | - SingleScmProvider, |
22 | | - TextEditor, |
23 | | - ViewControl, |
24 | | - ViewSection |
25 | | -} from 'monaco-page-objects'; |
| 14 | +import { ActivityBar, ContextMenu, Key, Locators, NewScmView, SingleScmProvider, ViewControl, ViewSection } from 'monaco-page-objects'; |
26 | 15 | import { expect } from 'chai'; |
27 | 16 | import { OauthPage } from '../../pageobjects/git-providers/OauthPage'; |
28 | 17 | import { StringUtil } from '../../utils/StringUtil'; |
@@ -135,10 +124,17 @@ suite( |
135 | 124 | test('Make changes to the file', async function (): Promise<void> { |
136 | 125 | Logger.debug(`projectSection.openItem: "${fileToChange}"`); |
137 | 126 | await projectSection.openItem(testRepoProjectName, fileToChange); |
138 | | - const editor: TextEditor = (await new EditorView().openEditor(fileToChange)) as TextEditor; |
139 | 127 | await driverHelper.waitVisibility(webCheCodeLocators.Editor.inputArea); |
140 | | - Logger.debug(`editor.setText: "${changesToCommit}"`); |
141 | | - await editor.setText(changesToCommit); |
| 128 | + await driverHelper.getDriver().findElement(webCheCodeLocators.Editor.inputArea).click(); |
| 129 | + |
| 130 | + Logger.debug('Clearing the editor with Ctrl+A'); |
| 131 | + await driverHelper.getDriver().actions().keyDown(Key.CONTROL).sendKeys('a').keyUp(Key.CONTROL).perform(); |
| 132 | + await driverHelper.wait(500); |
| 133 | + Logger.debug('Deleting selected text'); |
| 134 | + await driverHelper.getDriver().actions().sendKeys(Key.DELETE).perform(); |
| 135 | + await driverHelper.wait(500); |
| 136 | + Logger.debug(`Entering text: "${changesToCommit}"`); |
| 137 | + await driverHelper.getDriver().actions().sendKeys(changesToCommit).perform(); |
142 | 138 | }); |
143 | 139 |
|
144 | 140 | test('Open a source control manager', async function (): Promise<void> { |
|
0 commit comments