Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { TypeOperationPage } from './typeoperations.po';
  2. import { browser, logging } from 'protractor';
  3. import { protractor } from 'protractor/built/ptor';
  4.  
  5. describe('workspace-project App', () => {
  6.   let page: TypeOperationPage;
  7.  
  8.   beforeEach(() => {
  9.     page = new TypeOperationPage();
  10.   });
  11.  
  12.   it('should display type operation name creation message error', () => {
  13.     page.navigateTo();
  14.  
  15.     page.getCreateButton().click();
  16.  
  17.     page.getNameTextbox().sendKeys("")
  18.  
  19.     page.getAddButton().click();
  20.  
  21.     expect(page.getCreationMessage()).toEqual('Creation Error: Type Operation name can\'t be empty!');
  22.  
  23.   });
  24.  
  25.   it('should display type operation time creation message error', () => {
  26.     page.navigateTo();
  27.  
  28.     page.getCreateButton().click();
  29.  
  30.     page.getNameTextbox().sendKeys("E2E Type Operation");
  31.     page.getHourTextbox().sendKeys("-2");
  32.     page.getMinuteTextbox().sendKeys("1");
  33.  
  34.     page.getAddButton().click();
  35.  
  36.     expect(page.getCreationMessage()).toEqual('Creation Error: Type Operation Hours can\'t be negative!');
  37.   });
  38.  
  39.   it('should display type operation tool creation message error', () => {
  40.     page.navigateTo();
  41.  
  42.     page.getCreateButton().click();
  43.  
  44.     page.getNameTextbox().sendKeys("E2E Type Operation");
  45.     page.getHourTextbox().sendKeys("2");
  46.     page.getMinuteTextbox().sendKeys("1");
  47.  
  48.     page.getAddButton().click();
  49.  
  50.     expect(page.getCreationMessage()).toEqual('Creation Error: Must select a Type Operation Tool!');
  51.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement