소스 검색

Nightwatch test improvements

n1474335 2 년 전
부모
커밋
046a0917e7
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 2
      tests/browser/nightwatch.js
  2. 4 4
      tests/browser/ops.js

+ 2 - 2
tests/browser/nightwatch.js

@@ -90,7 +90,7 @@ module.exports = {
         browser
             .useCss()
             .waitForElementNotVisible("#stale-indicator", 1000)
-            .expect.element("#output-text .cm-content").to.have.property("textContent").that.equals("44 6f 6e 27 74 20 50 61 6e 69 63 2e");
+            .expect.element("#output-text .cm-content").text.that.equals("44 6f 6e 27 74 20 50 61 6e 69 63 2e");
 
         // Clear recipe
         browser
@@ -206,7 +206,7 @@ module.exports = {
             .useCss()
             .waitForElementVisible(".operation .op-title", 1000)
             .waitForElementNotVisible("#stale-indicator", 1000)
-            .expect.element("#output-text .cm-content").to.have.property("textContent").which.matches(/[\da-f-]{36}/);
+            .expect.element("#output-text .cm-content").text.which.matches(/[\da-f-]{36}/);
 
         browser.click("#clr-recipe");
     },

+ 4 - 4
tests/browser/ops.js

@@ -410,7 +410,7 @@ function bakeOp(browser, opName, input, args=[]) {
         .click("#clr-recipe")
         .click("#clr-io")
         .waitForElementNotPresent("#rec-list li.operation")
-        .expect.element("#input-text .cm-content").to.have.property("textContent").that.equals("");
+        .expect.element("#input-text .cm-content").text.that.equals("");
 
     browser
         .perform(function() {
@@ -419,7 +419,7 @@ function bakeOp(browser, opName, input, args=[]) {
         .urlHash("recipe=" + recipeConfig)
         .sendKeys("#input-text .cm-content", input)
         .waitForElementPresent("#rec-list li.operation")
-        .expect.element("#input-text .cm-content").to.have.property("textContent").that.equals(input);
+        .expect.element("#input-text .cm-content").text.that.equals(input);
 
     browser
         .waitForElementVisible("#stale-indicator", 5000)
@@ -464,8 +464,8 @@ function testOpHtml(browser, opName, input, cssSelector, output, args=[]) {
     bakeOp(browser, opName, input, args);
 
     if (typeof output === "string") {
-        browser.expect.element("#output-html " + cssSelector).text.that.equals(output); // TODO
+        browser.expect.element("#output-html " + cssSelector).text.that.equals(output);
     } else if (output instanceof RegExp) {
-        browser.expect.element("#output-html " + cssSelector).text.that.matches(output); // TODO
+        browser.expect.element("#output-html " + cssSelector).text.that.matches(output);
     }
 }