diff --git a/apps/remix-ide-e2e/src/tests/editor.test.ts b/apps/remix-ide-e2e/src/tests/editor.test.ts index 9a83da9b81..60da793817 100644 --- a/apps/remix-ide-e2e/src/tests/editor.test.ts +++ b/apps/remix-ide-e2e/src/tests/editor.test.ts @@ -128,119 +128,6 @@ module.exports = { .waitForElementNotPresent('.highlightLine51', 60000) }, - 'Should display the context view #group2': function (browser: NightwatchBrowser) { - browser - .openFile('contracts') - .openFile('contracts/1_Storage.sol') - .waitForElementVisible('#editorView') - .setEditorValue(storageContractWithError) - .pause(2000) - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(17, 16) - }, [], () => {}) - .waitForElementVisible('.contextview') - .waitForElementContainsText('.contextview .type', 'FunctionDefinition') - .waitForElementContainsText('.contextview .name', 'store') - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(18, 12) - }, [], () => {}) - .waitForElementContainsText('.contextview .type', 'uint256') - .waitForElementContainsText('.contextview .name', 'number') - .click('.contextview [data-action="previous"]') // declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '180') - }) - .click('.contextview [data-action="next"]') // back to the initial state - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '323') - }) - .click('.contextview [data-action="next"]') // next reference - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '489') - }) - .click('.contextview [data-action="gotoref"]') // back to the declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '180') - }) - }, - - 'Should display the context view, loop over "Owner" by switching file #group2': function (browser: NightwatchBrowser) { - browser - .clickLaunchIcon('solidity') - .click('[for="autoCompile"]') // disable auto compile - .openFile('contracts') - .openFile('contracts/3_Ballot.sol') - .waitForElementVisible('#editorView') - .setEditorValue(BallotWithARefToOwner) - .clickLaunchIcon('solidity') - .click('*[data-id="compilerContainerCompileBtn"]') // compile - .pause(6000) - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(14, 6) - }, [], () => {}) - .waitForElementVisible('.contextview') - .waitForElementContainsText('.contextview .type', 'ContractDefinition') - .waitForElementContainsText('.contextview .name', 'Owner') - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '1061') - }) - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '153') - }) - .currentSelectedFileIs('2_Owner.sol') // make sure the current file has been properly changed - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '211') - }) - .click('.contextview [data-action="next"]') - .currentSelectedFileIs('3_Ballot.sol') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '1061') - }) - .click('.contextview [data-action="gotoref"]') // go to the declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '153') - }) - .end() - } } const aceThemes = {