Merge branch 'develop' into bump-matrix-wysiwyg-to-0.8.0
commit
062b00c343
|
@ -91,6 +91,17 @@ const bobJoin = function(this: CryptoTestContext) {
|
|||
cy.contains(".mx_TextualEvent", "Bob joined the room").should("exist");
|
||||
};
|
||||
|
||||
/** configure the given MatrixClient to auto-accept any invites */
|
||||
function autoJoin(client: MatrixClient) {
|
||||
cy.window({ log: false }).then(async win => {
|
||||
client.on(win.matrixcs.RoomMemberEvent.Membership, (event, member) => {
|
||||
if (member.membership === "invite" && member.userId === client.getUserId()) {
|
||||
client.joinRoom(member.roomId);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const handleVerificationRequest = (request: VerificationRequest): Chainable<EmojiMapping[]> => {
|
||||
return cy.wrap(new Promise<EmojiMapping[]>((resolve) => {
|
||||
const onShowSas = (event: ISasEvent) => {
|
||||
|
@ -174,4 +185,22 @@ describe("Cryptography", function() {
|
|||
testMessages.call(this);
|
||||
verify.call(this);
|
||||
});
|
||||
|
||||
it("should allow verification when there is no existing DM", function(this: CryptoTestContext) {
|
||||
cy.bootstrapCrossSigning();
|
||||
autoJoin(this.bob);
|
||||
|
||||
/* we need to have a room with the other user present, so we can open the verification panel */
|
||||
let roomId: string;
|
||||
cy.createRoom({ name: "TestRoom", invite: [this.bob.getUserId()] }).then(_room1Id => {
|
||||
roomId = _room1Id;
|
||||
cy.log(`Created test room ${roomId}`);
|
||||
cy.visit(`/#/room/${roomId}`);
|
||||
// wait for Bob to join the room, otherwise our attempt to open his user details may race
|
||||
// with his join.
|
||||
cy.contains(".mx_TextualEvent", "Bob joined the room").should("exist");
|
||||
});
|
||||
|
||||
verify.call(this);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -78,6 +78,7 @@ Cypress.Commands.add("getBot", (synapse: SynapseInstance, opts: CreateBotOpts):
|
|||
const username = Cypress._.uniqueId("userId_");
|
||||
const password = Cypress._.uniqueId("password_");
|
||||
return cy.registerUser(synapse, username, password, opts.displayName).then(credentials => {
|
||||
cy.log(`Registered bot user ${username} with displayname ${opts.displayName}`);
|
||||
return cy.window({ log: false }).then(win => {
|
||||
const cli = new win.matrixcs.MatrixClient({
|
||||
baseUrl: synapse.baseUrl,
|
||||
|
|
|
@ -103,6 +103,7 @@ Cypress.Commands.add("initTestUser", (synapse: SynapseInstance, displayName: str
|
|||
return cy.registerUser(synapse, username, password, displayName).then(() => {
|
||||
return cy.loginUser(synapse, username, password);
|
||||
}).then(response => {
|
||||
cy.log(`Registered test user ${username} with displayname ${displayName}`);
|
||||
cy.window({ log: false }).then(win => {
|
||||
// Seed the localStorage with the required credentials
|
||||
win.localStorage.setItem("mx_hs_url", synapse.baseUrl);
|
||||
|
|
|
@ -122,9 +122,6 @@ export class StopGapWidgetDriver extends WidgetDriver {
|
|||
this.allowedCapabilities.add(
|
||||
WidgetEventCapability.forStateEvent(EventDirection.Receive, EventType.RoomMember).raw,
|
||||
);
|
||||
this.allowedCapabilities.add(
|
||||
WidgetEventCapability.forStateEvent(EventDirection.Send, "org.matrix.msc3401.call").raw,
|
||||
);
|
||||
this.allowedCapabilities.add(
|
||||
WidgetEventCapability.forStateEvent(EventDirection.Receive, "org.matrix.msc3401.call").raw,
|
||||
);
|
||||
|
|
|
@ -69,7 +69,6 @@ describe("StopGapWidgetDriver", () => {
|
|||
"org.matrix.msc2762.send.event:org.matrix.rageshake_request",
|
||||
"org.matrix.msc2762.receive.event:org.matrix.rageshake_request",
|
||||
"org.matrix.msc2762.receive.state_event:m.room.member",
|
||||
"org.matrix.msc2762.send.state_event:org.matrix.msc3401.call",
|
||||
"org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call",
|
||||
"org.matrix.msc2762.send.state_event:org.matrix.msc3401.call.member#@alice:example.org",
|
||||
"org.matrix.msc2762.receive.state_event:org.matrix.msc3401.call.member",
|
||||
|
|
Loading…
Reference in New Issue