aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-02-14 11:44:41 +0000
committerPeter Bacon Darwin2014-02-16 19:03:43 +0000
commit9878fee2992a845dff1e3e083f487013ebde8064 (patch)
treeb7e9995029f56c2527cfc3c7a8667e71cc671129 /test
parent8849d70af89bccb1a327ffee43867175d84b1c15 (diff)
downloadangular.js-9878fee2992a845dff1e3e083f487013ebde8064.tar.bz2
test(docs-app-e2e): refactor test inline with new docs app
The links to code elements have now changed: api/ng.directive:ngClick -> api/ng/directive/ngClick. Examples now run inside iframes, so we need to instruct Protractor to switch to the example iframe.
Diffstat (limited to 'test')
-rw-r--r--test/e2e/docsAppE2E.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/e2e/docsAppE2E.js b/test/e2e/docsAppE2E.js
index 625e384c..cf05c451 100644
--- a/test/e2e/docsAppE2E.js
+++ b/test/e2e/docsAppE2E.js
@@ -16,24 +16,27 @@ describe('docs.angularjs.org', function () {
it('should change the page content when clicking a link to a service', function () {
browser.get('');
- var ngBindLink = element(by.css('.definition-table td a[href="api/ng.directive:ngClick"]'));
+ var ngBindLink = element(by.css('.definition-table td a[href="api/ng/directive/ngClick"]'));
ngBindLink.click();
- var pageBody = element(by.css('.content h1 code'));
+ var pageBody = element(by.css('h1'));
expect(pageBody.getText()).toEqual('ngClick');
});
it('should show the functioning input directive example', function () {
- browser.get('index-nocache.html#!/api/ng.directive:input');
+ browser.get('index-debug.html#!/api/ng/directive/input');
+
//Wait for animation
browser.sleep(500);
+ browser.switchTo().frame('example-input-directive');
+
var nameInput = element(by.input('user.name'));
nameInput.sendKeys('!!!');
- var code = element(by.css('.doc-example-live tt'));
+ var code = element(by.css('tt'));
expect(code.getText()).toContain('guest!!!');
});
});
-})
+}); \ No newline at end of file