Browse Source

check for specific tags

Girish Ramakrishnan 8 năm trước cách đây
mục cha
commit
e2794a051c
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      test/test.js

+ 3 - 3
test/test.js

@@ -71,8 +71,8 @@ describe('Application life cycle test', function () {
     }
 
     function checkPermalink(done) {
-        browser.get('https://' + app.fqdn + '/hello-cloudron');
-        browser.findElement(by.xpath('//*[text()="Hello Cloudron!"]')).then(function () { done(); });
+        browser.get('https://' + app.fqdn + '/hello-world');
+        browser.findElement(by.xpath('//h1[text()="Hello Cloudron!"]')).then(function () { done(); });
     }
 
     function checkMedia(done) {
@@ -85,7 +85,7 @@ describe('Application life cycle test', function () {
 
     function checkPost(done) {
         browser.get('https://' + app.fqdn);
-        browser.findElement(by.xpath('//*[text()="Hello Cloudron!"]')).then(function () { done(); });
+        browser.findElement(by.xpath('//h2/a[text()="Hello Cloudron!"]')).then(function () { done(); });
     }
 
     xit('build app', function () {