diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 21:10:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 21:10:07 +0300 |
commit | bc7374e61208637f6fb116e2ca59c7162b07cba9 (patch) | |
tree | d34a9d8680f808bd327123ebb2c861071f1e7635 /qa | |
parent | c48bbe6650648fa034696de25983418981e695eb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/profile/ssh_keys.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/qa/qa/page/profile/ssh_keys.rb b/qa/qa/page/profile/ssh_keys.rb index db71062cec6..0653df62560 100644 --- a/qa/qa/page/profile/ssh_keys.rb +++ b/qa/qa/page/profile/ssh_keys.rb @@ -5,12 +5,15 @@ module QA module Profile class SSHKeys < Page::Base view 'app/views/profiles/keys/_form.html.haml' do - element :key_expiry_date_field element :key_title_field element :key_public_key_field element :add_key_button end + view 'app/assets/javascripts/access_tokens/components/expires_at_field.vue' do + element :expiry_date_field + end + view 'app/helpers/ssh_keys_helper.rb' do element :delete_ssh_key_button element :ssh_key_delete_modal @@ -25,19 +28,21 @@ module QA fill_element(:key_title_field, title) # Expire in 2 days just in case the key is created just before midnight fill_expiry_date(Date.today + 2) + # Close the datepicker + find_element(:expiry_date_field).find('input').send_keys(:enter) click_element(:add_key_button) end def fill_expiry_date(date) - date = date.strftime('%m/%d/%Y') if date.is_a?(Date) + date = date.strftime('%Y-%m-%d') if date.is_a?(Date) begin - Date.strptime(date, '%m/%d/%Y') + Date.strptime(date, '%Y-%m-%d') rescue ArgumentError - raise "Expiry date must be in mm/dd/yyyy format" + raise "Expiry date must be in YYYY-MM-DD format" end - fill_element(:key_expiry_date_field, date) + fill_element(:expiry_date_field, date) end def remove_key(title) |