Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6634f3e
Render settings in hometab
ioedeveloper Jul 15, 2025
5796417
Setup settings layout
ioedeveloper Jul 28, 2025
1a6f630
Set schema for other settings
ioedeveloper Jul 29, 2025
2751d4e
Implement toggle actions
ioedeveloper Aug 5, 2025
f183501
Save form credentials
ioedeveloper Aug 6, 2025
b50b18c
Load existing config for github
ioedeveloper Aug 6, 2025
9db2e50
Load existing config for other credentials
ioedeveloper Aug 6, 2025
54abf4a
Fuse search
ioedeveloper Aug 11, 2025
4404695
Show no match found message
ioedeveloper Aug 11, 2025
8e473ea
Fixed styling issues from bootstrap 5
ioedeveloper Aug 12, 2025
69d6ee6
Add show flag to display settings on click only
ioedeveloper Aug 12, 2025
a2cf537
Show settings tab only onclick
ioedeveloper Aug 12, 2025
e488b44
Fix collapsing bug
ioedeveloper Aug 12, 2025
7efb22e
Remove unnecessary import
ioedeveloper Aug 12, 2025
cdf2120
Show hidden pluginmanager icon
ioedeveloper Aug 12, 2025
ce9ded3
Set width for header
ioedeveloper Aug 12, 2025
e41e129
Fixed general settings test
ioedeveloper Aug 13, 2025
d704153
Remove skip cache command
ioedeveloper Aug 13, 2025
cd95202
Remove redundant code
ioedeveloper Aug 13, 2025
850a1f2
Fixed gist, library deployment and run and deploy e2e
ioedeveloper Aug 18, 2025
ad4044e
Fixed more e2e
ioedeveloper Aug 18, 2025
6c35268
Provide necessary english translations
ioedeveloper Aug 18, 2025
1fc4ac0
Add missing translations
ioedeveloper Aug 18, 2025
66c340a
Sync copilot switch
ioedeveloper Aug 18, 2025
962b439
Update links
ioedeveloper Aug 18, 2025
e899374
Remove unused code
ioedeveloper Aug 18, 2025
32ad940
Remove cleanup event
ioedeveloper Aug 18, 2025
a2124b7
Make changes requested
ioedeveloper Aug 18, 2025
d12cfa7
Remove PR tag
ioedeveloper Aug 18, 2025
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
10 changes: 7 additions & 3 deletions apps/remix-ide-e2e/src/helpers/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ function initModules(browser: NightwatchBrowser, callback: VoidFunction) {
.scrollAndClick('[data-id="verticalIconsKindfilePanel"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="settingsTabGenerateContractMetadataLabel"]')
.setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token)
.click('[data-id="settingsTabSaveGistToken"]')
.click('*[data-id="generate-contract-metadataSwitch"]')
.pause(100)
.click('*[data-id="settings-sidebar-services"]')
.pause(100)
.click('*[data-id="github-configSwitch"]')
.setValue('[data-id="settingsTabgist-access-token"]', process.env.gist_token)
.click('[data-id="settingsTabSavegithub-config"]')
.waitForElementVisible('*[data-id="topbar-themeIcon-toggle"]')
.click('*[data-id="topbar-themeIcon-toggle"]')
.waitForElementVisible('*[data-id="topbar-themeIcon-light"]')
Expand Down
78 changes: 40 additions & 38 deletions apps/remix-ide-e2e/src/tests/generalSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ module.exports = {

'Should display settings menu ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('*[data-id="verticalIconsKindsettings"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementContainsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
.waitForElementContainsText('[data-id="settings-sidebar-header"] h2', 'Settings')
},

'Should activate `generate contract metadata` ': function (browser) {
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
.waitForElementVisible('*[data-id="settingsTabGenerateContractMetadataLabel"]', 5000)
.verify.elementPresent('[data-id="settingsTabGenerateContractMetadata"]:checked')
.click('*[data-id="verticalIconsKindfilePanel"]')
.click('[data-id="treeViewLitreeViewItemcontracts"]')
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]')
.waitForElementVisible('*[data-id="generate-contract-metadataSwitch"]')
.verify.elementPresent('[data-id="generate-contract-metadataSwitch"] .fa-toggle-on')
.openFile('contracts/3_Ballot.sol')
.click('*[data-id="verticalIconsKindsolidity"]')
.pause(2000)
Expand All @@ -36,32 +33,30 @@ module.exports = {
},

'Should add new github access token ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
browser.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.setValue('*[data-id="settingsTabGistAccessToken"]', '**********')
.click('*[data-id="settingsTabSaveGistToken"]')
.waitForElementVisible('*[data-id="settings-sidebar-services"]')
.click('*[data-id="settings-sidebar-services"]')
.pause(100)
.click('*[data-id="github-configSwitch"]')
.setValue('[data-id="settingsTabgist-access-token"]', '**********')
.click('[data-id="settingsTabSavegithub-config"]')
.pause(100)
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]', 'Credentials updated')
.pause(3000)
},

