|
|
@ -93,8 +93,10 @@ const clickAndCheckLog = async (browser: NightwatchBrowser, buttonText: string, |
|
|
|
} |
|
|
|
} |
|
|
|
if (methodResult && typeof methodResult !== 'string') { methodResult = JSON.stringify(methodResult) } |
|
|
|
if (methodResult && typeof methodResult !== 'string') { methodResult = JSON.stringify(methodResult) } |
|
|
|
if (eventResult && typeof eventResult !== 'string') { eventResult = JSON.stringify(eventResult) } |
|
|
|
if (eventResult && typeof eventResult !== 'string') { eventResult = JSON.stringify(eventResult) } |
|
|
|
|
|
|
|
if (buttonText) { |
|
|
|
await clickButton(browser, buttonText) |
|
|
|
await clickButton(browser, buttonText) |
|
|
|
await checkForAcceptAndRemember(browser) |
|
|
|
await checkForAcceptAndRemember(browser) |
|
|
|
|
|
|
|
} |
|
|
|
await debugValues(browser, 'methods', methodResult) |
|
|
|
await debugValues(browser, 'methods', methodResult) |
|
|
|
await debugValues(browser, 'events', eventResult) |
|
|
|
await debugValues(browser, 'events', eventResult) |
|
|
|
} |
|
|
|
} |
|
|
@ -122,6 +124,25 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
|
|
// FILESYSTEM
|
|
|
|
// FILESYSTEM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'Should create context menu item': async function (browser: NightwatchBrowser) { |
|
|
|
|
|
|
|
await clickAndCheckLog(browser, 'filePanel:registerContextMenuItem', null, null, { |
|
|
|
|
|
|
|
id: 'localPlugin', |
|
|
|
|
|
|
|
name: 'testCommand', |
|
|
|
|
|
|
|
label: 'testCommand', |
|
|
|
|
|
|
|
type: [], |
|
|
|
|
|
|
|
extension: ['.sol'], |
|
|
|
|
|
|
|
path: [], |
|
|
|
|
|
|
|
pattern: [] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
await browser.useXpath().frameParent(async () => { |
|
|
|
|
|
|
|
await clickButton(browser, 'verticalIconsFileExplorerIcons') |
|
|
|
|
|
|
|
// await clickButton(browser, 'treeViewLitreeViewItemcontracts')
|
|
|
|
|
|
|
|
browser.rightClick('*[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]').waitForElementVisible('//*[@id="menuitemtestcommand"]').click('//*[@id="menuitemtestcommand"]', async () => { |
|
|
|
|
|
|
|
await clickAndCheckLog(browser, null, { id: 'localPlugin', name: 'testCommand', label: 'testCommand', type: [], extension: ['.sol'], path: ['contracts/1_Storage.sol'], pattern: [] }, null, null) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should get current workspace': async function (browser: NightwatchBrowser) { |
|
|
|
'Should get current workspace': async function (browser: NightwatchBrowser) { |
|
|
|
await clickAndCheckLog(browser, 'filePanel:getCurrentWorkspace', { name: 'default_workspace', isLocalhost: false, absolutePath: '.workspaces/default_workspace' }, null, null) |
|
|
|
await clickAndCheckLog(browser, 'filePanel:getCurrentWorkspace', { name: 'default_workspace', isLocalhost: false, absolutePath: '.workspaces/default_workspace' }, null, null) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -224,6 +245,8 @@ module.exports = { |
|
|
|
await clickAndCheckLog(browser, 'dGitProvider:log', 'commit-message', null, null) |
|
|
|
await clickAndCheckLog(browser, 'dGitProvider:log', 'commit-message', null, null) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// context menu
|
|
|
|
|
|
|
|
|
|
|
|
// UNIT TESTING
|
|
|
|
// UNIT TESTING
|
|
|
|
'Should activate solidityUnitTesting': async function (browser: NightwatchBrowser) { |
|
|
|
'Should activate solidityUnitTesting': async function (browser: NightwatchBrowser) { |
|
|
|
await clickAndCheckLog(browser, 'manager:activatePlugin', null, null, 'solidityUnitTesting') |
|
|
|
await clickAndCheckLog(browser, 'manager:activatePlugin', null, null, 'solidityUnitTesting') |
|
|
|