Make threads disabled by default (#9810)
* Make threads disable by default * restore e2ee tests * fix threads e2e spec for beta joining
This commit is contained in:
parent
1614674ca9
commit
134e3d7ae8
3 changed files with 38 additions and 1 deletions
|
@ -77,6 +77,7 @@ describe("Polls", () => {
|
|||
};
|
||||
|
||||
beforeEach(() => {
|
||||
cy.enableLabsFeature("feature_threadstable");
|
||||
cy.window().then((win) => {
|
||||
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
||||
});
|
||||
|
|
|
@ -19,10 +19,17 @@ limitations under the License.
|
|||
import { SynapseInstance } from "../../plugins/synapsedocker";
|
||||
import { MatrixClient } from "../../global";
|
||||
|
||||
function markWindowBeforeReload(): void {
|
||||
// mark our window object to "know" when it gets reloaded
|
||||
cy.window().then((w) => (w.beforeReload = true));
|
||||
}
|
||||
|
||||
describe("Threads", () => {
|
||||
let synapse: SynapseInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
// Default threads to ON for this spec
|
||||
cy.enableLabsFeature("feature_threadstable");
|
||||
cy.window().then((win) => {
|
||||
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
||||
});
|
||||
|
@ -37,6 +44,35 @@ describe("Threads", () => {
|
|||
cy.stopSynapse(synapse);
|
||||
});
|
||||
|
||||
it("should reload when enabling threads beta", () => {
|
||||
markWindowBeforeReload();
|
||||
|
||||
// Turn off
|
||||
cy.openUserSettings("Labs").within(() => {
|
||||
// initially the new property is there
|
||||
cy.window().should("have.prop", "beforeReload", true);
|
||||
|
||||
cy.leaveBeta("Threaded messages");
|
||||
cy.wait(1000);
|
||||
// after reload the property should be gone
|
||||
cy.window().should("not.have.prop", "beforeReload");
|
||||
});
|
||||
|
||||
cy.get(".mx_MatrixChat", { timeout: 15000 }); // wait for the app
|
||||
markWindowBeforeReload();
|
||||
|
||||
// Turn on
|
||||
cy.openUserSettings("Labs").within(() => {
|
||||
// initially the new property is there
|
||||
cy.window().should("have.prop", "beforeReload", true);
|
||||
|
||||
cy.joinBeta("Threaded messages");
|
||||
cy.wait(1000);
|
||||
// after reload the property should be gone
|
||||
cy.window().should("not.have.prop", "beforeReload");
|
||||
});
|
||||
});
|
||||
|
||||
it("should be usable for a conversation", () => {
|
||||
let bot: MatrixClient;
|
||||
cy.getBot(synapse, {
|
||||
|
|
|
@ -262,7 +262,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
|
|||
controller: new ThreadBetaController(),
|
||||
displayName: _td("Threaded messages"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: true,
|
||||
default: false,
|
||||
betaInfo: {
|
||||
title: _td("Threaded messages"),
|
||||
caption: () => (
|
||||
|
|
Loading…
Reference in a new issue