'Should copy github access token to clipboard ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="copyToClipboardCopyIcon"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
// .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1) , 5000)
// .assert.containsText('*[data-shared="tooltipPopup"]', 'Copied value to clipboard.')
// .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.')
},

'Should remove github access token ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.pause(1000)
.click('*[data-id="settingsTabRemoveGistToken"]')
browser
.click('*[data-id="github-configSwitch"]')
.pause(500)
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]', 'Credentials removed')
.assert.containsText('*[data-id="settingsTabGistAccessToken"]', '')
.waitForElementNotPresent('[data-id="settingsTabgist-access-token"]')
.click('*[data-id="github-configSwitch"]')
.pause(100)
.assert.containsText('[data-id="settingsTabgist-access-token"]', '')
},
// These e2e should be enabled after settings panel refactoring
// 'Should load dark theme ': function (browser: NightwatchBrowser) {
Expand Down Expand Up @@ -91,27 +86,34 @@ module.exports = {


'Should load zh locale ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.scrollAndClick('*[data-id="settingsTabLocaleLabelzh"]')
browser.waitForElementVisible('*[data-id="settings-sidebar-general"]')
.click('*[data-id="settings-sidebar-general"]')
.pause(100)
.scrollAndClick('*[data-id="settingsTabDropdownTogglelocale"]')
.waitForElementVisible('[data-id="custom-dropdown-items"]')
.waitForElementVisible('[data-id="settingsTabDropdownItemzh"]')
.click('[data-id="settingsTabDropdownItemzh"]')
.pause(2000)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', '设置')
.assert.containsText('[data-id="settings-sidebar-header"] h2', '设置')
.assert.containsText('*[data-id="listenNetworkCheckInput"]', '监听所有交易')
.assert.containsText('*[data-id="settingsTabGenerateContractMetadataLabel"]', '生成合约元数据')
.assert.containsText('*[data-id="settingsAutoCompleteLabel"]', '在编辑器中启用代码自动补全')
.assert.containsText('*[data-id="settingsShowGasLabel"]', '在编辑器中展示 gas 预算')
.assert.containsText('*[data-id="displayErrorsLabel"]', '编辑代码时展示错误提示')
.assert.containsText('*[data-id="settingsTabgenerate-contract-metadataLabel"]', '生成合约元数据')
.assert.containsText('*[data-id="settingsTabauto-completionLabel"]', '在编辑器中启用代码自动补全')
.assert.containsText('*[data-id="settingsTabshow-gasLabel"]', '在编辑器中展示 gas 预算')
.assert.containsText('*[data-id="settingsTabdisplay-errorsLabel"]', '编辑代码时展示错误提示')
},

'Should load en locale ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.scrollAndClick('*[data-id="settingsTabLocaleLabelen"]')
browser.scrollAndClick('*[data-id="settingsTabDropdownTogglelocale"]')
.waitForElementVisible('[data-id="custom-dropdown-items"]')
.waitForElementVisible('[data-id="settingsTabDropdownItemen"]')
.click('[data-id="settingsTabDropdownItemen"]')
.pause(2000)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
.assert.containsText('[data-id="settings-sidebar-header"] h2', 'Settings')
.assert.containsText('*[data-id="listenNetworkCheckInput"]', 'Listen on all transactions')
.assert.containsText('*[data-id="settingsTabGenerateContractMetadataLabel"]', 'Generate contract metadata')
.assert.containsText('*[data-id="settingsAutoCompleteLabel"]', 'Enable code completion in editor')
.assert.containsText('*[data-id="settingsShowGasLabel"]', 'Display gas estimates in editor')
.assert.containsText('*[data-id="displayErrorsLabel"]', 'Display errors in editor while typing')
.assert.containsText('*[data-id="settingsTabgenerate-contract-metadataLabel"]', 'Generate contract metadata')
.assert.containsText('*[data-id="settingsTabauto-completionLabel"]', 'Enable code completion in editor')
.assert.containsText('*[data-id="settingsTabshow-gasLabel"]', 'Display gas estimates in editor')
.assert.containsText('*[data-id="settingsTabdisplay-errorsLabel"]', 'Display errors in editor while typing')
}
}

