Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/remix-ide-e2e/src/tests/workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sauce from './sauce'

module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done, 'http://127.0.0.1:8080?plugins=solidity,udapp&plugincall=fileManager//open//3_Ballot.sol', false)
init(browser, done, 'http://127.0.0.1:8080?activate=solidity,udapp&call=fileManager//open//3_Ballot.sol&deactivate=home', false)
},

'CheckSolidityActivatedAndUDapp': function (browser: NightwatchBrowser) {
Expand All @@ -20,7 +20,12 @@ module.exports = {
.pause(5000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf('contract Ballot {') != -1, 'content doesn\'t include Ballot contract')
})
})
},

'Home page should be deactivated': function (browser: NightwatchBrowser) {
browser
.waitForElementNotPresent('[data-id="landingPageHomeContainer"]')
.end()
},

Expand Down
12 changes: 10 additions & 2 deletions apps/remix-ide/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,19 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// Set workspace after initial activation
if (Array.isArray(workspace)) {
appManager.activatePlugin(workspace).then(() => {
try {
if (params.deactivate) {
appManager.deactivatePlugin(params.deactivate.split(','))
}
} catch (e) {
console.log(e)
}

// If plugins are loaded from the URL params, we focus on the last one.
if (pluginLoader.current === 'queryParams' && workspace.length > 0) menuicons.select(workspace[workspace.length - 1])

if (params.plugincall) {
const callDetails = params.plugincall.split('//')
if (params.call) {
const callDetails = params.call.split('//')
if (callDetails.length > 1) {
toolTip(`initiating ${callDetails[0]} ...`)
// @todo(remove the timeout when activatePlugin is on 0.3.0)
Expand Down
8 changes: 4 additions & 4 deletions apps/remix-ide/src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ class PluginLoader {
this.loaders['queryParams'] = {
set: () => {},
get: () => {
const { plugins } = queryParams.get()
if (!plugins) return []
return plugins.split(',')
const { activate } = queryParams.get()
if (!activate) return []
return activate.split(',')
}
}

this.current = queryParams.get()['plugins'] ? 'queryParams' : 'localStorage'
this.current = queryParams.get()['activate'] ? 'queryParams' : 'localStorage'
}

set (plugin, actives) {
Expand Down