Spectron => wait for splashscreen to close


Hey guys,
i’m currently trying to do start some spectron tests for our electron app and the issue i’m facing is that our app’s first window is a splashscreen which is hidden when loaded and opens up another browserwindow when loaded.

So what i’m trying to do is to either wait for the splashscreen to be hidden or wait until the current browserWindow title is my main window title.

What would be the recommended way of doing this? I’m using mocha with chai and chai-as-promised but i’m open to any suggestions.

what i’ve tried so far:

  it('wait for splash to close', function () {
    return this.app.client.getWindowCount().should.eventually.have.at.least(1)

i really dont think im heading in the right direction…
How would i “wait” for an expected value?

anyways thanks