mirror of https://github.com/vector-im/riot-web
[Backport staging] Make threads disabled by default (#9815)
* Make threads disable by default
* restore e2ee tests
* fix threads e2e spec for beta joining
(cherry picked from commit 134e3d7ae8
)
Co-authored-by: Germain <germains@element.io>
pull/28788/head^2
parent
0f34702b35
commit
bf699cdf10
|
@ -77,6 +77,7 @@ describe("Polls", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
cy.enableLabsFeature("feature_threadstable");
|
||||||
cy.window().then((win) => {
|
cy.window().then((win) => {
|
||||||
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
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 { SynapseInstance } from "../../plugins/synapsedocker";
|
||||||
import { MatrixClient } from "../../global";
|
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", () => {
|
describe("Threads", () => {
|
||||||
let synapse: SynapseInstance;
|
let synapse: SynapseInstance;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
// Default threads to ON for this spec
|
||||||
|
cy.enableLabsFeature("feature_threadstable");
|
||||||
cy.window().then((win) => {
|
cy.window().then((win) => {
|
||||||
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
||||||
});
|
});
|
||||||
|
@ -37,6 +44,35 @@ describe("Threads", () => {
|
||||||
cy.stopSynapse(synapse);
|
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", () => {
|
it("should be usable for a conversation", () => {
|
||||||
let bot: MatrixClient;
|
let bot: MatrixClient;
|
||||||
cy.getBot(synapse, {
|
cy.getBot(synapse, {
|
||||||
|
|
|
@ -261,7 +261,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
|
||||||
controller: new ThreadBetaController(),
|
controller: new ThreadBetaController(),
|
||||||
displayName: _td("Threaded messages"),
|
displayName: _td("Threaded messages"),
|
||||||
supportedLevels: LEVELS_FEATURE,
|
supportedLevels: LEVELS_FEATURE,
|
||||||
default: true,
|
default: false,
|
||||||
betaInfo: {
|
betaInfo: {
|
||||||
title: _td("Threaded messages"),
|
title: _td("Threaded messages"),
|
||||||
caption: () => (
|
caption: () => (
|
||||||
|
|
Loading…
Reference in New Issue