Skip to content

Commit fc72140

Browse files
committed
check for toaster and icon toggling in e2e
1 parent fb6b374 commit fc72140

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
default: ""
1515
run_file_tests_keyword:
1616
type: enum
17-
enum: ["", "ai_panel", "ballot", "ballot_0_4_14", "blockchain", "bottom-bar", "circom", "code_format", "compile_run_widget", "compiler_api", "contract_flattener", "contract_verification", "debugger", "defaultLayout", "deploy_vefiry", "dgit_github", "dgit_local", "editor", "editorHoverContext", "editorReferences", "editor_error_marker", "editor_line_text", "eip1153", "eip7702", "environment-account", "erc721", "etherscan_api", "expandAllFolders", "fileExplorer", "fileManager_api", "file_decorator", "file_explorer_context_menu", "file_explorer_dragdrop", "file_explorer_multiselect", "generalSettings", "gist", "homeTab", "importFromGithub", "layout", "learneth", "libraryDeployment", "matomo-bot-detection", "matomo-consent", "mcp_all_resources", "mcp_all_tools", "mcp_server_complete", "mcp_server_connection", "mcp_server_lifecycle", "mcp_workflow_integration", "metamask", "migrateFileSystem", "noir", "pinned_contracts", "toggle_panels", "pluginManager", "plugin_api", "providers", "proxy_oz_v4", "proxy_oz_v5", "proxy_oz_v5_non_shanghai_runtime", "publishContract", "quickDapp_metamask", "recorder", "remixd", "runAndDeploy", "script-runner", "search", "signingMessage", "sol2uml", "solidityImport", "solidityUnittests", "specialFunctions", "staticAnalysis", "stressEditor", "template_exp_modal", "terminal", "transactionExecution", "txListener", "uniswap_v4_core", "url", "usingWebWorker", "verticalIconsPanel", "vm_state", "vyper_api", "walkthrough", "workspace", "workspace_git"]
17+
enum: ["", "ai_panel", "ballot", "ballot_0_4_14", "blockchain", "bottom-bar", "circom", "code_format", "compile_run_widget", "compiler_api", "contract_flattener", "contract_verification", "debugger", "defaultLayout", "deploy_vefiry", "dgit_github", "dgit_local", "editor", "editorHoverContext", "editorReferences", "editor_error_marker", "editor_line_text", "eip1153", "eip7702", "environment-account", "erc721", "etherscan_api", "expandAllFolders", "fileExplorer", "fileManager_api", "file_decorator", "file_explorer_context_menu", "file_explorer_dragdrop", "file_explorer_multiselect", "generalSettings", "gist", "homeTab", "importFromGithub", "layout", "learneth", "libraryDeployment", "matomo-bot-detection", "matomo-consent", "mcp_all_resources", "mcp_all_tools", "mcp_server_complete", "mcp_server_connection", "mcp_server_lifecycle", "mcp_workflow_integration", "metamask", "migrateFileSystem", "noir", "pinned_contracts", "pluginManager", "plugin_api", "providers", "proxy_oz_v4", "proxy_oz_v5", "proxy_oz_v5_non_shanghai_runtime", "publishContract", "quickDapp_metamask", "recorder", "remixd", "runAndDeploy", "script-runner", "search", "signingMessage", "sol2uml", "solidityImport", "solidityUnittests", "specialFunctions", "staticAnalysis", "stressEditor", "template_exp_modal", "terminal", "toggle_panels", "transactionExecution", "txListener", "uniswap_v4_core", "url", "usingWebWorker", "verticalIconsPanel", "vm_state", "vyper_api", "walkthrough", "workspace", "workspace_git"]
1818
default: ""
1919
run_flaky_tests:
2020
type: boolean

apps/remix-ide-e2e/src/tests/toggle_panels.test.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ module.exports = {
2626
.waitForElementVisible('*[data-id="remix-ai-assistant-starter-expert-2"]')
2727
.click('*[data-id="movePluginToLeft"]')
2828
.waitForElementVisible('*[data-pinnedPlugin="movePluginToRight-remixaiassistant"]')
29-
.waitForElementVisible('.codicon-layout-sidebar-right-off')
29+
.waitForElementVisible('.codicon-layout-sidebar-right-off') // check the icon toggling on top bar
30+
.click('*[data-id="toggleRightSidePanelIcon"]') // Check for toaster if plugin on the right side is moved to left, no plugin is pinned on the right side
31+
.waitForElementVisible(
32+
{
33+
selector: "//*[@data-shared='tooltipPopup' and contains(.,'No plugin pinned on the Right Side Panel')]",
34+
locateStrategy: 'xpath'
35+
}
36+
)
3037
},
3138
'Pin Solidity Compiler plugin to right side panel #group1': function (browser: NightwatchBrowser) {
3239
browser
@@ -35,37 +42,47 @@ module.exports = {
3542
.waitForElementVisible('*[data-id="movePluginToRight"]')
3643
.click('*[data-id="movePluginToRight"]')
3744
.waitForElementVisible('*[data-pinnedPlugin="movePluginToLeft-solidity"]')
45+
.waitForElementVisible('.codicon-layout-sidebar-right')
3846
.clickLaunchIcon('filePanel')
3947
},
4048
'Toggle right side panel to hide and show pinned plugin #group1': function (browser: NightwatchBrowser) {
4149
browser
4250
.waitForElementVisible('*[data-id="hideRightSidePanel"]')
4351
.click('*[data-id="hideRightSidePanel"]')
44-
.waitForElementNotVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
52+
.waitForElementVisible('.codicon-layout-sidebar-right-off')
53+
.waitForElementNotVisible('#right-side-panel') // check the right side panel is not rendered
4554
.click('*[data-id="toggleRightSidePanelIcon"]')
4655
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
56+
.waitForElementVisible('.codicon-layout-sidebar-right')
4757
},
4858
'Toggle right side panel, reload IDE, panel state should persist #group1': function (browser: NightwatchBrowser) {
4959
browser
5060
.waitForElementVisible('*[data-id="hideRightSidePanel"]')
5161
.click('*[data-id="hideRightSidePanel"]')
52-
.waitForElementNotVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
62+
.waitForElementVisible('.codicon-layout-sidebar-right-off')
63+
.waitForElementNotVisible('#right-side-panel')
5364
.refresh()
5465
.waitForElementVisible('*[data-id="toggleRightSidePanelIcon"')
66+
.waitForElementVisible('.codicon-layout-sidebar-right-off')
5567
.click('*[data-id="toggleRightSidePanelIcon"]')
5668
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
69+
.waitForElementVisible('.codicon-layout-sidebar-right')
5770
},
5871
'Swap pinned plugin from right side panel when panel is hidden #group1': function (browser: NightwatchBrowser) {
5972
browser
6073
.refreshPage()
6174
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
6275
.waitForElementVisible('*[data-id="hideRightSidePanel"]')
6376
.click('*[data-id="hideRightSidePanel"]')
77+
.waitForElementVisible('.codicon-layout-sidebar-right-off')
78+
.waitForElementNotVisible('#right-side-panel')
6479
.clickLaunchIcon('udapp')
6580
.waitForElementVisible('*[data-pinnedplugin="movePluginToRight-udapp"]')
6681
.click('*[data-id="movePluginToRight"]')
82+
.waitForElementVisible('#right-side-panel')
6783
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-udapp"]')
68-
.waitForElementVisible('*[data-id="movePluginToRight"]')
84+
.waitForElementVisible('.codicon-layout-sidebar-right')
85+
.waitForElementVisible('*[data-pinnedplugin="movePluginToRight-solidity"]')
6986
.click('*[data-pinnedplugin="movePluginToLeft-udapp"]')
7087
.end()
7188
},

apps/remix-ide/src/app/components/right-side-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class RightSidePanel extends AbstractPanel {
176176

177177
// Check if no plugin is pinned
178178
if (!pluginProfile) {
179-
this.call('notification', 'toast', 'No plugin pinned on right side panel')
179+
this.call('notification', 'toast', 'No plugin pinned on the Right Side Panel.')
180180
// Ensure the panel is hidden and toggle icon is off
181181
if (!this.isHidden) {
182182
this.isHidden = true

libs/remix-ui/top-bar/src/lib/remix-ui-topbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,21 +586,21 @@ export function RemixUiTopbar() {
586586
openTemplateExplorer={openTemplateExplorer}
587587
/>
588588
<div className="d-flex ms-4 gap-3 align-items-center" >
589-
<CustomTooltip placement="bottom-start" tooltipText={`Toggle left panel`}>
589+
<CustomTooltip placement="bottom-start" tooltipText={`Toggle Left Side Panel`}>
590590
<div
591591
className={`codicon codicon-layout-sidebar-left${leftPanelHidden ? '-off' : ''} fs-4`}
592592
data-id="toggleLeftSidePanelIcon"
593593
onClick={() => plugin.call('sidePanel', 'togglePanel')}
594594
></div>
595595
</CustomTooltip>
596-
<CustomTooltip placement="bottom-start" tooltipText={`Toggle bottom panel`}>
596+
<CustomTooltip placement="bottom-start" tooltipText={`Toggle Bottom Panel`}>
597597
<div
598598
className={`codicon codicon-layout-panel${bottomPanelHidden ? '-off' : ''} fs-4`}
599599
data-id="toggleBottomPanelIcon"
600600
onClick={() => plugin.call('terminal', 'togglePanel')}
601601
></div>
602602
</CustomTooltip>
603-
<CustomTooltip placement="bottom-start" tooltipText={`Toggle right panel`}>
603+
<CustomTooltip placement="bottom-start" tooltipText={`Toggle Right Side Panel`}>
604604
<div
605605
className={`codicon codicon-layout-sidebar-right${rightPanelHidden ? '-off' : ''} fs-4`}
606606
data-id="toggleRightSidePanelIcon"

0 commit comments

Comments
 (0)