fixing data-id

pull/3380/head
lianahus 2 years ago
parent e071f74ea1
commit 8becfde56d
  1. 2
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  2. 22
      apps/remix-ide-e2e/src/tests/workspace_git.test.ts
  3. 16
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx

@ -415,7 +415,7 @@ module.exports = {
})
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[3]') // rename workspace_name
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[4]') // rename workspace_name
.useCss()
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]')
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextRename"]')

@ -68,8 +68,8 @@ module.exports = {
.clickLaunchIcon('filePanel')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
@ -95,8 +95,8 @@ module.exports = {
browser
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
@ -107,8 +107,8 @@ module.exports = {
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
@ -119,7 +119,7 @@ module.exports = {
.waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
@ -142,8 +142,8 @@ module.exports = {
locateStrategy: 'xpath',
})
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')
@ -165,8 +165,8 @@ module.exports = {
.waitForElementNotVisible('[data-id="workspaceGitPanel"]')
.useXpath()
.click('//*[@id="workspacesMenuDropdown"]/span/i')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[5]')
.waitForElementVisible('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.click('//*[@id="workspacesMenuDropdown"]/div/ul/a[6]')
.useCss()
.waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]')
.click('[data-id="fileSystemModalDialogModalBody-react"]')

@ -98,24 +98,24 @@ export function HamburgerMenu (props: HamburgerMenuProps) {
tooltipText={<FormattedMessage id='filePanel.workspace.deleteAll' />}
>
<div
data-id='workspaceDelete'
data-id='workspaceDeleteAll'
onClick={() => {
props.deleteAllWorkspaces()
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceDeleteAll'])
props.hideIconsMenu(!showIconsMenu)
}}
key={`workspacesDelete-fe-ws`}
key={`workspacesDeleteAll-fe-ws`}
>
<span
hidden={ hideWorkspaceOptions || hideLocalhostOptions }
id='workspaceDelete'
data-id='workspaceDelete'
id='workspaceDeleteAll'
data-id='workspaceDeleteAll'
onClick={() => {
props.deleteAllWorkspaces()
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceDeleteAll'])
props.hideIconsMenu(!showIconsMenu)
}}
className='far fa-trash pl-2'
className='far fa-trash-alt pl-2'
>
</span>
<span className="pl-3"><FormattedMessage id='filePanel.deleteAll' /></span>
@ -152,7 +152,7 @@ export function HamburgerMenu (props: HamburgerMenuProps) {
</div>
</CustomTooltip>
</Dropdown.Item>
<Dropdown.Item><Dropdown.Divider className="border mb-0 mt-0" /></Dropdown.Item>
<Dropdown.Divider className="border mb-0 mt-0 remixui_menuhr" style={{ pointerEvents: 'none' }} />
<Dropdown.Item>
<CustomTooltip
placement="right-start"
@ -185,7 +185,7 @@ export function HamburgerMenu (props: HamburgerMenuProps) {
</div>
</CustomTooltip>
</Dropdown.Item>
<Dropdown.Item><Dropdown.Divider className="border mt-0 mb-0 remixui_menuhr" style={{ pointerEvents: 'none' }}/></Dropdown.Item>
<Dropdown.Divider className="border mt-0 mb-0 remixui_menuhr" style={{ pointerEvents: 'none' }}/>
<Dropdown.Item>
<CustomTooltip
placement="right-start"
@ -250,7 +250,7 @@ export function HamburgerMenu (props: HamburgerMenuProps) {
</div>
</CustomTooltip>
</Dropdown.Item>
<Dropdown.Item><Dropdown.Divider className="border mt-0 mb-0 remixui_menuhr" style={{ pointerEvents: 'none' }}/></Dropdown.Item>
<Dropdown.Divider className="border mt-0 mb-0 remixui_menuhr" style={{ pointerEvents: 'none' }}/>
<Dropdown.Item>
<CustomTooltip
placement="right-start"

Loading…
Cancel
Save