Skip to content

Commit 87c075a

Browse files
committed
Merge remote-tracking branch 'origin/develop_tchap' into cypress-login-test-with-xsss
2 parents 5bac9e7 + 7548b56 commit 87c075a

File tree

4 files changed

+44
-25
lines changed

4 files changed

+44
-25
lines changed

.github/workflows/cypress.yaml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
# Run the tests
2-
# Todo : reuse a build from another action, instead of rebuilding for nothing.
3-
# tchap modification : use "./scripts/tchap/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
1+
# This is a tchap-specific file, inspired from the one in matrix-react-sdk
42
name: Cypress End to End Tests
53
on:
64
pull_request: {}
75
push:
86
branches: [develop_tchap, master_tchap]
9-
#repository_dispatch: # :TCHAP: we don't use this
10-
# types: [ element-web-notify ]
117
env:
12-
# :TCHAP: not needed for fetchdep.with.version.sh but leaving them otherwise it breaks.
13-
# These must be set for fetchdep.sh to get the right branch
8+
# Removing this makes the job break.
149
REPOSITORY: ${{ github.repository }}
1510
PR_NUMBER: ${{ github.event.pull_request.number }}
1611
jobs:
@@ -29,28 +24,32 @@ jobs:
2924
cache: "yarn"
3025
node-version: ${{ steps.node_version.outputs.node_version }}
3126

32-
- name: Install Dependencies
33-
run: "./scripts/tchap/install-yarn-linked-repositories.sh"
27+
- name: "Copy the config file at the right place"
28+
run: "cp config.dev.json config.json" # todo we could make the choice of backend configurable.
29+
30+
- name: "Build the app, so that we can serve it from static files" #todo : fetch build from an artifact to avoid rebuilding for nothing
31+
run: "yarn install && yarn build"
3432

3533
- name: Run Cypress tests
36-
uses: cypress-io/github-action@v4.1.1
34+
uses: cypress-io/github-action@v6.5.0
3735
with:
38-
# The built-in Electron runner seems to grind to a halt trying
36+
install: false # disable the default install, we already installed and built.
37+
38+
# Serve with 'npx serve', a simple static webserver, so that it starts quickly. The dev server is slow and messy to start.
39+
start: "npx serve -p 8080 -L webapp"
40+
# Note : 'wait-on' caused issues where localhost was not found by cypress. Be careful if you want to use it.
41+
42+
# From matrix-react-sdk : The built-in Electron runner seems to grind to a halt trying
3943
# to run the tests, so use chrome.
4044
browser: chrome
41-
#install: false # disable the default install, we used layered.with.version already.
42-
start: yarn start
43-
#start: npx serve -p 8080 webapp # If you have downloaded a build artifact, it will be in webapp dir.
44-
wait-on: "http://localhost:8080"
45-
# wait for 3min, the build is long
46-
wait-on-timeout: 180
47-
# record: true # todo record to dashboard, see action's doc
45+
# headed: true # tchap uses headless, since we don't record videos.
46+
4847
command: "yarn test:cypress"
48+
# Note : 'working-directory' changes pwd, for everything. If you use it you need to change relative paths for everything, it's tricky.
4949
env:
5050
E2E_TEST_USER_EMAIL: ${{ secrets.E2E_TEST_USER_EMAIL }}
5151
E2E_TEST_USER_PASSWORD: ${{ secrets.E2E_TEST_USER_PASSWORD }}
5252
E2E_TEST_USER_SECURITY_KEY: ${{ secrets.E2E_TEST_USER_SECURITY_KEY }}
5353
E2E_TEST_USER_HOMESERVER_URL: "https://matrix.agent1.tchap.incubateur.net"
5454
E2E_TEST_USER_HOMESERVER_SHORT: "agent1.tchap.incubateur.net"
55-
# todo pass the Dashboard record key as an environment variable
56-
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # don't remember what this is for, can't hurt

cypress/e2e/export-room-members/export-room-members.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import RoomUtils from "../../utils/room-utils";
44
import RandomUtils from "../../utils/random-utils";
5-
import { normalize } from "../../../yarn-linked-dependencies/matrix-js-sdk/src/utils";
5+
import { normalize } from "matrix-js-sdk/src/utils";
66

77
describe("Export room members feature", () => {
88
const homeserverUrl = Cypress.env("E2E_TEST_USER_HOMESERVER_URL");

patches/auto-accept-tac/matrix-react-sdk+3.78.0.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/matrix-react-sdk/src/IdentityAuthClient.tsx b/node_modules/matrix-react-sdk/src/IdentityAuthClient.tsx
2-
index c27640c..d137782 100644
2+
index c27640c..b945877 100644
33
--- a/node_modules/matrix-react-sdk/src/IdentityAuthClient.tsx
44
+++ b/node_modules/matrix-react-sdk/src/IdentityAuthClient.tsx
55
@@ -30,6 +30,7 @@ import {
@@ -18,9 +18,9 @@ index c27640c..d137782 100644
1818
+ if (TchapUIFeature.autoAcceptTermsAndConditions){
1919
+ if (
2020
+ !this.tempClient &&
21-
+ !doesAccountDataHaveIdentityServer()
21+
+ !doesAccountDataHaveIdentityServer(this.matrixClient)
2222
+ ) {
23-
+ setToDefaultIdentityServer();
23+
+ setToDefaultIdentityServer(this.matrixClient);
2424
+ }
2525
+ return;
2626
+ }

res/themes/tchap-common/css/_tchap_custom.pcss

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,24 @@
3333

3434
[data-testid="security-recommendations-section"] {
3535
display: none;
36-
}
36+
}
37+
38+
/* Restore css for Help and About page https://github.com/tchapgouv/tchap-web-v4/issues/694 */
39+
40+
.mx_SettingsTab_heading {
41+
color: var(--timeline-text-color);
42+
font-size: 1.5rem;
43+
font-weight: 600;
44+
margin-bottom: 10px;
45+
margin-right: 100px;
46+
margin-top: 10px;
47+
}
48+
.mx_SettingsTab_subheading {
49+
color: var(--timeline-text-color);
50+
display: block;
51+
font-size: 1rem;
52+
font-weight: 600;
53+
margin-bottom: 10px;
54+
margin-right: 100px;
55+
margin-top: 12px;
56+
}

0 commit comments

Comments
 (0)