Expand Down
11 changes: 5 additions & 6 deletions apps/remix-ide-e2e/src/tests/gist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = {
const gistid = '17ac9315bc065a3d95cf8dc1b28d71f8'
browser
.refreshPage()
.pause(10000)
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory
.waitForElementVisible('*[data-id="fileExplorerNewFilecreateNewFolder"]')
Expand Down Expand Up @@ -88,7 +87,6 @@ module.exports = {

'Display Error Message For Invalid Gist ID #group1': '' + function (browser: NightwatchBrowser) {
browser
.pause(1000)
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.clickLaunchIcon('filePanel')
.scrollAndClick('*[data-id="landingPageImportFromGistButton"]')
Expand All @@ -109,14 +107,15 @@ module.exports = {
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementVisible('[data-id="settingsTabRemoveGistToken"]')
.click('[data-id="settingsTabRemoveGistToken"]')
.clickLaunchIcon('filePanel')
.waitForElementVisible('*[data-id="settings-sidebar-services"]')
.click('*[data-id="settings-sidebar-services"]')
.click('*[data-id="github-configSwitch"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]', 'Credentials removed')
.click('*[data-id="github-dropdown-toggle"]')
.click('*[data-id="github-dropdown-item-publish-to-gist"]')
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok')
// .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() })
.pause(10000)
.perform((done) => {
browser.getText('[data-id="fileSystemModalDialogModalBody-react"]', (result) => {
console.log('result.value: ', result.value)
Expand Down
5 changes: 4 additions & 1 deletion apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ module.exports = {
.pause(5000)
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="settingsTabGenerateContractMetadataLabel"]')
.waitForElementVisible('*[data-id="settings-sidebar-general"]')
.click('*[data-id="settings-sidebar-general"]')
.waitForElementPresent('[data-id="generate-contract-metadataSwitch"]')
.click('[data-id="generate-contract-metadataSwitch"]')
.clickLaunchIcon('solidity')
.click('#compileTabView button[data-id="compilerContainerCompileBtn"]') // that should generate the JSON artefact
.clickLaunchIcon('udapp')
Expand Down
22 changes: 15 additions & 7 deletions apps/remix-ide-e2e/src/tests/matomo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ module.exports = {
.waitForElementNotPresent('*[data-id="matomoModalModalDialogModalBody-react"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.verify.elementPresent('[id="settingsMatomoPerfAnalytics"]:checked')
.waitForElementVisible('*[data-id="settings-sidebar-analytics"]')
.click('*[data-id="settings-sidebar-analytics"]')
.waitForElementVisible('*[data-id="matomo-analyticsSwitch"]')
.verify.elementPresent('[data-id="matomo-analyticsSwitch"] .fa-toggle-on')
.verify.elementPresent('[data-id="matomo-perf-analyticsSwitch"] .fa-toggle-on')
.execute(function () {
return JSON.parse(window.localStorage.getItem('config-v0.8:.remix.config'))['settings/matomo-analytics'] == true
}, [], (res) => {
Expand Down Expand Up @@ -108,7 +112,10 @@ module.exports = {
.click('*[id="remixTourSkipbtn"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementNotPresent('[id="settingsMatomoPerfAnalytics"]:checked')
.waitForElementVisible('*[data-id="settings-sidebar-analytics"]')
.click('*[data-id="settings-sidebar-analytics"]')
.waitForElementVisible('*[data-id="matomo-perf-analyticsSwitch"]')
.verify.elementPresent('[data-id="matomo-perf-analyticsSwitch"] .fa-toggle-off')
.execute(function () {
return JSON.parse(window.localStorage.getItem('config-v0.8:.remix.config'))['settings/matomo-perf-analytics'] == false
}, [], (res) => {
Expand All @@ -118,9 +125,7 @@ module.exports = {
},
'change settings #group2': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="label-matomo-settings"]')
.pause(1000)
.click('*[data-id="label-matomo-settings"]')
.click('*[data-id="matomo-perf-analyticsSwitch"]')
.refreshPage()
.waitForElementPresent({
selector: `//*[@data-id='compilerloaded']`,
Expand All @@ -130,8 +135,11 @@ module.exports = {
.waitForElementNotPresent('*[data-id="matomoModalModalDialogModalBody-react"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementVisible('*[data-id="label-matomo-settings"]')
.click('*[data-id="label-matomo-settings"]') // disable again
.waitForElementVisible('*[data-id="settings-sidebar-analytics"]')
.click('*[data-id="settings-sidebar-analytics"]')
.waitForElementVisible('*[data-id="matomo-perf-analyticsSwitch"]')
.verify.elementPresent('[data-id="matomo-perf-analyticsSwitch"] .fa-toggle-on')
.click('*[data-id="matomo-perf-analyticsSwitch"]') // disable again
.pause(2000)
.refreshPage()
},
Expand Down
17 changes: 8 additions & 9 deletions apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ module.exports = {
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementPresent('[data-id="settingsEnableSaveEnvStateLabel"]')
.scrollInto('[data-id="settingsEnableSaveEnvStateLabel"]')
.verify.elementPresent('[data-id="settingsEnableSaveEnvState"]:checked')
.waitForElementVisible('*[data-id="settings-sidebar-general"]')
.click('*[data-id="settings-sidebar-general"]')
.pause(100)
.waitForElementPresent('[data-id="save-evm-stateSwitch"] > .fa-toggle-on')
},

'Should deploy default storage contract; store value and ensure that state is saved. #group4 #group5': function (browser: NightwatchBrowser) {
Expand Down Expand Up @@ -156,9 +157,8 @@ module.exports = {
browser
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementPresent('[data-id="settingsTabGenerateContractMetadataLabel"]')
.click('[data-id="settingsTabGenerateContractMetadataLabel"]')
.verify.elementPresent('[data-id="settingsTabGenerateContractMetadata"]:checked')
.waitForElementPresent('[data-id="generate-contract-metadataSwitch"]')
.click('[data-id="generate-contract-metadataSwitch"]')
.clickLaunchIcon('solidity')
.click('.remixui_compilerConfigSection')
.setValue('#evmVersionSelector', 'london')
Expand Down Expand Up @@ -186,9 +186,8 @@ module.exports = {
browser
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.waitForElementPresent('[data-id="settingsEnableSaveEnvStateLabel"]')
.click('[data-id="settingsEnableSaveEnvStateLabel"]')
.verify.elementNotPresent('[data-id="settingsEnableSaveEnvState"]:checked')
.waitForElementPresent('[data-id="save-evm-stateSwitch"]')
.click('[data-id="save-evm-stateSwitch"]')
.clickLaunchIcon('filePanel')
.openFile('contracts/1_Storage.sol')
.pause(5000)
Expand Down
2 changes: 2 additions & 0 deletions apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ module.exports = {
'Should compile and deploy 2 simple contracts, the contract creation component state should be correctly reset for the deployment of the second contract #group4': function (browser: NightwatchBrowser) {
browser
.addFile('Storage.sol', sources[6]['Storage.sol'])
.pause(1000)
.addFile('Owner.sol', sources[6]['Owner.sol'])
.pause(1000)
.clickLaunchIcon('udapp')
.createContract('42, 24')
.openFile('Storage.sol')
Expand Down
1 change: 0 additions & 1 deletion apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = {
// .click('*[data-id="verticalIconsKindsettings"]')
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="verticalIconsKindpluginManager"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]')
}
}
7 changes: 3 additions & 4 deletions apps/remix-ide-e2e/src/tests/workspace_git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ module.exports = {
browser
.waitForElementVisible('*[data-id="topbar-settingsIcon"]')
.click('*[data-id="topbar-settingsIcon"]')
.setValue('[data-id="settingsTabGithubUsername"]', 'circleci')
.setValue('[data-id="settingsTabGithubEmail"]', '[email protected]')
.click('[data-id="settingsTabSaveGistToken"]')
.setValue('[data-id="settingsTabgithub-user-name"]', 'circleci')
.setValue('[data-id="settingsTabgithub-email"]', '[email protected]')
.click('[data-id="settingsTabSavegithub-config"]')
},

'Should create and initialize a GIT repository #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
// .waitForElementNotVisible('[data-id="workspaceGitPanel"]')
.click('*[data-id="workspacesSelect"]')
.click('*[data-id="workspacecreate"]')
Expand Down
4 changes: 4 additions & 0 deletions apps/remix-ide/src/app/components/bottom-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const BottomBar = ({ plugin }: BottomBarProps) => {
getAI()
getCurrentExt()

plugin.on('settings', 'copilotChoiceUpdated', (isChecked) => {
setAiSwitch(isChecked)
})

plugin.on('fileManager', 'currentFileChanged', getCurrentExt)

return () => {
Expand Down
5 changes: 2 additions & 3 deletions apps/remix-ide/src/app/panels/tab-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ export default class TabProxy extends Plugin {
this.tabsApi.activateTab(name)
})

this.on('manager', 'pluginActivated', ({ name, location, displayName, icon, description }) => {

this.on('manager', 'pluginActivated', ({ name, location, displayName, icon, description, show = true }) => {
if (location === 'mainPanel') {
this.addTab(
name,
Expand All @@ -181,7 +180,7 @@ export default class TabProxy extends Plugin {
icon,
description
)
this.switchTab(name)
show && this.switchTab(name)
}
})

Expand Down
Loading