|
|
DescriptionA script for smoke-testing remoting webapps.
BUG=
Committed: https://crrev.com/7a1d31b828ffb9b8db4181f08514ae5e78ea7b7f
Cr-Commit-Position: refs/heads/master@{#295827}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Common methods for some repeated funcitonality. #Messages
Total messages: 17 (6 generated)
anandc@chromium.org changed reviewers: + garykac@chromium.org
Hi Gary, PTAL. Thanks.
https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... File chrome/test/remoting/install_and_launch_app.py (right): https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:109: # TODO(anandc): add check to make sure the app we are testing isn't already nit: "Add" (and "Is" below) https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:125: time.sleep(2) Not sure if it's worth doing, but these time.sleep(2)s could be put into a wait() function, or the 2 could be made a constant. This would make it easier to experiment with different values. https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:139: # and launch it. (2 GET calls again, once is not enough; see not above.) The code will be a bit easier to follow if you have a method that wraps these 2 gets together. That'll make this code easier to read and will move all the comments about the problem into one place. def get_wait(link): """ We need to 'get' it twice because ... """ driver.get(link) driver.get(link) time.sleep(2) https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:144: launch_button = driver.find_element_by_xpath(LAUNCH_BUTTON_XPATH) This chunk can be re-used as well: def click_wait(button_xpath): button = driver.find_element_by_xpath(button_xpath) button.click() time.sleep(2) Then this try-block becomes something like: chrome_apps_link = 'chrome://apps' cws_app_detail_link = '%s/%s' % (CWS_URL, args.app_id) get_wait(chrome_apps_link) get_wait(cws_app_detail_link) click_wait(FREE_BUTTON_XPATH) # Switch tab... get_wait(cws_app_detail_link) click_wait(LAUNCH_BUTTON_XPATH) # Check connecting dialog...
Thank you, Gary. PTAL. https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... File chrome/test/remoting/install_and_launch_app.py (right): https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:109: # TODO(anandc): add check to make sure the app we are testing isn't already On 2014/09/18 23:33:16, garykac wrote: > nit: "Add" > > (and "Is" below) Done. https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:125: time.sleep(2) On 2014/09/18 23:33:16, garykac wrote: > Not sure if it's worth doing, but these time.sleep(2)s could be put into a > wait() function, or the 2 could be made a constant. This would make it easier to > experiment with different values. Done. https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:139: # and launch it. (2 GET calls again, once is not enough; see not above.) On 2014/09/18 23:33:16, garykac wrote: > The code will be a bit easier to follow if you have a method that wraps these 2 > gets together. That'll make this code easier to read and will move all the > comments about the problem into one place. > > def get_wait(link): > """ We need to 'get' it twice because ... > """ > driver.get(link) > driver.get(link) > time.sleep(2) Makes sense. Thanks. Done, with a slight difference: call the function twice when going to the app-detail page, rather than have 2 gets within the function. https://codereview.chromium.org/584543003/diff/1/chrome/test/remoting/install... chrome/test/remoting/install_and_launch_app.py:144: launch_button = driver.find_element_by_xpath(LAUNCH_BUTTON_XPATH) On 2014/09/18 23:33:16, garykac wrote: > This chunk can be re-used as well: > > def click_wait(button_xpath): > button = driver.find_element_by_xpath(button_xpath) > button.click() > time.sleep(2) > > Then this try-block becomes something like: > > chrome_apps_link = 'chrome://apps' > cws_app_detail_link = '%s/%s' % (CWS_URL, args.app_id) > > get_wait(chrome_apps_link) > get_wait(cws_app_detail_link) > click_wait(FREE_BUTTON_XPATH) > > # Switch tab... > > get_wait(cws_app_detail_link) > click_wait(LAUNCH_BUTTON_XPATH) > > # Check connecting dialog... Done.
garykac@google.com changed reviewers: + garykac@google.com
lgtm
The CQ bit was checked by anandc@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584543003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
lgtm
The CQ bit was checked by garykac@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584543003/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 33ac986f1e0a9d5c9d0fd49bd5d12ff90bb5b77d
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/7a1d31b828ffb9b8db4181f08514ae5e78ea7b7f Cr-Commit-Position: refs/heads/master@{#295827} |