spec: add_folder method sometimes doesn't add full name

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 <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
This commit is contained in:
James Butters 2020-03-20 23:43:48 -06:00
parent 1504a50dda
commit 64b7c8c3fa
1 changed files with 2 additions and 1 deletions

View File

@ -158,8 +158,9 @@ module FilesCommon
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