Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. describe('todomvc', function () {
  2.  
  3. beforeEach(function () {
  4. browser().navigateTo('../app/index.html');
  5. });
  6.  
  7. afterEach(function() {
  8. localStorage.clear();
  9. });
  10.  
  11. describe('localstorage behavior', function() {
  12. it('should load with zero items in localstorage', function() {
  13. expect(repeater('#todo-list li').count()).toEqual(0);
  14. input('newTodo').enter('Foo Bar');
  15. expect(repeater('#todo-list li').count()).toEqual(1);
  16. });
  17. });
  18.  
  19. });
  20.  
  21. basePath = '../';
  22.  
  23. files = [
  24. ANGULAR_SCENARIO,
  25. ANGULAR_SCENARIO_ADAPTER,
  26. 'test/e2e/**/*.js'
  27. ];
  28.  
  29. autoWatch = false;
  30.  
  31. browsers = ['Chrome'];
  32.  
  33. //singleRun = true;
  34.  
  35. proxies = {
  36. '/': 'http://localhost:8000/'
  37. };
  38.  
  39. junitReporter = {
  40. outputFile: 'test_out/e2e.xml',
  41. suite: 'e2e'
  42. };
  43.  
  44. <form class="myForm">
  45.  
  46. element(':form.myForm').submit();
  47.  
  48. describe('localstorage behavior', function() {
  49. it('should load with zero items in localstorage', function() {
  50. var e = jQuery.Event("keydown", {
  51. keyCode: 13
  52. });
  53.  
  54. expect(repeater('#todo-list li').count()).toEqual(0);
  55. input('newTodo').enter('Foo Bar');
  56.  
  57. element = angular.element('<input name="mytext" type="text" ng-model="mytext">');
  58. element = compile(element)(scope);
  59.  
  60. element.trigger(e);
  61. scope.$digest();
  62.  
  63. expect(repeater('#todo-list li').count()).toEqual(1);
  64. });
  65. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement