diff options
| author | Caitlin Potter | 2014-02-21 14:31:23 -0500 |
|---|---|---|
| committer | Caitlin Potter | 2014-02-21 14:52:12 -0500 |
| commit | 2f4513339337bb8aa6c9dfe1191d169b4fc57999 (patch) | |
| tree | ce0d47cee3d490c907cef680cc12e131f2a1cbf9 /example/personalLog/scenario | |
| parent | 4a6a3ba7fb08ce99007893ef75365a3e8aff938a (diff) | |
| download | angular.js-2f4513339337bb8aa6c9dfe1191d169b4fc57999.tar.bz2 | |
chore(examples): remove ancient examples from the tree
Let these poor scripts retire, goodness.
Closes #6398
Closes #3310
Diffstat (limited to 'example/personalLog/scenario')
| -rw-r--r-- | example/personalLog/scenario/personalLogScenario.js | 98 | ||||
| -rw-r--r-- | example/personalLog/scenario/runner.html | 11 |
2 files changed, 0 insertions, 109 deletions
diff --git a/example/personalLog/scenario/personalLogScenario.js b/example/personalLog/scenario/personalLogScenario.js deleted file mode 100644 index f9a37cf4..00000000 --- a/example/personalLog/scenario/personalLogScenario.js +++ /dev/null @@ -1,98 +0,0 @@ -describe('personal log', function() { - - beforeEach(function() { - browser().navigateTo('../personalLog.html'); - }); - - - afterEach(function() { - clearCookies(); - }); - - - it('should create new logs and order them in reverse chronological order', function() { - //create first msg - input('newMsg').enter('my first message'); - element('form input[type="submit"]').click(); - - expect(repeater('ul li').count()).toEqual(1); - expect(repeater('ul li').column('log.msg')).toEqual(['my first message']); - - //create second msg - input('newMsg').enter('my second message'); - element('form input[type="submit"]').click(); - - expect(repeater('ul li').count()).toEqual(2); - expect(repeater('ul li').column('log.msg')).toEqual(['my second message', 'my first message']); - }); - - - it('should delete a log when user clicks on the related X link', function() { - //create first msg - input('newMsg').enter('my first message'); - element('form input[type="submit"]').click(); - //create second msg - input('newMsg').enter('my second message'); - element('form input[type="submit"]').click(); - expect(repeater('ul li').count()).toEqual(2); - - element('ul li a:eq(1)').click(); - expect(repeater('ul li').count()).toEqual(1); - expect(repeater('ul li').column('log.msg')).toEqual(['my second message']); - - element('ul li a:eq(0)').click(); - expect(repeater('ul li').count()).toEqual(0); - }); - - - it('should delete all cookies when user clicks on "remove all" button', function() { - //create first msg - input('newMsg').enter('my first message'); - element('form input[type="submit"]').click(); - //create second msg - input('newMsg').enter('my second message'); - element('form input[type="submit"]').click(); - expect(repeater('ul li').count()).toEqual(2); - - element('input[value="remove all"]').click(); - expect(repeater('ul li').count()).toEqual(0); - }); - - - it('should preserve logs over page reloads', function() { - input('newMsg').enter('my persistent message'); - element('form input[type="submit"]').click(); - expect(repeater('ul li').count()).toEqual(1); - - browser().reload(); - - expect(repeater('ul li').column('log.msg')).toEqual(['my persistent message']); - expect(repeater('ul li').count()).toEqual(1); - }); -}); - - -/** - * DSL for deleting all cookies. - */ -angular.scenario.dsl('clearCookies', function() { - /** - * Deletes cookies by interacting with the cookie service within the application under test. - */ - return function() { - this.addFutureAction('clear all cookies', function($window, $document, done) { - var element = $window.angular.element($document[0]), - rootScope = element.scope(), - $cookies = element.data('$injector')('$cookies'), - cookieName; - - rootScope.$apply(function() { - for (cookieName in $cookies) { - delete $cookies[cookieName]; - } - }); - - done(); - }); - }; -}); diff --git a/example/personalLog/scenario/runner.html b/example/personalLog/scenario/runner.html deleted file mode 100644 index 298581d9..00000000 --- a/example/personalLog/scenario/runner.html +++ /dev/null @@ -1,11 +0,0 @@ -<!doctype html"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <title>Personal Log Scenario Runner</title> - <meta http-equiv="expires" content="0"> - <script type="text/javascript" src="../../../src/scenario/angular-bootstrap.js" ng:autotest></script> - <script type="text/javascript" src="personalLogScenario.js"></script> - </head> - <body> - </body> -</html> |
