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

Commit 9494f77

Browse files
committed
revert
1 parent 9125480 commit 9494f77

File tree

711 files changed

+29268
-18785
lines changed

Some content is hidden

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

711 files changed

+29268
-18785
lines changed

.eslintrc.js

Lines changed: 73 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -62,118 +62,6 @@ module.exports = {
6262
name: "matrix-js-sdk/src/index",
6363
message: "Please use matrix-js-sdk/src/matrix instead",
6464
},
65-
{
66-
name: "matrix-js-sdk/src/models/typed-event-emitter",
67-
message: "Please use matrix-js-sdk/src/matrix instead",
68-
},
69-
{
70-
name: "matrix-js-sdk/src/models/room",
71-
message: "Please use matrix-js-sdk/src/matrix instead",
72-
},
73-
{
74-
name: "matrix-js-sdk/src/models/room-member",
75-
message: "Please use matrix-js-sdk/src/matrix instead",
76-
},
77-
{
78-
name: "matrix-js-sdk/src/models/room-state",
79-
message: "Please use matrix-js-sdk/src/matrix instead",
80-
},
81-
{
82-
name: "matrix-js-sdk/src/models/event",
83-
message: "Please use matrix-js-sdk/src/matrix instead",
84-
},
85-
{
86-
name: "matrix-js-sdk/src/models/event-status",
87-
message: "Please use matrix-js-sdk/src/matrix instead",
88-
},
89-
{
90-
name: "matrix-js-sdk/src/models/user",
91-
message: "Please use matrix-js-sdk/src/matrix instead",
92-
},
93-
{
94-
name: "matrix-js-sdk/src/models/device",
95-
message: "Please use matrix-js-sdk/src/matrix instead",
96-
},
97-
{
98-
name: "matrix-js-sdk/src/models/event-timeline",
99-
message: "Please use matrix-js-sdk/src/matrix instead",
100-
},
101-
{
102-
name: "matrix-js-sdk/src/models/event-timeline-set",
103-
message: "Please use matrix-js-sdk/src/matrix instead",
104-
},
105-
{
106-
name: "matrix-js-sdk/src/@types/partials",
107-
message: "Please use matrix-js-sdk/src/matrix instead",
108-
},
109-
{
110-
name: "matrix-js-sdk/src/@types/event",
111-
message: "Please use matrix-js-sdk/src/matrix instead",
112-
},
113-
{
114-
name: "matrix-js-sdk/src/client",
115-
message: "Please use matrix-js-sdk/src/matrix instead",
116-
},
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-
},
17765
{
17866
name: "matrix-react-sdk",
17967
message: "Please use matrix-react-sdk/src/index instead",
@@ -185,8 +73,79 @@ module.exports = {
18573
],
18674
patterns: [
18775
{
188-
group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"],
189-
message: "Please use matrix-js-sdk/src/* instead",
76+
group: [
77+
"matrix-js-sdk/src/**",
78+
"!matrix-js-sdk/src/matrix",
79+
"matrix-js-sdk/lib",
80+
"matrix-js-sdk/lib/",
81+
"matrix-js-sdk/lib/**",
82+
// XXX: Temporarily allow these as they are not available via the main export
83+
"!matrix-js-sdk/src/logger",
84+
"!matrix-js-sdk/src/errors",
85+
"!matrix-js-sdk/src/utils",
86+
"!matrix-js-sdk/src/version-support",
87+
"!matrix-js-sdk/src/randomstring",
88+
"!matrix-js-sdk/src/sliding-sync",
89+
"!matrix-js-sdk/src/browser-index",
90+
"!matrix-js-sdk/src/feature",
91+
"!matrix-js-sdk/src/NamespacedValue",
92+
"!matrix-js-sdk/src/ReEmitter",
93+
"!matrix-js-sdk/src/event-mapper",
94+
"!matrix-js-sdk/src/interactive-auth",
95+
"!matrix-js-sdk/src/secret-storage",
96+
"!matrix-js-sdk/src/room-hierarchy",
97+
"!matrix-js-sdk/src/rendezvous",
98+
"!matrix-js-sdk/src/rendezvous/transports",
99+
"!matrix-js-sdk/src/rendezvous/channels",
100+
"!matrix-js-sdk/src/indexeddb-worker",
101+
"!matrix-js-sdk/src/pushprocessor",
102+
"!matrix-js-sdk/src/extensible_events_v1",
103+
"!matrix-js-sdk/src/extensible_events_v1/PollStartEvent",
104+
"!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent",
105+
"!matrix-js-sdk/src/extensible_events_v1/PollEndEvent",
106+
"!matrix-js-sdk/src/extensible_events_v1/InvalidEventError",
107+
"!matrix-js-sdk/src/crypto-api",
108+
"!matrix-js-sdk/src/crypto-api/verification",
109+
"!matrix-js-sdk/src/crypto",
110+
"!matrix-js-sdk/src/crypto/algorithms",
111+
"!matrix-js-sdk/src/crypto/api",
112+
"!matrix-js-sdk/src/crypto/aes",
113+
"!matrix-js-sdk/src/crypto/backup",
114+
"!matrix-js-sdk/src/crypto/olmlib",
115+
"!matrix-js-sdk/src/crypto/crypto",
116+
"!matrix-js-sdk/src/crypto/keybackup",
117+
"!matrix-js-sdk/src/crypto/RoomList",
118+
"!matrix-js-sdk/src/crypto/deviceinfo",
119+
"!matrix-js-sdk/src/crypto/key_passphrase",
120+
"!matrix-js-sdk/src/crypto/CrossSigning",
121+
"!matrix-js-sdk/src/crypto/recoverykey",
122+
"!matrix-js-sdk/src/crypto/dehydration",
123+
"!matrix-js-sdk/src/crypto/verification",
124+
"!matrix-js-sdk/src/crypto/verification/SAS",
125+
"!matrix-js-sdk/src/crypto/verification/QRCode",
126+
"!matrix-js-sdk/src/crypto/verification/request",
127+
"!matrix-js-sdk/src/crypto/verification/request/VerificationRequest",
128+
"!matrix-js-sdk/src/common-crypto",
129+
"!matrix-js-sdk/src/common-crypto/CryptoBackend",
130+
"!matrix-js-sdk/src/oidc",
131+
"!matrix-js-sdk/src/oidc/discovery",
132+
"!matrix-js-sdk/src/oidc/authorize",
133+
"!matrix-js-sdk/src/oidc/validate",
134+
"!matrix-js-sdk/src/oidc/error",
135+
"!matrix-js-sdk/src/oidc/register",
136+
"!matrix-js-sdk/src/webrtc",
137+
"!matrix-js-sdk/src/webrtc/call",
138+
"!matrix-js-sdk/src/webrtc/callFeed",
139+
"!matrix-js-sdk/src/webrtc/mediaHandler",
140+
"!matrix-js-sdk/src/webrtc/callEventTypes",
141+
"!matrix-js-sdk/src/webrtc/callEventHandler",
142+
"!matrix-js-sdk/src/webrtc/groupCallEventHandler",
143+
"!matrix-js-sdk/src/models",
144+
"!matrix-js-sdk/src/models/read-receipt",
145+
"!matrix-js-sdk/src/models/relations-container",
146+
"!matrix-js-sdk/src/models/related-relations",
147+
],
148+
message: "Please use matrix-js-sdk/src/matrix instead",
190149
},
191150
],
192151
},

