Merge pull request #781 from matrix-org/luke/fix-flaky-tests-maybe
Attempt to fix the flakyness seen with tests
This commit is contained in:
commit
5a411ba005
1 changed files with 2 additions and 10 deletions
|
@ -845,10 +845,7 @@ module.exports = React.createClass({
|
||||||
if (state !== "PREPARED") { return; }
|
if (state !== "PREPARED") { return; }
|
||||||
self.sdkReady = true;
|
self.sdkReady = true;
|
||||||
|
|
||||||
if (self.starting_room_alias_payload) {
|
if (!self.state.page_type) {
|
||||||
dis.dispatch(self.starting_room_alias_payload);
|
|
||||||
delete self.starting_room_alias_payload;
|
|
||||||
} else if (!self.state.page_type) {
|
|
||||||
if (!self.state.currentRoomId) {
|
if (!self.state.currentRoomId) {
|
||||||
var firstRoom = null;
|
var firstRoom = null;
|
||||||
if (cli.getRooms() && cli.getRooms().length) {
|
if (cli.getRooms() && cli.getRooms().length) {
|
||||||
|
@ -976,12 +973,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// we can't view a room unless we're logged in
|
// we can't view a room unless we're logged in
|
||||||
// (a guest account is fine)
|
// (a guest account is fine)
|
||||||
if (!this.state.loggedIn) {
|
if (this.state.loggedIn) {
|
||||||
// we may still be loading (ie, trying to register a guest
|
|
||||||
// session); otherwise we're (probably) already showing a login
|
|
||||||
// screen. Either way, we'll show the room once the client starts.
|
|
||||||
this.starting_room_alias_payload = payload;
|
|
||||||
} else {
|
|
||||||
dis.dispatch(payload);
|
dis.dispatch(payload);
|
||||||
}
|
}
|
||||||
} else if (screen.indexOf('user/') == 0) {
|
} else if (screen.indexOf('user/') == 0) {
|
||||||
|
|
Loading…
Reference in a new issue