Advertisement
Guest User

testcase

a guest
Dec 6th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Feature('allapplications');
  3.  
  4. Scenario('test something', (I) => {
  5.     var assert = require('assert');
  6.  I.amOnPage('http://localhost:8080');
  7.   I.see('Login');
  8.   I.click('Login');
  9.   I.see('Username');
  10.   I.see('Password');
  11.   I.fillField('Username', 'dennis');
  12.   I.fillField('Password', '123456');
  13.   assert(I.grabCurrentUrl(),"http://localhost:8080/")
  14.   I.click('Login');
  15.   I.click('All Applications');
  16.   I.see('Roland', '.table');
  17.   I.see('Ananas', '.table');
  18.   I.see('Michael', '.table');
  19.   I.see('roland@gmail.com', '.table');
  20.   I.see('ahmet@gmail.com\t', '.table');
  21.   I.see('hseyin@gmail.com\t', '.table');
  22.   I.see('111111111\t', '.table');
  23.   I.see('22222222', '.table');
  24.     I.see('33333333', '.table');
  25.     I.see('izmir', '.table');
  26.     I.see('Berlin', '.table');
  27.     I.see('istanbul', '.table');
  28.     I.see('ohpls', '.table');
  29.     I.see('omg hire me', '.table');
  30.     I.see('idk man', '.table');
  31.     I.see('Программист', '.table');
  32.     I.see('Повар', '.table');
  33.     I.click('Home');
  34.     assert(I.grabCurrentUrl(),"http://localhost:8080/");
  35.     I.seeElement('.navbar-nav');
  36.  
  37.  
  38.  
  39.  
  40.  
  41. });
  42.  
  43.  
  44. Feature('jobs');
  45.  
  46. Scenario('test something', (I) => {
  47.     var assert = require('assert');
  48.  I.amOnPage('http://localhost:8080');
  49.   I.see('Login');
  50.   I.click('Login');
  51.   I.see('Username');
  52.   I.see('Password');
  53.   I.fillField('Username', 'dennis');
  54.   I.fillField('Password', '123456');
  55.   assert(I.grabCurrentUrl(),"http://localhost:8080/")
  56.   I.click('Login');
  57.   I.click('Jobs');
  58.   assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/")
  59.     I.see('Программист', '.table');
  60.     I.see('Повар', '.table');
  61.     I.see('Опыт Java', '.table');
  62.     I.see('Срочно', '.table');
  63.     I.see('Программист', '.table');
  64.     I.see('2', '.table');
  65.     I.see('1', '.table');
  66.     I.see('01/05/2018', '.table');
  67.     I.see('02/05/2018', '.table');
  68.     I.click('Home');
  69.     assert(I.grabCurrentUrl(),"http://localhost:8080/")
  70.     I.click('Jobs');
  71.     I.click('Add Job');
  72.     assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/add")
  73.    I.seeElement('card-body');
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. });
  84. Feature('login');
  85.  
  86. Scenario('test something', (I) => {
  87.     var assert = require('assert');
  88.  I.amOnPage('http://localhost:8080');
  89.   I.see('Login');
  90.   I.click('Login');
  91.   I.see('Username');
  92.   I.see('Password');
  93.   I.fillField('Username', 'dennis');
  94.   I.fillField('Password', '123456');
  95.   assert(I.grabCurrentUrl(),"http://localhost:8080/")
  96.   I.click('Login');
  97.  
  98.  
  99. });
  100. Feature('JobForm');
  101.  
  102. Scenario('test something', (I) => {
  103.     var assert = require('assert');
  104.  I.amOnPage('http://localhost:8080');
  105.   I.see('Login');
  106.   I.click('Login');
  107.   I.see('Username');
  108.   I.see('Password');
  109.   I.fillField('Username', 'dennis');
  110.   I.fillField('Password', '123456');
  111.   assert(I.grabCurrentUrl(),"http://localhost:8080/")
  112.   I.click('Login');
  113.   I.click('Jobs');
  114.   assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/")
  115.     I.see('Программист', '.table');
  116.     I.see('Повар', '.table');
  117.     I.see('Опыт Java', '.table');
  118.     I.see('Срочно', '.table');
  119.     I.see('Программист', '.table');
  120.     I.see('2', '.table');
  121.     I.see('1', '.table');
  122.     I.see('01/05/2018', '.table');
  123.     I.see('02/05/2018', '.table');
  124.     I.click('Home');
  125.     assert(I.grabCurrentUrl(),"http://localhost:8080/")
  126.     I.click('Jobs');
  127.     I.click('Add Job');
  128.     assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/add")
  129.    
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. });
  140.  
  141. Feature('JobForm');
  142.  
  143. Scenario('test something', (I) => {
  144.   var assert = require('assert');
  145.  I.amOnPage('http://localhost:8080');
  146.   I.see('Login');
  147.   I.click('Login');
  148.   I.see('Username');
  149.   I.see('Password');
  150.   I.fillField('Username', 'dennis');
  151.   I.fillField('Password', '123456');
  152.   assert(I.grabCurrentUrl(),"http://localhost:8080/")
  153.   I.click('Login');
  154.   I.click('Jobs');
  155.   assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/")
  156.     I.see('Программист', '.table');
  157.     I.see('Повар', '.table');
  158.     I.see('Опыт Java', '.table');
  159.     I.see('Срочно', '.table');
  160.     I.see('Программист', '.table');
  161.     I.see('2', '.table');
  162.     I.see('1', '.table');
  163.     I.see('01/05/2018', '.table');
  164.     I.see('02/05/2018', '.table');
  165.     I.click('Home');
  166.     assert(I.grabCurrentUrl(),"http://localhost:8080/")
  167.     I.click('Jobs');
  168.     I.click('Add Job');
  169.     assert(I.grabCurrentUrl(),"http://localhost:8080/jobs/add")
  170.     I.fillField('Job Title:', 'h');
  171.     I.see('size must be between 3 and 20
  172. may not be empty');
  173.      I.fillField('Job Title:', 'Manager');
  174.     I.see('Manager');
  175.     I.fillField('Job Title:', ' hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh');
  176.     I.see(' hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh');
  177.     I.fillField('Job Title:', '«¼ ½ ¾ ⅓ ⅔ ⅛ ⅜ ⅝ ≈ > ≥ ≧ ≩ ≫ ≳ ⋝ ÷ ∕ ± ∓ ≂ ⊟ ⊞ ⨁ ⨤ ⨦ % ∟∠∡ ⊾⟀ ⦜ ⦛ ⦠ √ ∛ ∜  ⍍ ≡ ≢ ⧥ ⩧ ⅀ ◊ ⟠ ⨌⨍⨏ ⨜ ⨛ ◜ ◝ ◞ ◟ ⤸ ⤹ ◆ ◇ ❖ ○ ◍ ● ◐ ◑ ◒ ◓ ◔ ◕ ◖ ◗  ⬡ ⬢ ‰ ⁿ ¹ ² ³ § ∞ ㅅ');
  178.     I.see('Incorrect Input');
  179.     I.fillField('Job Description:', 'h');
  180.     I.see('size must be between 3 and 20
  181. may not be empty');
  182.      I.fillField('Job Description:', '«¼ ½ ¾ ⅓ ⅔ ⅛ ⅜ ⅝ ≈ > ≥ ≧ ≩ ≫ ≳ ⋝ ÷ ∕ ± ∓ ≂ ⊟ ⊞ ⨁ ⨤ ⨦ % ∟∠∡ ⊾⟀ ⦜ ⦛ ⦠ √ ∛ ∜  ⍍ ≡ ≢ ⧥ ⩧ ⅀ ◊ ⟠ ⨌⨍⨏ ⨜ ⨛ ◜ ◝ ◞ ◟ ⤸ ⤹ ◆ ◇ ❖ ○ ◍ ● ◐ ◑ ◒ ◓ ◔ ◕ ◖ ◗  ⬡ ⬢ ‰ ⁿ ¹ ² ³ § ∞ ㅅ');
  183.     I.see('Incorrect Input');
  184. I.fillField('Job Description:', 'h');
  185.     I.see('size must be between 3 and 20
  186. may not be empty');
  187.      I.fillField('Number of People to Hire:', '«¼ ½ ¾ ⅓ ⅔ ⅛ ⅜ ⅝ ≈ > ≥ ≧ ≩ ≫ ≳ ⋝ ÷ ∕ ± ∓ ≂ ⊟ ⊞ ⨁ ⨤ ⨦ % ∟∠∡ ⊾⟀ ⦜ ⦛ ⦠ √ ∛ ∜  ⍍ ≡ ≢ ⧥ ⩧ ⅀ ◊ ⟠ ⨌⨍⨏ ⨜ ⨛ ◜ ◝ ◞ ◟ ⤸ ⤹ ◆ ◇ ❖ ○ ◍ ● ◐ ◑ ◒ ◓ ◔ ◕ ◖ ◗  ⬡ ⬢ ‰ ⁿ ¹ ² ³ § ∞ ㅅ');
  188.     I.see('Incorrect Input');
  189.  
  190.   I.fillField('Number of People to Hire:', '2111114832111111111111111111111111111');
  191.     I.see('Incorrect Input');
  192.     I.fillField('Number of People to Hire:', '3');
  193.     I.see('3');
  194.     I.fillField('Last Application Date:', '19.03.1979');
  195.     I.see('Incorrect input');
  196.  
  197.  I.fillField('Last Application Date:', '08.12.2018');
  198.     I.see('08.12.2018');
  199.     I.click('Add Job');
  200.  
  201.     I.waitForValue('//localhost:8080/jobs', I.grabHTMLFrom('Job'));
  202. I.fillField('Job Description:', '');
  203.     I.see('Job Description','');
  204.     I.click('Add Job');
  205.     I.see("No data to send");
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement