Advertisement
Guest User

Untitled

a guest
Sep 8th, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.99 KB | None | 0 0
  1. var url = 'http://junction.dev.skygate.pl/';
  2.  
  3. describe('Check main page', function () {
  4. // it('should have right title', function () {
  5. // return browser
  6. // .url(url)
  7. // .getTitle().should.eventually.be.equal('Junction');
  8. // });
  9. // it('should display error message', function () {
  10. // return browser
  11. // .waitForExist("#login")
  12. // .click('#login')
  13. // .waitForExist(".notification-wrapper")
  14. // });
  15. // it("should have proper error text", function () {
  16. // return browser
  17. // getText('.notification-wrapper', function (err, spans) {
  18. // expect(spans).to.equal('Please enter your email\n×');
  19. // });
  20. // });
  21. // });
  22.  
  23. // You have to register firslty
  24. // describe('Successful login with Junction valid email and password', function () {
  25. // // To be successfully logged in you need to enter valid email and valid password.
  26. // // 1. You have to be registered to the application first.
  27. //
  28. // it('Should be redirected to my courses view', function () {
  29. // return browser
  30. // .url(url)
  31. // .waitForVisible("#username")
  32. // .addValue('#username', 'agata.wisniewska.skygate+admin@gmail.com')
  33. // .addValue('#loginCtrl #password', 'test1')
  34. // .waitForVisible('#login')
  35. // .click('#login')
  36. // .waitForVisible('.profile-toggle');
  37. // });
  38. // });
  39. //
  40. // describe('Unsuccessful login to application using correct email and incorrect password', function () {
  41. // // Make a mistake in one data.
  42. // // You have to be registered to the app first
  43. // it('Should display error message', function () {
  44. // return browser
  45. // .url(url)
  46. // .addValue('#username', 'agata.wisniewska.skygate+admin@gmail.com')
  47. // .addValue('#password', 'test0')
  48. // .click('#login')
  49. // .waitForExist(".notification-wrapper")
  50. // });
  51. //
  52. // it("should have proper error text", function () {
  53. // return browser
  54. // .getText('.notification-wrapper', function (err, spans) {
  55. // expect(spans).to.equal('email or/and password is incorrect\nx');
  56. // });
  57. // });
  58. // });
  59. //
  60. // describe('Unsucceful login to application using incorrect email and correct password', function () {
  61. // // Make a mistake in email address -> you can miss a dot, miss @/ or enter not existing email.
  62. // // You have to own your account on junction
  63. // it('Should display error message', function () {
  64. // return browser
  65. // .url(url)
  66. // .addValue('#username', 'agata.wisniewska@gmail.com')
  67. // .addValue('#password', 'test1')
  68. // .click('#login')
  69. // .waitForExist(".notification-wrapper")
  70. // });
  71. //
  72. // it("should have proper error text", function () {
  73. // return browser
  74. // .getText('.notification-wrapper', function (err, spans) {
  75. // expect(spans).to.equal('user does not exist\nx');
  76. // });
  77. // });
  78. // });
  79. //
  80. describe('Unsuccessful login to application using invalid both email address and password', function () {
  81. // Test the behaviour of app while entering both wrong email address and wrong password
  82. // You have to be registered
  83. it('Should display error message', function () {
  84. return browser
  85. .url(url)
  86. .waitForVisible("#username")
  87. .addValue('#username', 'agata.wisniewska@gmail.com')
  88. .addValue('#loginCtrl #password', 'test1')
  89. .click('#login')
  90. .waitForVisible(".notification-wrapper");
  91. });
  92.  
  93. it("should have proper error text", function () {
  94. return browser
  95. .getText('[compile="notification.message"]', function (err, spans) {
  96. expect(spans).to.equal('user does not exist\nx');
  97. });
  98. });
  99. });
  100. //
  101. // describe('Unsuccessful login to application keeping password field blank', function () {
  102. // // Fill only one field / password or email, and the other keep blank.
  103. // // You have to be registered to app first.
  104. // it('Should display error message', function () {
  105. // return browser
  106. // .url(url)
  107. // .addValue('#username', 'agata.wisniewska@gmail.com')
  108. // .click('#login')
  109. // .waitForExist(".notification-wrapper")
  110. // });
  111. //
  112. // it("should have proper error text", function () {
  113. // return browser
  114. // .getText('.notification-wrapper', function (err, spans) {
  115. // expect(spans).to.equal('Please enter your password\nx');
  116. // });
  117. // });
  118. // });
  119. //
  120. // describe('Unsuccessful login to application keeeping email field blank', function () {
  121. // // Fill only one field / password or email, and the other keep blank.
  122. // // You have to be registered to app first.
  123. // it('Should display error message', function () {
  124. // return browser
  125. // .url(url)
  126. // .addValue('#password', 'test1')
  127. // .click('#login')
  128. // .waitForExist(".notification-wrapper")
  129. // });
  130. //
  131. // it("should have proper error text", function () {
  132. // return browser
  133. // .getText('.notification-wrapper', function (err, spans) {
  134. // expect(spans).to.equal('Please enter your email\nx');
  135. // });
  136. // });
  137. // });
  138. //
  139. // describe('Log in with Google', function () {
  140. // // 1. You have to have your own google account2. You have to choose this option by clicking on button "sign in with google"
  141. // // Choose an option to sign in with google
  142. // // 1. You have to own your personal google account2. Fill the fields email and password with correct data
  143. // it('Should be redirected to Google page', function () {
  144. // return browser.click('#googlelogin')
  145. // .waitForVisible('#Email')
  146. // .getTitle().should.eventually.be.equal("Logowanie – Konta Google")
  147. // });
  148. //
  149. // it('should be successfully log in', function () {
  150. // return browser
  151. // .addValue('#Email','agata.wisniewska.skygate@gmail.com')
  152. // .click('#next')
  153. // .waitForVisible('#Passwd')
  154. // .addValue('#Passwd', 'Test_123')
  155. // .click('#signIn')
  156. // .waitForVisible('#submit_approve_access')
  157. // .click('#submit_approve_access')
  158. // });
  159. // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement