Skip to content

Commit fb7ecb8

Browse files
committed
check three toggle icons e2e
1 parent a176c52 commit fb7ecb8

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ module.exports = {
77
before: function (browser: NightwatchBrowser, done: VoidFunction) {
88
init(browser, done)
99
},
10-
10+
'Check if all three toggle icons are visible on topbar #group1': function (browser: NightwatchBrowser) {
11+
browser
12+
.waitForElementVisible('*[data-id="toggleLeftSidePanelIcon"]')
13+
.waitForElementVisible('.codicon-layout-sidebar-left')
14+
.waitForElementVisible('*[data-id="toggleBottomPanelIcon"]')
15+
.waitForElementVisible('.codicon-layout-panel')
16+
.waitForElementVisible('*[data-id="toggleRightSidePanelIcon"]')
17+
.waitForElementVisible('.codicon-layout-sidebar-right')
18+
},
1119
'Check if RemixAI plugin is pinned to right side panel on load #group1': function (browser: NightwatchBrowser) {
1220
browser
1321
.waitForElementVisible('*[data-id="movePluginToLeft"]')
22+
.waitForElementVisible('*[data-id="toggleRightSidePanelIcon"]')
1423
.waitForElementVisible('*[data-id="remix-ai-assistant-starter-beginner-0"]')
1524
.waitForElementVisible('*[data-id="remix-ai-assistant-starter-intermediate-1"]')
1625
.waitForElementVisible('*[data-id="remix-ai-assistant-starter-expert-2"]')
@@ -31,7 +40,7 @@ module.exports = {
3140
.waitForElementVisible('*[data-id="hideRightSidePanel"]')
3241
.click('*[data-id="hideRightSidePanel"]')
3342
.waitForElementNotVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
34-
.click('*[data-id="toggleRightSidePanel"]')
43+
.click('*[data-id="toggleRightSidePanelIcon"]')
3544
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
3645
},
3746
'Toggle right side panel, reload IDE, panel state should persist #group1': function (browser: NightwatchBrowser) {
@@ -40,8 +49,8 @@ module.exports = {
4049
.click('*[data-id="hideRightSidePanel"]')
4150
.waitForElementNotVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
4251
.refresh()
43-
.waitForElementVisible('*[data-id="toggleRightSidePanel"')
44-
.click('*[data-id="toggleRightSidePanel"]')
52+
.waitForElementVisible('*[data-id="toggleRightSidePanelIcon"')
53+
.click('*[data-id="toggleRightSidePanelIcon"]')
4554
.waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]')
4655
},
4756
'Swap pinned plugin from right side panel when panel is hidden #group1': function (browser: NightwatchBrowser) {

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
@@ -589,21 +589,21 @@ export function RemixUiTopbar() {
589589
<CustomTooltip placement="bottom-start" tooltipText={`Toggle left panel`}>
590590
<div
591591
className={`codicon codicon-layout-sidebar-left${leftPanelHidden ? '-off' : ''} fs-4`}
592-
data-id="toggleLeftSidePanel"
592+
data-id="toggleLeftSidePanelIcon"
593593
onClick={() => plugin.call('sidePanel', 'togglePanel')}
594594
></div>
595595
</CustomTooltip>
596596
<CustomTooltip placement="bottom-start" tooltipText={`Toggle bottom panel`}>
597597
<div
598598
className={`codicon codicon-layout-panel${bottomPanelHidden ? '-off' : ''} fs-4`}
599-
data-id="toggleBottomPanel"
599+
data-id="toggleBottomPanelIcon"
600600
onClick={() => plugin.call('terminal', 'togglePanel')}
601601
></div>
602602
</CustomTooltip>
603603
<CustomTooltip placement="bottom-start" tooltipText={`Toggle right panel`}>
604604
<div
605605
className={`codicon codicon-layout-sidebar-right${rightPanelHidden ? '-off' : ''} fs-4`}
606-
data-id="toggleRightSidePanel"
606+
data-id="toggleRightSidePanelIcon"
607607
onClick={() => plugin.call('rightSidePanel', 'togglePanel')}
608608
></div>
609609
</CustomTooltip>

0 commit comments

Comments
 (0)