Wrote some tests and everything successfully runs, but my IDE (webstorm) highlights describe
, expect
and it
and says "cannot find name". I want to keep everythig clean and get rid of these, but have no idea how.
We use protractor and jasmine.
Some more of the script:
import {HomePO} from './pageobjects/home'
import {browser } from 'protractor'
describe('Smoke test', function() {
it('should initialize', function() {
let width = 320;
let height = 568;
browser.driver.manage().window().setSize(width, height);
});
it('should open homepage', function() {
HomePO.get();
expect(HomePO.isCurrentPage()).toBe(true);
});
});
I was having the same problem and did:
npm install @types/jasmine --save-dev
and that solved it - no need to import anything from jasmine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With