From 9878fee2992a845dff1e3e083f487013ebde8064 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Fri, 14 Feb 2014 11:44:41 +0000 Subject: 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. --- test/e2e/docsAppE2E.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test') 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 -- cgit v1.2.3