Skip to content

Commit

Permalink
Merge pull request #8318 from vector-im/travis/fix-build
Browse files Browse the repository at this point in the history
Disable room directory test because it doesn't work
  • Loading branch information
dbkr committed Jan 30, 2019
2 parents 0fa6aab + cec8a77 commit 1391706
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions test/app-tests/joining.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ describe('joining a room', function() {
}
});

it('should not get stuck at a spinner', function() {
// TODO: Re-enable test
// The test is currently disabled because the room directory now resides in a dialog,
// which is not accessible from the MatrixChat component anymore. Convincing react that
// the dialog does exist and is under a different tree is incredibly difficult though,
// so for now the test has been disabled. We should revisit this test when someone has
// the time to kill to figure this out. Problem area is highlighted within the test.
xit('should not get stuck at a spinner', function() {
const ROOM_ALIAS = '#alias:localhost';
const ROOM_ID = '!id:localhost';

Expand Down Expand Up @@ -118,8 +124,19 @@ describe('joining a room', function() {
}).then(() => {
console.log(`${Date.now()} App made requests for directory view; switching to a room.`);

// TODO: Make this look in the right spot for the directory dialog.
// See the comment block at the top of the test for a bit more information. The short
// story here is that the RoomDirectory does not exist under matrixChat anymore, or even
// the parentDiv we have access to. Asking React to find the RoomDirectory as a child of
// the document results in it complaining that you didn't give it a component tree to
// search in. When you do get a reference to the component tree based off the document
// root and ask it to search, it races and can't find the component in time. To top it
// all off, MatrixReactTestUtils can't find the element in time either even with a very
// high number of attempts. Assuming we can get a reference to the RoomDirectory in a
// dialog, the rest of the test should be fine.
const roomDir = ReactTestUtils.findRenderedComponentWithType(
matrixChat, RoomDirectory);
matrixChat, RoomDirectory,
);

// enter an alias in the input, and simulate enter
const input = ReactTestUtils.findRenderedDOMComponentWithTag(
Expand Down

0 comments on commit 1391706

Please sign in to comment.