aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Cross2014-01-09 11:21:54 -0800
committerJeff Cross2014-01-09 22:41:52 -0800
commit039b990d8dc73e59418114b49c36797e44127c76 (patch)
tree7357c29d9cd1a79ba6a8d6a2354df10ddeb9f5b4
parent5a9cb8be3fae06cc0fcefc3d4340d3847bb6b925 (diff)
downloadangular.js-039b990d8dc73e59418114b49c36797e44127c76.tar.bz2
test(docs): add protractor tests for docs app
Closes #5437
-rw-r--r--protractor-conf.js1
-rw-r--r--test/e2e/docsAppE2E.js40
2 files changed, 41 insertions, 0 deletions
diff --git a/protractor-conf.js b/protractor-conf.js
index 4039d5fc..d7ab2b32 100644
--- a/protractor-conf.js
+++ b/protractor-conf.js
@@ -3,6 +3,7 @@ exports.config = {
specs: [
'build/docs/ptore2e/**/*.js',
+ 'test/e2e/docsAppE2E.js'
],
capabilities: {
diff --git a/test/e2e/docsAppE2E.js b/test/e2e/docsAppE2E.js
new file mode 100644
index 00000000..f92d834e
--- /dev/null
+++ b/test/e2e/docsAppE2E.js
@@ -0,0 +1,40 @@
+describe('docs.angularjs.org', function () {
+ describe('App', function () {
+ // it('should filter the module list when searching', function () {
+ // browser.get();
+ // browser.waitForAngular();
+
+ // var search = element(by.input('q'));
+ // search.clear();
+ // search.sendKeys('ngBind');
+
+ // var firstModule = element(by.css('.search-results a'));
+ // expect(firstModule.getText()).toEqual('ngBind');
+ // });
+
+
+ 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"]'));
+ ngBindLink.click();
+
+ var pageBody = element(by.css('.content h1 code'));
+ expect(pageBody.getText()).toEqual('ngClick');
+ });
+
+
+ it('should show the functioning input directive example', function () {
+ browser.get('index-nocache.html#!/api/ng.directive:input');
+ //Wait for animation
+ browser.sleep(500);
+
+ var nameInput = element(by.input('user.name'));
+ nameInput.click();
+ nameInput.sendKeys('!!!');
+
+ var code = element(by.css('.doc-example-live tt'));
+ expect(code.getText()).toContain('guest!!!');
+ });
+ });
+})