Skip to content

Commit

Permalink
Send backspace key (and not delete key)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmunozv04 committed Jan 9, 2024
1 parent 5c73ec7 commit 761ea7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/wirecloud/commons/utils/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,6 @@ def select(self, components=(), key=Keys.CONTROL):
ActionChains(self.testcase.driver).key_up(key).perform()
return self

def send_delete_key(self):
ActionChains(self.testcase.driver).send_keys(Keys.DELETE).perform()
def send_backspace_key(self):
ActionChains(self.testcase.driver).send_keys(Keys.BACKSPACE).perform()
return self
3 changes: 2 additions & 1 deletion src/wirecloud/platform/wiring/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2751,13 +2751,14 @@ def test_remove_components_using_key_delete_when_behaviour_engine_is_enabled(sel
wiring.select(components=(widget1, widget2, operator), key=Keys.COMMAND)

# Remove the selection using the backspace key
wiring.send_delete_key()
wiring.send_backspace_key()

modal = FormModalTester(self, self.wait_element_visible(".wc-alert-modal"))
self.assertIn('Test 2', modal.body.text)
self.assertNotIn('Test 1', modal.body.text)
self.assertNotIn('TestOperator', modal.body.text)
modal.accept()
modal.wait_close()

# Wait until the browser reacts
time.sleep(0.4)
Expand Down

0 comments on commit 761ea7a

Please sign in to comment.