Girish Ramakrishnan пре 7 година
родитељ
комит
7750165335
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      test/test.js

+ 6 - 2
test/test.js

@@ -112,7 +112,11 @@ describe('Application life cycle test', function () {
         }).then(function () {
             return browser.findElement(by.xpath('//li[@id="nodebb-plugin-beep"]//button[@data-action="toggleActive"]')).click(); // activate the plugin
         }).then(function () {
-            return browser.sleep(20000);  // wait for the action to succeed
+            return browser.wait(until.elementLocated(by.xpath('//button[text()="Confirm"]')), TEST_TIMEOUT);
+        }).then(function () {
+            return browser.findElement(by.xpath('//button[text()="Confirm"]')).click();
+        }).then(function () {
+            return browser.sleep(20000); // wait for the action to succeed
         }).then(function() {
             done();
         });
@@ -131,7 +135,7 @@ describe('Application life cycle test', function () {
             return browser.wait(until.elementLocated(by.xpath('//a[text()="Change Picture"]')), TEST_TIMEOUT);
         }).then(function () {
             var button = browser.findElement(by.xpath('//a[text()="Change Picture"]'));
-            return browser.executeScript('arguments[0].scrollIntoView(true)', button);
+            return browser.executeScript('arguments[0].scrollIntoView(false)', button);
         }).then(function () {
             return browser.findElement(by.xpath('//a[text()="Change Picture"]')).click();
         }).then(function () {