.github/workflows/cypress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
echo "CYPRESS_RUST_CRYPTO=1" >> "$GITHUB_ENV"
164164
165165
- name: Run Cypress tests
166-
uses: cypress-io/github-action@90dff940a41c08c7c344310eac7e57eda636326a
166+
uses: cypress-io/github-action@fa88e4afe551e64c8827a4b9e379afc63d8f691a
167167
with:
168168
working-directory: matrix-react-sdk
169169
# The built-in Electron runner seems to grind to a halt trying to run the tests, so use chrome.

.github/workflows/i18n_check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111

1212
- name: "Get modified files"
1313
id: changed_files
14-
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot'
15-
uses: tj-actions/changed-files@87697c0dca7dd44e37a2b79a79489332556ff1f3 # v37
14+
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'RiotTranslateBot' && github.event.pull_request.user.login != 't3chguy'
15+
uses: tj-actions/changed-files@1c26215f3fbd51eba03bc199e5cbabdfc3584ce3 # v38
1616
with:
1717
files: |
1818
src/i18n/strings/*
@@ -25,8 +25,8 @@ jobs:
2525
github.event.pull_request.user.login != 'RiotTranslateBot' &&
2626
steps.changed_files.outputs.any_modified == 'true'
2727
run: |
28-
echo "Only translation files modified by `yarn i18n` can be committed - other translation files will confuse weblate in unrecoverable ways."
2928
exit 1
29+
echo "Only translation files modified by 'yarn i18n' can be committed - other translation files will confuse weblate in unrecoverable ways."
3030
3131
- uses: actions/setup-node@v3
3232
with:

__mocks__/languages.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
{
2-
"en": {
3-
"fileName": "en_EN.json",
4-
"label": "English"
5-
},
6-
"en-us": {
7-
"fileName": "en_US.json",
8-
"label": "English (US)"
9-
}
2+
"en": "en_EN.json",
3+
"en-us": "en_US.json"
104
}

cypress/e2e/audio-player/audio-player.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ describe("Audio player", () => {
168168
it("should be correctly rendered - light theme with monospace font", () => {
169169
uploadFile("cypress/fixtures/1sec-long-name-audio-file.ogg");
170170

171-
takeSnapshots("Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
171+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
172+
//takeSnapshots("Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
172173
});
173174

174175
it("should be correctly rendered - high contrast theme", () => {
@@ -186,7 +187,8 @@ describe("Audio player", () => {
186187

187188
uploadFile("cypress/fixtures/1sec-long-name-audio-file.ogg");
188189

189-
takeSnapshots("Selected EventTile of audio player (high contrast)");
190+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
191+
//takeSnapshots("Selected EventTile of audio player (high contrast)");
190192
});
191193

192194
it("should be correctly rendered - dark theme", () => {
@@ -254,8 +256,8 @@ describe("Audio player", () => {
254256
});
255257
});
256258

257-
// Take snapshots
258-
takeSnapshots("Selected EventTile of audio player with a reply");
259+
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24881
260+
//takeSnapshots("Selected EventTile of audio player with a reply");
259261
});
260262

261263
it("should support creating a reply chain with multiple audio files", () => {

cypress/e2e/editing/editing.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe("Editing", () => {
119119
// Assert that the date separator is rendered at the top
120120
cy.get("li:nth-child(1) .mx_DateSeparator").within(() => {
121121
cy.get("h2").within(() => {
122-
cy.findByText("Today");
122+
cy.findByText("today").should("have.css", "text-transform", "capitalize");
123123
});
124124
});
125125

@@ -184,7 +184,7 @@ describe("Editing", () => {
184184
// Assert that the date is rendered
185185
cy.get("li:nth-child(1) .mx_DateSeparator").within(() => {
186186
cy.get("h2").within(() => {
187-
cy.findByText("Today");
187+
cy.findByText("today").should("have.css", "text-transform", "capitalize");
188188
});
189189
});
190190

cypress/e2e/login/login.spec.ts

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
/// <reference types="cypress" />
1818

1919
import { HomeserverInstance } from "../../plugins/utils/homeserver";
20+
import { doTokenRegistration } from "./utils";
2021

2122
describe("Login", () => {
2223
let homeserver: HomeserverInstance;
@@ -93,7 +94,6 @@ describe("Login", () => {
9394
})
9495
.then((data) => {
9596
homeserver = data;
96-
cy.visit("/#/login");
9797
});
9898
});
9999

@@ -108,33 +108,7 @@ describe("Login", () => {
108108
// If you are using ufw, try something like:
109109
// sudo ufw allow in on docker0
110110
//
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();
111+
doTokenRegistration(homeserver.baseUrl);
138112

139113
// Eventually, we should end up at the home screen.
140114
cy.url().should("contain", "/#/home", { timeout: 30000 });

0 commit comments

Comments
 (0)