Skip to content

Commit

Permalink
fix: Copy terminal selection on Linux (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpoulter authored Feb 27, 2024
1 parent 92b7b6b commit f57cd0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/pageobjects/bottomBar/Views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ export class TerminalView extends ChannelView<typeof TerminalViewLocators> {
await workbench.executeCommand('terminal select all')
// eslint-disable-next-line wdio/no-pause
await browser.pause(500)
await browser.keys([Key.Ctrl, 'c'])
await browser.executeWorkbench((vscode) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
vscode.commands.executeCommand('workbench.action.terminal.copySelection')
})
// eslint-disable-next-line wdio/no-pause
await browser.pause(500)
const text = await clipboard.read()
Expand Down
4 changes: 2 additions & 2 deletions test/specs/bottombar.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ describe('bottombar', () => {
expect(await outputView.getText()).toEqual(['Hello World!'])
})

skip('CI')('can read from terminal @skipWeb', async () => {
it('can read from terminal @skipWeb', async () => {
const terminalView = await bottomBar.openTerminalView()
const text = await terminalView.getText()
expect(text).toContain(':wdio-vscode-service')
expect(text).toContain('wdio-vscode-service')
})
})

0 comments on commit f57cd0b

Please sign in to comment.