clipboard test

pull/5370/head
Joseph Izang 11 months ago
parent 772a009e99
commit f18e1babaa
  1. 11
      apps/remix-ide-e2e/src/tests/vyper_api.test.ts
  2. 1
      apps/remix-ide-e2e/src/types/index.d.ts

@ -61,7 +61,12 @@ module.exports = {
}, },
'Should copy abi after blind_auction compile #group1': function (browser: NightwatchBrowser) { 'Should copy abi after blind_auction compile #group1': function (browser: NightwatchBrowser) {
console.log(browser as any) const chromeBrowser = (browser as any).chrome
// const firefoxBrowser = (browser as any).firefox
// console.log('chromeBrowser', chromeBrowser)
// console.log('firefoxBrowser', firefoxBrowser)
chromeBrowser.setPermission('clipboard-read', 'granted')
chromeBrowser.setPermission('clipboard-write', 'granted')
browser//.clickLaunchIcon('vyper') browser//.clickLaunchIcon('vyper')
.frame(0) .frame(0)
.click('[data-id="remote-compiler"]') .click('[data-id="remote-compiler"]')
@ -77,9 +82,9 @@ module.exports = {
.execute(() => { .execute(() => {
navigator.clipboard.readText() navigator.clipboard.readText()
.then((clippedText) => { .then((clippedText) => {
console.log('clippedText', clippedText) console.log(`clipped text is ${clippedText.length} characters long`)
if(clippedText.length === 0) throw new Error('Clipboard is empty')
}) })
}) })
}, },

@ -15,6 +15,7 @@ declare module 'nightwatch' {
verifyContracts(compiledContractNames: string[], opts?: {wait: number; version?: string; runs?: string}): NightwatchBrowser verifyContracts(compiledContractNames: string[], opts?: {wait: number; version?: string; runs?: string}): NightwatchBrowser
selectAccount(account?: string): NightwatchBrowser selectAccount(account?: string): NightwatchBrowser
clickFunction(fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser clickFunction(fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser
checkClipboard(): NightwatchBrowser
testFunction(txHash: string, expectedInput: NightwatchTestFunctionExpectedInput): NightwatchBrowser testFunction(txHash: string, expectedInput: NightwatchTestFunctionExpectedInput): NightwatchBrowser
goToVMTraceStep(step: number, incr?: number): NightwatchBrowser goToVMTraceStep(step: number, incr?: number): NightwatchBrowser
checkVariableDebug(id: string, debugValue: NightwatchCheckVariableDebugValue): NightwatchBrowser checkVariableDebug(id: string, debugValue: NightwatchCheckVariableDebugValue): NightwatchBrowser

Loading…
Cancel
Save