jasmine - How to integrate Protractor test cases in Atom using Typescript? -


i have installed typescript atom writing protractor scripts automation.

my code written in jasmine framework protractor supports nicely.

i wrote in structure.

 describe('sign in',function(){      ('verify modules present', function(){      loginpage.enterusernameandpasswordwithsignin('a','b');      browser.sleep(3000);      var module = element(by.xpath("//*[@ng-reflect-router-link='my']"));      browser.wait(protractor.expectedconditions.elementtobeclickable(module),                                   8000).thencatch(function () {               assert.fail(' element not click able');       });     var expectedmodulename = ["my", "x","y", "z" ];     var testarray = ["my", "x","y", "z" ];;     logger.log('info','checking modules');     (var = 0; < testarray.length;i++) {       var modulename = text.verifytext("//*[@ng-reflect-router-link='"+ testarray[i] + "']");       expect(modulename).tobe(expectedmodulename[i]);     }   logger.log('info','checked modules');   }); }); 

i getting following errors.

erros

my understanding : typescript not able find jasmine libraries. how so?

i went through: https://angular.io/docs/ts/latest/testing/jasmine-testing-101.html

but couldn't find much. installed typings too. don't know how use it.

how can configure jasmine framework atom protractor errors may resolve?

if not so, editor can useful , how?

please guide me..

you have install jasmine , node typings typescript recognizes them. there better approach, there no need of typings folder , typings.json. have @types dependencies same.

so can following steps-

go project folder , install dependencies -

 npm install --save-dev @types/jasmine //this install jasmine typings dev dependency in package.json  npm install --save-dev @types/node   //this install node typings dev dependency in package.json 

once have installed try compiling tsc or tsc -w watch mode, shouldn't see ts syntax errors!

and have import browser protractor/globals use methods, this-

import {browser} 'protractor/globals'; 

for more details can check out rep initial setup of protractor typescript uses cucumber can check out official protractor-typescript example


Comments