jeudi 4 mai 2017

Spectron test sequential actions

I am testing electron application with spectron. I have found in documentation examples on how to get number of windows and it is quite trivial. But what I am looking is how to check the state of one element after I have click on another element. Here I am trying to check if application is visible after I have minimized it. But this test always pass, for true and for false.

     it('should minimize the application', () => {
        return this.app.client.click('.minimize').then(() => {
          this.app.client.browserWindow.isVisible().then((isVisible) => {
            expect(isVisible).to.be.equal(true);
          });
        });
      })

I am using mocha with chai asserts.

Please advise on how can I check if application ( or particular element is visible ) after I have clicked on another element.

Aucun commentaire:

Enregistrer un commentaire