diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js
index d8adab55f6..362059f8ed 100644
--- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js
+++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js
@@ -176,8 +176,8 @@ export default class VoiceUserSettingsTab extends React.Component {
const defaultDevice = getDefaultDevice(audioOutputs);
speakerDropdown = (
+ value={this.state.activeAudioOutput || defaultDevice}
+ onChange={this._setAudioOutput}>
{this._renderDeviceOptions(audioOutputs, 'audioOutput')}
);
@@ -188,8 +188,8 @@ export default class VoiceUserSettingsTab extends React.Component {
const defaultDevice = getDefaultDevice(audioInputs);
microphoneDropdown = (
+ value={this.state.activeAudioInput || defaultDevice}
+ onChange={this._setAudioInput}>
{this._renderDeviceOptions(audioInputs, 'audioInput')}
);
@@ -200,8 +200,8 @@ export default class VoiceUserSettingsTab extends React.Component {
const defaultDevice = getDefaultDevice(videoInputs);
webcamDropdown = (
+ value={this.state.activeVideoInput || defaultDevice}
+ onChange={this._setVideoInput}>
{this._renderDeviceOptions(videoInputs, 'videoInput')}
);
diff --git a/src/components/views/verification/VerificationCancelled.js b/src/components/views/verification/VerificationCancelled.js
index 0bbaea1804..c57094d9b5 100644
--- a/src/components/views/verification/VerificationCancelled.js
+++ b/src/components/views/verification/VerificationCancelled.js
@@ -29,14 +29,14 @@ export default class VerificationCancelled extends React.Component {
render() {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return
-
{_t(
- "The other party cancelled the verification.",
- )}
-
+
{_t(
+ "The other party cancelled the verification.",
+ )}
+
;
}
}
diff --git a/src/indexing/EventIndex.js b/src/indexing/EventIndex.js
index 2dcdb9e3a3..2584ee9172 100644
--- a/src/indexing/EventIndex.js
+++ b/src/indexing/EventIndex.js
@@ -127,8 +127,13 @@ export default class EventIndex extends EventEmitter {
this.crawlerCheckpoints.push(forwardCheckpoint);
}
} catch (e) {
- console.log("EventIndex: Error adding initial checkpoints for room",
- room.roomId, backCheckpoint, forwardCheckpoint, e);
+ console.log(
+ "EventIndex: Error adding initial checkpoints for room",
+ room.roomId,
+ backCheckpoint,
+ forwardCheckpoint,
+ e,
+ );
}
}));
}
@@ -379,8 +384,12 @@ export default class EventIndex extends EventEmitter {
try {
await indexManager.addCrawlerCheckpoint(checkpoint);
} catch (e) {
- console.log("EventIndex: Error adding new checkpoint for room",
- room.roomId, checkpoint, e);
+ console.log(
+ "EventIndex: Error adding new checkpoint for room",
+ room.roomId,
+ checkpoint,
+ e,
+ );
}
this.crawlerCheckpoints.push(checkpoint);
@@ -459,7 +468,7 @@ export default class EventIndex extends EventEmitter {
} catch (e) {
if (e.httpStatus === 403) {
console.log("EventIndex: Removing checkpoint as we don't have ",
- "permissions to fetch messages from this room.", checkpoint);
+ "permissions to fetch messages from this room.", checkpoint);
try {
await indexManager.removeCrawlerCheckpoint(checkpoint);
} catch (e) {
@@ -589,7 +598,7 @@ export default class EventIndex extends EventEmitter {
// to do here anymore.
if (!newCheckpoint) {
console.log("EventIndex: The server didn't return a valid ",
- "new checkpoint, not continuing the crawl.", checkpoint);
+ "new checkpoint, not continuing the crawl.", checkpoint);
continue;
}
@@ -599,12 +608,12 @@ export default class EventIndex extends EventEmitter {
// the new checkpoint to be used by the crawler.
if (eventsAlreadyAdded === true && newCheckpoint.fullCrawl !== true) {
console.log("EventIndex: Checkpoint had already all events",
- "added, stopping the crawl", checkpoint);
+ "added, stopping the crawl", checkpoint);
await indexManager.removeCrawlerCheckpoint(newCheckpoint);
} else {
if (eventsAlreadyAdded === true) {
console.log("EventIndex: Checkpoint had already all events",
- "added, but continuing due to a full crawl", checkpoint);
+ "added, but continuing due to a full crawl", checkpoint);
}
this.crawlerCheckpoints.push(newCheckpoint);
}
@@ -777,7 +786,7 @@ export default class EventIndex extends EventEmitter {
* timeline, false otherwise.
*/
async populateFileTimeline(timelineSet, timeline, room, limit = 10,
- fromEvent = null, direction = EventTimeline.BACKWARDS) {
+ fromEvent = null, direction = EventTimeline.BACKWARDS) {
const matrixEvents = await this.loadFileEvents(room, limit, fromEvent, direction);
// If this is a normal fill request, not a pagination request, we need
@@ -807,7 +816,7 @@ export default class EventIndex extends EventEmitter {
}
console.log("EventIndex: Populating file panel with", matrixEvents.length,
- "events and setting the pagination token to", paginationToken);
+ "events and setting the pagination token to", paginationToken);
timeline.setPaginationToken(paginationToken, EventTimeline.BACKWARDS);
return ret;
diff --git a/src/stores/CustomRoomTagStore.js b/src/stores/CustomRoomTagStore.js
index edfc0003cf..060f1f3749 100644
--- a/src/stores/CustomRoomTagStore.js
+++ b/src/stores/CustomRoomTagStore.js
@@ -125,14 +125,14 @@ class CustomRoomTagStore extends EventEmitter {
this._setState({tags});
}
}
- break;
+ break;
case 'on_client_not_viable':
case 'on_logged_out': {
// we assume to always have a tags object in the state
this._state = {tags: {}};
RoomListStore.instance.off(LISTS_UPDATE_EVENT, this._onListsUpdated);
}
- break;
+ break;
}
}
diff --git a/src/stores/GroupFilterOrderStore.js b/src/stores/GroupFilterOrderStore.js
index 492322146e..b18abaa001 100644
--- a/src/stores/GroupFilterOrderStore.js
+++ b/src/stores/GroupFilterOrderStore.js
@@ -168,7 +168,7 @@ class GroupFilterOrderStore extends Store {
Analytics.trackEvent('FilterStore', 'select_tag');
}
- break;
+ break;
case 'deselect_tags':
if (payload.tag) {
// if a tag is passed, only deselect that tag
@@ -181,7 +181,7 @@ class GroupFilterOrderStore extends Store {
});
}
Analytics.trackEvent('FilterStore', 'deselect_tags');
- break;
+ break;
case 'on_client_not_viable':
case 'on_logged_out': {
// Reset state without pushing an update to the view, which generally assumes that
@@ -207,8 +207,8 @@ class GroupFilterOrderStore extends Store {
groupIds.forEach(groupId => {
const rooms =
GroupStore.getGroupRooms(groupId)
- .map(r => client.getRoom(r.roomId)) // to Room objects
- .filter(r => r !== null && r !== undefined); // filter out rooms we haven't joined from the group
+ .map(r => client.getRoom(r.roomId)) // to Room objects
+ .filter(r => r !== null && r !== undefined); // filter out rooms we haven't joined from the group
const badge = rooms && RoomNotifs.aggregateNotificationCount(rooms);
changedBadges[groupId] = (badge && badge.count !== 0) ? badge : undefined;
});
diff --git a/src/utils/MegolmExportEncryption.js b/src/utils/MegolmExportEncryption.js
index be7472901a..20f3cd6cb6 100644
--- a/src/utils/MegolmExportEncryption.js
+++ b/src/utils/MegolmExportEncryption.js
@@ -311,7 +311,7 @@ function unpackMegolmKeyFile(data) {
while (1) {
const lineEnd = fileStr.indexOf('\n', lineStart);
const line = fileStr.slice(lineStart, lineEnd < 0 ? undefined : lineEnd)
- .trim();
+ .trim();
if (line === TRAILER_LINE) {
break;
}
diff --git a/test/autocomplete/QueryMatcher-test.js b/test/autocomplete/QueryMatcher-test.js
index 3d383f08d7..cae71841d4 100644
--- a/test/autocomplete/QueryMatcher-test.js
+++ b/test/autocomplete/QueryMatcher-test.js
@@ -177,7 +177,7 @@ describe('QueryMatcher', function() {
const qm = new QueryMatcher(NONWORDOBJECTS, {
keys: ["name"],
shouldMatchWordsOnly: false,
- });
+ });
const results = qm.match('bob');
expect(results.length).toBe(1);
diff --git a/test/components/views/dialogs/AccessSecretStorageDialog-test.js b/test/components/views/dialogs/AccessSecretStorageDialog-test.js
index 13b39ab0d0..d9e07a2d74 100644
--- a/test/components/views/dialogs/AccessSecretStorageDialog-test.js
+++ b/test/components/views/dialogs/AccessSecretStorageDialog-test.js
@@ -26,9 +26,9 @@ describe("AccessSecretStorageDialog", function() {
it("Closes the dialog if _onRecoveryKeyNext is called with a valid key", (done) => {
const testInstance = TestRenderer.create(
p && p.recoveryKey && p.recoveryKey == "a"}
- onFinished={(v) => {
- if (v) { done(); }
+ checkPrivateKey={(p) => p && p.recoveryKey && p.recoveryKey == "a"}
+ onFinished={(v) => {
+ if (v) { done(); }
}}
/>,
);
@@ -43,7 +43,7 @@ describe("AccessSecretStorageDialog", function() {
it("Considers a valid key to be valid", async function() {
const testInstance = TestRenderer.create(
true}
+ checkPrivateKey={() => true}
/>,
);
const v = "asdf";
@@ -61,7 +61,7 @@ describe("AccessSecretStorageDialog", function() {
it("Notifies the user if they input an invalid Security Key", async function(done) {
const testInstance = TestRenderer.create(
false}
+ checkPrivateKey={async () => false}
/>,
);
const e = { target: { value: "a" } };
@@ -87,12 +87,14 @@ describe("AccessSecretStorageDialog", function() {
it("Notifies the user if they input an invalid passphrase", async function(done) {
const testInstance = TestRenderer.create(
false}
- onFinished={() => {}}
- keyInfo={ { passphrase: {
- salt: 'nonempty',
- iterations: 2,
- } } }
+ checkPrivateKey={() => false}
+ onFinished={() => {}}
+ keyInfo={{
+ passphrase: {
+ salt: 'nonempty',
+ iterations: 2,
+ },
+ }}
/>,
);
const e = { target: { value: "a" } };
diff --git a/test/components/views/elements/MemberEventListSummary-test.js b/test/components/views/elements/MemberEventListSummary-test.js
index dd6febc7d7..9386d8cf4a 100644
--- a/test/components/views/elements/MemberEventListSummary-test.js
+++ b/test/components/views/elements/MemberEventListSummary-test.js
@@ -246,8 +246,8 @@ describe('MemberEventListSummary', function() {
});
it('truncates multiple sequences of repetitions with other events between',
- function() {
- const events = generateEvents([
+ function() {
+ const events = generateEvents([
{
userId: "@user_1:some.domain",
prevMembership: "ban",
@@ -276,28 +276,29 @@ describe('MemberEventListSummary', function() {
membership: "invite",
senderId: "@some_other_user:some.domain",
},
- ]);
- const props = {
+ ]);
+ const props = {
events: events,
children: generateTiles(events),
summaryLength: 1,
avatarsMaxLength: 5,
threshold: 3,
- };
+ };
- const instance = ReactTestUtils.renderIntoDocument(
- ,
- );
- const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
- instance, "mx_EventListSummary_summary",
- );
- const summaryText = summary.textContent;
+ const instance = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
+ instance, "mx_EventListSummary_summary",
+ );
+ const summaryText = summary.textContent;
- expect(summaryText).toBe(
- "user_1 was unbanned, joined and left 2 times, was banned, " +
+ expect(summaryText).toBe(
+ "user_1 was unbanned, joined and left 2 times, was banned, " +
"joined and left 3 times and was invited",
- );
- });
+ );
+ },
+ );
it('handles multiple users following the same sequence of memberships', function() {
const events = generateEvents([
@@ -396,8 +397,8 @@ describe('MemberEventListSummary', function() {
});
it('correctly orders sequences of transitions by the order of their first event',
- function() {
- const events = generateEvents([
+ function() {
+ const events = generateEvents([
{
userId: "@user_2:some.domain",
prevMembership: "ban",
@@ -424,28 +425,29 @@ describe('MemberEventListSummary', function() {
{userId: "@user_2:some.domain", prevMembership: "join", membership: "leave"},
{userId: "@user_2:some.domain", prevMembership: "leave", membership: "join"},
{userId: "@user_2:some.domain", prevMembership: "join", membership: "leave"},
- ]);
- const props = {
+ ]);
+ const props = {
events: events,
children: generateTiles(events),
summaryLength: 1,
avatarsMaxLength: 5,
threshold: 3,
- };
+ };
- const instance = ReactTestUtils.renderIntoDocument(
- ,
- );
- const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
- instance, "mx_EventListSummary_summary",
- );
- const summaryText = summary.textContent;
+ const instance = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
+ instance, "mx_EventListSummary_summary",
+ );
+ const summaryText = summary.textContent;
- expect(summaryText).toBe(
- "user_2 was unbanned and joined and left 2 times, user_1 was unbanned, " +
+ expect(summaryText).toBe(
+ "user_2 was unbanned and joined and left 2 times, user_1 was unbanned, " +
"joined and left 2 times and was banned",
- );
- });
+ );
+ },
+ );
it('correctly identifies transitions', function() {
const events = generateEvents([
@@ -569,8 +571,8 @@ describe('MemberEventListSummary', function() {
});
it('handles invitation plurals correctly when there are multiple invites',
- function() {
- const events = generateEvents([
+ function() {
+ const events = generateEvents([
{
userId: "@user_1:some.domain",
prevMembership: "invite",
@@ -581,27 +583,28 @@ describe('MemberEventListSummary', function() {
prevMembership: "invite",
membership: "leave",
},
- ]);
- const props = {
+ ]);
+ const props = {
events: events,
children: generateTiles(events),
summaryLength: 1,
avatarsMaxLength: 5,
threshold: 1, // threshold = 1 to force collapse
- };
+ };
- const instance = ReactTestUtils.renderIntoDocument(
- ,
- );
- const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
- instance, "mx_EventListSummary_summary",
- );
- const summaryText = summary.textContent;
+ const instance = ReactTestUtils.renderIntoDocument(
+ ,
+ );
+ const summary = ReactTestUtils.findRenderedDOMComponentWithClass(
+ instance, "mx_EventListSummary_summary",
+ );
+ const summaryText = summary.textContent;
- expect(summaryText).toBe(
- "user_1 rejected their invitation 2 times",
- );
- });
+ expect(summaryText).toBe(
+ "user_1 rejected their invitation 2 times",
+ );
+ },
+ );
it('handles a summary length = 2, with no "others"', function() {
const events = generateEvents([
diff --git a/test/components/views/rooms/MemberList-test.js b/test/components/views/rooms/MemberList-test.js
index 068d358dcd..093e5588d0 100644
--- a/test/components/views/rooms/MemberList-test.js
+++ b/test/components/views/rooms/MemberList-test.js
@@ -100,7 +100,7 @@ describe('MemberList', () => {
memberList = r;
};
root = ReactDOM.render(, parentDiv);
+ wrappedRef={gatherWrappedRef} />, parentDiv);
});
afterEach((done) => {
diff --git a/test/components/views/rooms/RoomList-test.js b/test/components/views/rooms/RoomList-test.js
index d3211f564c..bfb8e1afd4 100644
--- a/test/components/views/rooms/RoomList-test.js
+++ b/test/components/views/rooms/RoomList-test.js
@@ -70,8 +70,9 @@ describe('RoomList', () => {
root = ReactDOM.render(
{}} />
-
- , parentDiv);
+ ,
+ parentDiv,
+ );
ReactTestUtils.findRenderedComponentWithType(root, RoomList);
movingRoom = createRoom({name: 'Moving room'});
diff --git a/test/end-to-end-tests/src/session.js b/test/end-to-end-tests/src/session.js
index 433baa5e48..4c611ef877 100644
--- a/test/end-to-end-tests/src/session.js
+++ b/test/end-to-end-tests/src/session.js
@@ -93,10 +93,10 @@ module.exports = class ElementSession {
const type = req.resourceType();
const response = await req.response();
//if (type === 'xhr' || type === 'fetch') {
- buffer += `${type} ${response.status()} ${req.method()} ${req.url()} \n`;
- // if (req.method() === "POST") {
- // buffer += " Post data: " + req.postData();
- // }
+ buffer += `${type} ${response.status()} ${req.method()} ${req.url()} \n`;
+ // if (req.method() === "POST") {
+ // buffer += " Post data: " + req.postData();
+ // }
//}
});
return {
diff --git a/test/utils/MegolmExportEncryption-test.js b/test/utils/MegolmExportEncryption-test.js
index e0ed5ba26a..07ec03860b 100644
--- a/test/utils/MegolmExportEncryption-test.js
+++ b/test/utils/MegolmExportEncryption-test.js
@@ -84,22 +84,22 @@ describe('MegolmExportEncryption', function() {
it('should handle missing header', function() {
const input=stringToArray(`-----`);
return MegolmExportEncryption.decryptMegolmKeyFile(input, '')
- .then((res) => {
- throw new Error('expected to throw');
- }, (error) => {
- expect(error.message).toEqual('Header line not found');
- });
+ .then((res) => {
+ throw new Error('expected to throw');
+ }, (error) => {
+ expect(error.message).toEqual('Header line not found');
+ });
});
it('should handle missing trailer', function() {
const input=stringToArray(`-----BEGIN MEGOLM SESSION DATA-----
-----`);
return MegolmExportEncryption.decryptMegolmKeyFile(input, '')
- .then((res) => {
- throw new Error('expected to throw');
- }, (error) => {
- expect(error.message).toEqual('Trailer line not found');
- });
+ .then((res) => {
+ throw new Error('expected to throw');
+ }, (error) => {
+ expect(error.message).toEqual('Trailer line not found');
+ });
});
it('should handle a too-short body', function() {
@@ -109,11 +109,11 @@ cissyYBxjsfsAn
-----END MEGOLM SESSION DATA-----
`);
return MegolmExportEncryption.decryptMegolmKeyFile(input, '')
- .then((res) => {
- throw new Error('expected to throw');
- }, (error) => {
- expect(error.message).toEqual('Invalid file: too short');
- });
+ .then((res) => {
+ throw new Error('expected to throw');
+ }, (error) => {
+ expect(error.message).toEqual('Invalid file: too short');
+ });
});
// TODO find a subtlecrypto shim which doesn't break this test
diff --git a/test/utils/ShieldUtils-test.js b/test/utils/ShieldUtils-test.js
index bea3d26565..fdf4f527ee 100644
--- a/test/utils/ShieldUtils-test.js
+++ b/test/utils/ShieldUtils-test.js
@@ -26,7 +26,7 @@ describe("mkClient self-test", function() {
["@TF:h", true],
["@FT:h", false],
["@FF:h", false]],
- )("behaves well for user trust %s", (userId, trust) => {
+ )("behaves well for user trust %s", (userId, trust) => {
expect(mkClient().checkUserTrust(userId).isCrossSigningVerified()).toBe(trust);
});
@@ -35,7 +35,7 @@ describe("mkClient self-test", function() {
["@TF:h", false],
["@FT:h", true],
["@FF:h", false]],
- )("behaves well for device trust %s", (userId, trust) => {
+ )("behaves well for device trust %s", (userId, trust) => {
expect(mkClient().checkDeviceTrust(userId, "device").isVerified()).toBe(trust);
});
});