auto complete test

editorcontextDummy
filip mertens 3 years ago
parent 7cd713d955
commit 004fb2bb15
  1. 41
      apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts

@ -16,6 +16,7 @@ module.exports = {
.waitForElementVisible('#editorView') .waitForElementVisible('#editorView')
.setEditorValue(BallotWithARefToOwner) .setEditorValue(BallotWithARefToOwner)
.pause(4000) // wait for the compiler to finish .pause(4000) // wait for the compiler to finish
.scrollToLine(37)
}, },
'Should put cursor at the end of a line': function (browser: NightwatchBrowser) { 'Should put cursor at the end of a line': function (browser: NightwatchBrowser) {
const path = "//*[@class='view-line' and contains(.,'new') and contains(.,'owner')]//span//span[contains(.,';')]" const path = "//*[@class='view-line' and contains(.,'new') and contains(.,'owner')]//span//span[contains(.,';')]"
@ -75,6 +76,46 @@ module.exports = {
.waitForElementNotPresent(autoCompleteLineElement('private')) .waitForElementNotPresent(autoCompleteLineElement('private'))
.waitForElementNotPresent(autoCompleteLineElement('isOwner')) .waitForElementNotPresent(autoCompleteLineElement('isOwner'))
.waitForElementNotPresent(autoCompleteLineElement('ownerSet')) .waitForElementNotPresent(autoCompleteLineElement('ownerSet'))
.perform(function () {
const actions = this.actions({ async: true });
return actions.
sendKeys(this.Keys.ENTER).
sendKeys('msg.')
})
.waitForElementVisible(autoCompleteLineElement('sender'))
.click(autoCompleteLineElement('sender'))
.perform(function () {
const actions = this.actions({ async: true });
return actions.
// right arrow key
sendKeys(this.Keys.ARROW_RIGHT).
sendKeys(this.Keys.ARROW_RIGHT).
sendKeys(this.Keys.ENTER)
})
},
'Dot complete struct': function (browser: NightwatchBrowser) {
browser.perform(function () {
const actions = this.actions({ async: true });
return actions.
sendKeys(this.Keys.ENTER).
sendKeys('Proposal m')
})
.waitForElementVisible(autoCompleteLineElement('memory'))
.click(autoCompleteLineElement('memory'))
.perform(function () {
const actions = this.actions({ async: true });
return actions.
sendKeys(' p;').
sendKeys(this.Keys.ENTER).pause(2000).
sendKeys('p.')
})
.waitForElementVisible(autoCompleteLineElement('name'))
.waitForElementVisible(autoCompleteLineElement('voteCount'))
.perform(function () {
const actions = this.actions({ async: true });
return actions.
sendKeys(' =1;')
})
} }
} }

Loading…
Cancel
Save