clipboard
filip mertens 11 months ago
parent bb81c55337
commit 7aa2694733
  1. 2
      .circleci/config.yml
  2. 21
      apps/remix-ide-e2e/src/commands/enableClipBoard.ts
  3. 1
      apps/remix-ide-e2e/src/helpers/init.ts
  4. 13
      apps/remix-ide-e2e/src/tests/clipboard.test.ts

@ -3,7 +3,7 @@ version: 2.1
parameters:
run_flaky_tests:
type: boolean
default: false
default: true
orbs:
browser-tools: circleci/browser-tools@1.4.4
jobs:

@ -0,0 +1,21 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class EnableClipBoard extends EventEmitter {
command (this: NightwatchBrowser, remember:boolean, accept: boolean): NightwatchBrowser {
const browser = this.api
if(browser.isChrome()){
const chromeBrowser = (browser as any).chrome
chromeBrowser.setPermission('clipboard-read', 'granted')
chromeBrowser.setPermission('clipboard-write', 'granted')
}
if(browser.isFirefox()){
const firefoxBrowser = (browser as any).firefox
console.log('ff', firefoxBrowser)
//firefoxBrowser.setPreference('devtools.inspector.clipboardSource.allowedOrigins', 'http://localhost:8080')
}
return this
}
}
module.exports = EnableClipBoard

@ -24,6 +24,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url
.perform(done())
})
.verifyLoad()
.perform(() => {
if (hideToolTips) {
browser.execute(function () { // hide tooltips

@ -0,0 +1,13 @@
'use strict'
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
module.exports = {
'@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done)
},
'Should copy paste a file #flaky #group1': function (browser: NightwatchBrowser) {
},
}
Loading…
Cancel
Save