Merge branch 'develop' into gsouquet/threads-forceenablelabsflag
This commit is contained in:
commit
d4f247d1fe
97 changed files with 3280 additions and 1325 deletions
|
@ -18,14 +18,14 @@ limitations under the License.
|
|||
|
||||
import { PollResponseEvent } from "matrix-events-sdk";
|
||||
|
||||
import { SynapseInstance } from "../../plugins/synapsedocker";
|
||||
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
||||
import { MatrixClient } from "../../global";
|
||||
import Chainable = Cypress.Chainable;
|
||||
|
||||
const hideTimestampCSS = ".mx_MessageTimestamp { visibility: hidden !important; }";
|
||||
|
||||
describe("Polls", () => {
|
||||
let synapse: SynapseInstance;
|
||||
let homeserver: HomeserverInstance;
|
||||
|
||||
type CreatePollOptions = {
|
||||
title: string;
|
||||
|
@ -81,20 +81,20 @@ describe("Polls", () => {
|
|||
cy.window().then((win) => {
|
||||
win.localStorage.setItem("mx_lhs_size", "0"); // Collapse left panel for these tests
|
||||
});
|
||||
cy.startSynapse("default").then((data) => {
|
||||
synapse = data;
|
||||
cy.startHomeserver("default").then((data) => {
|
||||
homeserver = data;
|
||||
|
||||
cy.initTestUser(synapse, "Tom");
|
||||
cy.initTestUser(homeserver, "Tom");
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.stopSynapse(synapse);
|
||||
cy.stopHomeserver(homeserver);
|
||||
});
|
||||
|
||||
it("should be creatable and votable", () => {
|
||||
let bot: MatrixClient;
|
||||
cy.getBot(synapse, { displayName: "BotBob" }).then((_bot) => {
|
||||
cy.getBot(homeserver, { displayName: "BotBob" }).then((_bot) => {
|
||||
bot = _bot;
|
||||
});
|
||||
|
||||
|
@ -163,7 +163,7 @@ describe("Polls", () => {
|
|||
|
||||
it("should be editable from context menu if no votes have been cast", () => {
|
||||
let bot: MatrixClient;
|
||||
cy.getBot(synapse, { displayName: "BotBob" }).then((_bot) => {
|
||||
cy.getBot(homeserver, { displayName: "BotBob" }).then((_bot) => {
|
||||
bot = _bot;
|
||||
});
|
||||
|
||||
|
@ -206,7 +206,7 @@ describe("Polls", () => {
|
|||
|
||||
it("should not be editable from context menu if votes have been cast", () => {
|
||||
let bot: MatrixClient;
|
||||
cy.getBot(synapse, { displayName: "BotBob" }).then((_bot) => {
|
||||
cy.getBot(homeserver, { displayName: "BotBob" }).then((_bot) => {
|
||||
bot = _bot;
|
||||
});
|
||||
|
||||
|
@ -256,10 +256,10 @@ describe("Polls", () => {
|
|||
it("should be displayed correctly in thread panel", () => {
|
||||
let botBob: MatrixClient;
|
||||
let botCharlie: MatrixClient;
|
||||
cy.getBot(synapse, { displayName: "BotBob" }).then((_bot) => {
|
||||
cy.getBot(homeserver, { displayName: "BotBob" }).then((_bot) => {
|
||||
botBob = _bot;
|
||||
});
|
||||
cy.getBot(synapse, { displayName: "BotCharlie" }).then((_bot) => {
|
||||
cy.getBot(homeserver, { displayName: "BotCharlie" }).then((_bot) => {
|
||||
botCharlie = _bot;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue