I agree on @Rik here, notice `viewchanged` event includes in its details the current id of the screen being shown so you can assert on this id. I think you're trying to test lines [125 and 126 of app.js](https://github.com/gitmai/gaia/blob/ffe65dda05213e9e3842e80c4466de9a0b27f09b/apps/costcontrol/js/app.js#L125). Then, notice the `nonReadyScreen` is an instance of class `NonReadyScreen` and you can load this class, install an spy on `NonReadyScreen.prototype.updateForState()` and assert on the value of `cardState` by exploring the arguments of the call.