|
|
|
@ -130,28 +130,28 @@ module.exports = { |
|
|
|
|
// check js and ts files are not transformed
|
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
@ -178,28 +178,28 @@ module.exports = { |
|
|
|
|
// check js and ts files are not transformed
|
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
@ -226,28 +226,28 @@ module.exports = { |
|
|
|
|
// check js and ts files are not transformed
|
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') |
|
|
|
|
.pause(1000) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
@ -274,7 +274,7 @@ module.exports = { |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/MyToken.sol"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemcontracts/MyToken.sol"]') |
|
|
|
|
.pause(1000) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable, PausableUpgradeable, ERC1155BurnableUpgradeable, UUPSUpgradeable {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
@ -283,21 +283,21 @@ module.exports = { |
|
|
|
|
// check js and ts files are not transformed
|
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, from?: string, gas?: number): Promise<Options> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
browser.assert.ok(content.indexOf(`gas: gas || 3600000`) !== -1, |
|
|
|
@ -306,7 +306,7 @@ module.exports = { |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') |
|
|
|
|
.pause(100) |
|
|
|
|
.getEditorValue((content) => {
|
|
|
|
|
.getEditorValue((content) => { |
|
|
|
|
browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {`) !== -1, |
|
|
|
|
'Incorrect content') |
|
|
|
|
}) |
|
|
|
@ -345,7 +345,15 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
'Should rename a workspace #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('*[data-id="workspaceRename"]') // rename workspace_name
|
|
|
|
|
.useXpath() |
|
|
|
|
.waitForElementPresent({ |
|
|
|
|
selector: '//i[@data-icon="workspaceDropdownMenuIcon"]', |
|
|
|
|
locateStrategy: 'xpath', |
|
|
|
|
}) |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul') |
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[1]') // rename workspace_name
|
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') |
|
|
|
|
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextRename"]') |
|
|
|
|
.click('*[data-id="modalDialogCustomPromptTextRename"]') |
|
|
|
@ -366,7 +374,10 @@ module.exports = { |
|
|
|
|
'Should delete a workspace #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.switchWorkspace('workspace_name_1') |
|
|
|
|
.click('*[data-id="workspaceDelete"]') // delete workspace_name_1
|
|
|
|
|
.useXpath() |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[2]') // delete workspace_name_1
|
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') |
|
|
|
|
.waitForElementVisible('[data-id="workspacesSelect"]') |
|
|
|
@ -379,8 +390,12 @@ module.exports = { |
|
|
|
|
'Should clone a repository #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.waitForElementVisible('[data-id="cloneGitRepository"]') |
|
|
|
|
.click('[data-id="cloneGitRepository"]') |
|
|
|
|
.useXpath() |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
// .waitForElementVisible('[data-id="cloneGitRepository"]')
|
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') |
|
|
|
@ -403,8 +418,13 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('[data-id="cloneGitRepository"]') |
|
|
|
|
.click('[data-id="cloneGitRepository"]') |
|
|
|
|
.useXpath() |
|
|
|
|
// .waitForElementVisible('[data-id="cloneGitRepository"]')
|
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
// .click('[data-id="cloneGitRepository"]')
|
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') |
|
|
|
@ -412,8 +432,11 @@ module.exports = { |
|
|
|
|
.click('[data-id="fileSystem-modal-footer-ok-react"]') |
|
|
|
|
.pause(5000) |
|
|
|
|
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1') |
|
|
|
|
.waitForElementVisible('[data-id="cloneGitRepository"]') |
|
|
|
|
.click('[data-id="cloneGitRepository"]') |
|
|
|
|
.useXpath() |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') |
|
|
|
@ -421,8 +444,12 @@ module.exports = { |
|
|
|
|
.click('[data-id="fileSystem-modal-footer-ok-react"]') |
|
|
|
|
.pause(5000) |
|
|
|
|
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2') |
|
|
|
|
.waitForElementVisible('[data-id="cloneGitRepository"]') |
|
|
|
|
.click('[data-id="cloneGitRepository"]') |
|
|
|
|
// .waitForElementVisible('[data-id="cloneGitRepository"]')
|
|
|
|
|
// .click('[data-id="cloneGitRepository"]')
|
|
|
|
|
.useXpath() |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') |
|
|
|
@ -438,8 +465,13 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('[data-id="cloneGitRepository"]') |
|
|
|
|
.click('[data-id="cloneGitRepository"]') |
|
|
|
|
// .waitForElementVisible('[data-id="cloneGitRepository"]')
|
|
|
|
|
// .click('[data-id="cloneGitRepository"]')
|
|
|
|
|
.useXpath() |
|
|
|
|
.moveToElement('//*[@id="workspacesMenuDropdown"]/span/i', 0, 0) |
|
|
|
|
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]') |
|
|
|
|
.useCss() |
|
|
|
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.click('[data-id="fileSystemModalDialogModalBody-react"]') |
|
|
|
|
.waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') |
|
|
|
|