Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 134e3d7

Browse files
author
Germain
authored
Make threads disabled by default (#9810)
* Make threads disable by default * restore e2ee tests * fix threads e2e spec for beta joining
1 parent 1614674 commit 134e3d7

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

cypress/e2e/polls/polls.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ describe("Polls", () => {
7777
};
7878

7979
beforeEach(() => {
80+
cy.enableLabsFeature("feature_threadstable");
8081
cy.window().then((win) => {
8182
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
8283
});

cypress/e2e/threads/threads.spec.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ limitations under the License.
1919
import { SynapseInstance } from "../../plugins/synapsedocker";
2020
import { MatrixClient } from "../../global";
2121

22+
function markWindowBeforeReload(): void {
23+
// mark our window object to "know" when it gets reloaded
24+
cy.window().then((w) => (w.beforeReload = true));
25+
}
26+
2227
describe("Threads", () => {
2328
let synapse: SynapseInstance;
2429

2530
beforeEach(() => {
31+
// Default threads to ON for this spec
32+
cy.enableLabsFeature("feature_threadstable");
2633
cy.window().then((win) => {
2734
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
2835
});
@@ -37,6 +44,35 @@ describe("Threads", () => {
3744
cy.stopSynapse(synapse);
3845
});
3946

47+
it("should reload when enabling threads beta", () => {
48+
markWindowBeforeReload();
49+
50+
// Turn off
51+
cy.openUserSettings("Labs").within(() => {
52+
// initially the new property is there
53+
cy.window().should("have.prop", "beforeReload", true);
54+
55+
cy.leaveBeta("Threaded messages");
56+
cy.wait(1000);
57+
// after reload the property should be gone
58+
cy.window().should("not.have.prop", "beforeReload");
59+
});
60+
61+
cy.get(".mx_MatrixChat", { timeout: 15000 }); // wait for the app
62+
markWindowBeforeReload();
63+
64+
// Turn on
65+
cy.openUserSettings("Labs").within(() => {
66+
// initially the new property is there
67+
cy.window().should("have.prop", "beforeReload", true);
68+
69+
cy.joinBeta("Threaded messages");
70+
cy.wait(1000);
71+
// after reload the property should be gone
72+
cy.window().should("not.have.prop", "beforeReload");
73+
});
74+
});
75+
4076
it("should be usable for a conversation", () => {
4177
let bot: MatrixClient;
4278
cy.getBot(synapse, {

src/settings/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
262262
controller: new ThreadBetaController(),
263263
displayName: _td("Threaded messages"),
264264
supportedLevels: LEVELS_FEATURE,
265-
default: true,
265+
default: false,
266266
betaInfo: {
267267
title: _td("Threaded messages"),
268268
caption: () => (

0 commit comments

Comments
 (0)