Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable room directory test because it doesn't work #8318

Merged
merged 1 commit into from
Jan 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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