From 1e03b909b2757a505983f9f16ecba02df4134e29 Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Tue, 7 Sep 2021 22:52:22 +0100 Subject: [PATCH] added pause to workspace test and refactored dragable bar --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 3 +++ libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index f31c9b840a..e58d2606e4 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -42,6 +42,7 @@ module.exports = { .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .addFile('test.sol', { content: 'test' }) + .pause(1000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') .click('*[data-id="workspaceCreate"]') // create workspace_name_1 .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -49,6 +50,7 @@ module.exports = { .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_name_1' }) .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .pause(1000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') .click('*[data-id="workspacesSelect"] option[value="workspace_name"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') @@ -63,6 +65,7 @@ module.exports = { .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextRename"]')['value'] = 'workspace_name_renamed' }) .click('*[data-id="workspacesModalDialogModalDialogModalFooter-react"] .modal-ok') .click('*[data-id="workspacesSelect"] option[value="workspace_name_1"]') + .pause(1000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') .click('*[data-id="workspacesSelect"] option[value="workspace_name_renamed"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 398ece7e8a..c27444acb8 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -315,6 +315,9 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const mousedown = (event: MouseEvent) => { setSeparatorYPosition(event.clientY) + const leftRef = document.getElementById('dragId') + leftRef.style.backgroundColor = '#007AA6' + leftRef.style.border = '2px solid #007AA6' setDragging(true) } @@ -330,6 +333,9 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } const onMouseUp = () => { + const leftRef = document.getElementById('dragId') + leftRef.style.backgroundColor = '' + leftRef.style.border = '' setDragging(false) }