Skip to content

Commit

Permalink
spec: add_folder method sometimes doesn't add full name
Browse files Browse the repository at this point in the history
send_keys has an issue that sometimes it won't send
the full string before the next line of code is executed
resulting in a new folder with wrong name. It's recommended
to add a click to the input before send_keys.

flag = none

Change-Id: Ib2659a418d29ef85fd0fcadd91037e5f309e94a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/230876
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Jacob Powell <[email protected]>
Reviewed-by: Derek Bender <[email protected]>
QA-Review: James Butters <[email protected]>
Product-Review: James Butters <[email protected]>
  • Loading branch information
jbutte committed Mar 22, 2020
1 parent 1504a50 commit 64b7c8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/selenium/helpers/files_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ def cancel_delete_on_dialog
def add_folder(name = 'new folder')
click_new_folder_button
new_folder = f("input[aria-label='Folder Name']")
new_folder.click # sometimes send_keys won't send all keys unless click first
new_folder.send_keys(name)
new_folder.send_keys(:return)
f('.ef-edit-name-accept').click
wait_for_ajaximations
end

Expand Down

0 comments on commit 64b7c8c

Please sign in to comment.