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

Commit 18ed8c2

Browse files
authored
Merge branch 'develop' into prbranch
2 parents 63b2342 + 672ad98 commit 18ed8c2

File tree

165 files changed

+2945
-759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+2945
-759
lines changed

.eslintrc.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,66 @@ module.exports = {
114114
name: "matrix-js-sdk/src/client",
115115
message: "Please use matrix-js-sdk/src/matrix instead",
116116
},
117+
{
118+
name: "matrix-js-sdk/src/models/search-result",
119+
message: "Please use matrix-js-sdk/src/matrix instead",
120+
},
121+
{
122+
name: "matrix-js-sdk/src/models/poll",
123+
message: "Please use matrix-js-sdk/src/matrix instead",
124+
},
125+
{
126+
name: "matrix-js-sdk/src/models/relations",
127+
message: "Please use matrix-js-sdk/src/matrix instead",
128+
},
129+
{
130+
name: "matrix-js-sdk/src/http-api",
131+
message: "Please use matrix-js-sdk/src/matrix instead",
132+
},
133+
{
134+
name: "matrix-js-sdk/src/@types/PushRules",
135+
message: "Please use matrix-js-sdk/src/matrix instead",
136+
},
137+
{
138+
name: "matrix-js-sdk/src/@types/search",
139+
message: "Please use matrix-js-sdk/src/matrix instead",
140+
},
141+
{
142+
name: "matrix-js-sdk/src/filter",
143+
message: "Please use matrix-js-sdk/src/matrix instead",
144+
},
145+
{
146+
name: "matrix-js-sdk/src/webrtc/groupCall",
147+
message: "Please use matrix-js-sdk/src/matrix instead",
148+
},
149+
{
150+
name: "matrix-js-sdk/src/service-types",
151+
message: "Please use matrix-js-sdk/src/matrix instead",
152+
},
153+
{
154+
name: "matrix-js-sdk/src/sync",
155+
message: "Please use matrix-js-sdk/src/matrix instead",
156+
},
157+
{
158+
name: "matrix-js-sdk/src/timeline-window",
159+
message: "Please use matrix-js-sdk/src/matrix instead",
160+
},
161+
{
162+
name: "matrix-js-sdk/src/store/indexeddb",
163+
message: "Please use matrix-js-sdk/src/matrix instead",
164+
},
165+
{
166+
name: "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store",
167+
message: "Please use matrix-js-sdk/src/matrix instead",
168+
},
169+
{
170+
name: "matrix-js-sdk/src/crypto/store/localStorage-crypto-store",
171+
message: "Please use matrix-js-sdk/src/matrix instead",
172+
},
173+
{
174+
name: "matrix-js-sdk/src/models/thread",
175+
message: "Please use matrix-js-sdk/src/matrix instead",
176+
},
117177
{
118178
name: "matrix-react-sdk",
119179
message: "Please use matrix-react-sdk/src/index instead",

.github/workflows/static_analysis.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545

4646
# Temporary while we directly import matrix-js-sdk/src/* which means we need
4747
# certain @types/* packages to make sense of matrix-js-sdk types.
48-
- name: Typecheck (release mode; no yarn link)
49-
if: github.event_name != 'pull_request' && github.ref_name != 'master'
50-
run: |
51-
yarn unlink matrix-js-sdk
52-
yarn add github:matrix-org/matrix-js-sdk#develop
53-
yarn install --force
54-
yarn run lint:types
48+
#- name: Typecheck (release mode; no yarn link)
49+
# if: github.event_name != 'pull_request' && github.ref_name != 'master'
50+
# run: |
51+
# yarn unlink matrix-js-sdk
52+
# yarn add github:matrix-org/matrix-js-sdk#develop
53+
# yarn install --force
54+
# yarn run lint:types
5555

5656
i18n_lint:
5757
name: "i18n Check"

cypress/e2e/login/login.spec.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,64 @@ describe("Login", () => {
8484
});
8585
});
8686

87+
// tests for old-style SSO login, in which we exchange tokens with Synapse, and Synapse talks to an auth server
88+
describe("SSO login", () => {
89+
beforeEach(() => {
90+
cy.task("startOAuthServer")
91+
.then((oAuthServerPort: number) => {
92+
return cy.startHomeserver({ template: "default", oAuthServerPort });
93+
})
94+
.then((data) => {
95+
homeserver = data;
96+
cy.visit("/#/login");
97+
});
98+
});
99+
100+
afterEach(() => {
101+
cy.task("stopOAuthServer");
102+
});
103+
104+
it("logs in with SSO and lands on the home screen", () => {
105+
// If this test fails with a screen showing "Timeout connecting to remote server", it is most likely due to
106+
// your firewall settings: Synapse is unable to reach the OIDC server.
107+
//
108+
// If you are using ufw, try something like:
109+
// sudo ufw allow in on docker0
110+
//
111+
cy.findByRole("button", { name: "Edit" }).click();
112+
cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserver.baseUrl);
113+
cy.findByRole("button", { name: "Continue" }).click();
114+
// wait for the dialog to go away
115+
cy.get(".mx_ServerPickerDialog").should("not.exist");
116+
117+
// click on "Continue with OAuth test"
118+
cy.findByRole("button", { name: "Continue with OAuth test" }).click();
119+
120+
// wait for the Test OAuth Page to load
121+
cy.findByText("Test OAuth page");
122+
123+
// click the submit button
124+
cy.findByRole("button", { name: "Submit" }).click();
125+
126+
// Synapse prompts us to pick a user ID
127+
cy.findByRole("heading", { name: "Create your account" });
128+
cy.findByRole("textbox", { name: "Username (required)" }).type("alice");
129+
130+
// wait for username validation to start, and complete
131+
cy.wait(50);
132+
cy.get("#field-username-output").should("have.value", "");
133+
cy.findByRole("button", { name: "Continue" }).click();
134+
135+
// Synapse prompts us to grant permission to Element
136+
cy.findByRole("heading", { name: "Continue to your account" });
137+
cy.findByRole("link", { name: "Continue" }).click();
138+
139+
// Eventually, we should end up at the home screen.
140+
cy.url().should("contain", "/#/home", { timeout: 30000 });
141+
cy.findByRole("heading", { name: "Welcome Alice" });
142+
});
143+
});
144+
87145
describe("logout", () => {
88146
beforeEach(() => {
89147
cy.startHomeserver("consent").then((data) => {

0 commit comments

Comments
 (0)