Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:14
    dependabot-preview[bot] commented #469
  • 00:14

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • 00:14
    dependabot-preview[bot] closed #469
  • 00:14
    jan-molak commented #469
  • 00:12
    jan-molak commented #464
  • Feb 20 12:45
    RaghuGouda commented #464
  • Feb 20 11:31
    jan-molak commented #464
  • Feb 20 08:12
  • Feb 20 08:08
    Travis serenity-js/serenity-js@8cd7eb8 (dependabot/npm_and_yarn/gherkin-8.2.1) failed (1282)
  • Feb 20 08:04
    Travis serenity-js/serenity-js@48c5f38 (dependabot/npm_and_yarn/types/node-12.12.28) passed (1280)
  • Feb 20 07:55
    dependabot-preview[bot] labeled #469
  • Feb 20 07:55
    dependabot-preview[bot] opened #469
  • Feb 20 07:55

    dependabot-preview[bot] on npm_and_yarn

    chore(deps): bump gherkin from … (compare)

  • Feb 20 07:52
    dependabot-preview[bot] labeled #468
  • Feb 20 07:52
    dependabot-preview[bot] opened #468
  • Feb 20 07:52

    dependabot-preview[bot] on npm_and_yarn

    chore(deps-dev): bump @types/no… (compare)

  • Feb 20 05:20
    RaghuGouda commented #464
  • Feb 19 22:06
    jan-molak commented #464
  • Feb 19 22:05
    jan-molak commented #464
  • Feb 19 20:15
    dependabot-preview[bot] commented #465
Ijee
@Ijee
Actually, no
Lunch now, will report back ina bit
Jan Molak
@jan-molak
enjoy!
Ijee
@Ijee
Alright
Is import { protractor } from 'protractor'; the correct import?
The abilities should be good now
Ijee
@Ijee
Then I have no idea what the problem is
Jan Molak
@jan-molak
I'm guessing a recent version of protractor5.x is present in your node_modules?
Ijee
@Ijee
"protractor": "5.4.3",
Jan Molak
@jan-molak
It's hard to tell without seeing the code; it seems like you're doing everything correctly, though. Is there any older code that calls protractor.browser or browser explicitly? Can you create a new test case that invokes protractor.browser, i.e. protractor.browser.get('https://juliemr.github.io/protractor-demo/')?
Ijee
@Ijee
It's quite a lot of code actually, true
Ijee
@Ijee
The thing is that the browser just closes before anything happens
Jan Molak
@jan-molak
hmm; do you have any onPrepare hooks in your protractor conf file?
if that's erroring out the scenario won't get executed
Ijee
@Ijee
Oh yeah i do
Seems to be the problem
Now I get beforeEach is not defined
Sec
Oh, I have a hooks.ts where I put all the things like deleting cookies, etc
Ijee
@Ijee
Not sure what the problem is there
It also happens when I don't use those hooks
Nvm, seems like I have a world.ts with this inside
import { serenity } from '@serenity-js/core';
import { Actors } from '../../src/screenplay/actors';

beforeEach(function() {
    // this.stage = Serenity.callToStageFor(new Actors());
    this.stage = serenity.engage(new Actors());
});
That's the only beforeEach thing I have anywhere
Jan Molak
@jan-molak
you no longer need the stage, so you can simplify it to beforeEach(() => engage(new Actors()));
(I thought you were using Cucumber though? this seems like Jasmine code? or did I get confused?)
Ijee
@Ijee
Yeah I do, I am not the one that created this project though
Ah nvm
Copied the wrong thing
Alright, now I get to the TS errors. Sounds good. Sorry
Jan Molak
@jan-molak
No worries, one step at a time :)
Ijee
@Ijee
One thing I was wondering about: when I tried using eslint for my project a while back in 1.x I couldn't as it was still trying to use TSLint and then threw me some Typing errors
Jan Molak
@jan-molak
I know that Protractor used to have its typings messed up, which confused eslint and tslint, but that got fixed in 5.4.3 - https://github.com/angular/protractor/tree/5.4.3
Ijee
@Ijee
If that's the case, well, I thought I was crazy
And yeah it was before 5.4.3
Jan Molak
@jan-molak
I used to have to explicitly exclude Protractor typings from linting, but now I no longer do, which makes me a bit more happy ;-) serenity-js/serenity-js@736bf54
Ijee
@Ijee
Well, that would explain it
Alright one last thing I think
I tried updating your select Interaction
but it somehow can not find TS2305: Module '"../../../node_modules/@serenity-js/protractor/src/screenplay"' has no exported member 'withAnswerOf'.
but intellij is able to find it when I inspect it
Jan Molak
@jan-molak
ah yeah; that's a "package-protected" function I wasn't expecting people to use in their code, so you'd need to import it explicitly
Ijee
@Ijee
I am sorry :^)
Jan Molak
@jan-molak
lol
import { withAnswerOf } from '@serenity-js/core/lib/screenplay/withAnswerOf';
Ijee
@Ijee
Doesn't work like that. I probably will just put it in there for the time being.
Jan Molak
@jan-molak
argh, sorry
import { withAnswerOf } from '@serenity-js/protractor/lib/screenplay/withAnswerOf';
s/core/protractor
Ijee
@Ijee
:thumbsup: