No response
- - - -`; - -function openIntegrationManager() { - cy.findByRole("button", { name: "Room info" }).click(); - cy.findByRole("button", { name: "Add widgets, bridges & bots" }).click(); -} - -function sendActionFromIntegrationManager(integrationManagerUrl: string) { - cy.accessIframe(`iframe[src*="${integrationManagerUrl}"]`).within(() => { - cy.findByRole("button", { name: "Press to send action" }).should("exist").click(); - }); -} - -describe("Integration Manager: Get OpenID Token", () => { - let testUser: UserCredentials; - let homeserver: HomeserverInstance; - let integrationManagerUrl: string; - - beforeEach(() => { - cy.serveHtmlFile(INTEGRATION_MANAGER_HTML).then((url) => { - integrationManagerUrl = url; - }); - cy.startHomeserver("default").then((data) => { - homeserver = data; - - cy.initTestUser(homeserver, USER_DISPLAY_NAME, () => { - cy.window().then((win) => { - win.localStorage.setItem("mx_scalar_token", INTEGRATION_MANAGER_TOKEN); - win.localStorage.setItem(`mx_scalar_token_at_${integrationManagerUrl}`, INTEGRATION_MANAGER_TOKEN); - }); - }).then((user) => { - testUser = user; - }); - - cy.setAccountData("m.widgets", { - "m.integration_manager": { - content: { - type: "m.integration_manager", - name: "Integration Manager", - url: integrationManagerUrl, - data: { - api_url: integrationManagerUrl, - }, - }, - id: "integration-manager", - }, - }).as("integrationManager"); - - // Succeed when checking the token is valid - cy.intercept(`${integrationManagerUrl}/account?scalar_token=${INTEGRATION_MANAGER_TOKEN}*`, (req) => { - req.continue((res) => { - return res.send(200, { - user_id: testUser.userId, - }); - }); - }); - - cy.createRoom({ - name: ROOM_NAME, - }).as("roomId"); - }); - }); - - afterEach(() => { - cy.stopHomeserver(homeserver); - cy.stopWebServers(); - }); - - it("should successfully obtain an openID token", () => { - cy.all([cy.get<{}>("@integrationManager")]).then(() => { - cy.viewRoomByName(ROOM_NAME); - - openIntegrationManager(); - sendActionFromIntegrationManager(integrationManagerUrl); - - cy.accessIframe(`iframe[src*="${integrationManagerUrl}"]`).within(() => { - cy.get("#message-response").within(() => { - cy.findByText(/access_token/); - }); - }); - }); - }); -}); diff --git a/cypress/e2e/integration-manager/kick.spec.ts b/cypress/e2e/integration-manager/kick.spec.ts deleted file mode 100644 index 7075c1c199ff..000000000000 --- a/cypress/e2e/integration-manager/kick.spec.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* -Copyright 2022 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -///No response
- - - -`; - -function openIntegrationManager() { - cy.findByRole("button", { name: "Room info" }).click(); - cy.get(".mx_RoomSummaryCard_appsGroup").within(() => { - cy.findByRole("button", { name: "Add widgets, bridges & bots" }).click(); - }); -} - -function sendActionFromIntegrationManager( - integrationManagerUrl: string, - targetRoomId: string, - eventType: string, - stateKey: string | boolean, -) { - cy.accessIframe(`iframe[src*="${integrationManagerUrl}"]`).within(() => { - cy.get("#target-room-id").should("exist").type(targetRoomId); - cy.get("#event-type").should("exist").type(eventType); - cy.get("#state-key").should("exist").type(JSON.stringify(stateKey)); - cy.get("#send-action").should("exist").click(); - }); -} - -describe("Integration Manager: Read Events", () => { - let testUser: UserCredentials; - let homeserver: HomeserverInstance; - let integrationManagerUrl: string; - - beforeEach(() => { - cy.serveHtmlFile(INTEGRATION_MANAGER_HTML).then((url) => { - integrationManagerUrl = url; - }); - cy.startHomeserver("default").then((data) => { - homeserver = data; - - cy.initTestUser(homeserver, USER_DISPLAY_NAME, () => { - cy.window().then((win) => { - win.localStorage.setItem("mx_scalar_token", INTEGRATION_MANAGER_TOKEN); - win.localStorage.setItem(`mx_scalar_token_at_${integrationManagerUrl}`, INTEGRATION_MANAGER_TOKEN); - }); - }).then((user) => { - testUser = user; - }); - - cy.setAccountData("m.widgets", { - "m.integration_manager": { - content: { - type: "m.integration_manager", - name: "Integration Manager", - url: integrationManagerUrl, - data: { - api_url: integrationManagerUrl, - }, - }, - id: "integration-manager", - }, - }).as("integrationManager"); - - // Succeed when checking the token is valid - cy.intercept(`${integrationManagerUrl}/account?scalar_token=${INTEGRATION_MANAGER_TOKEN}*`, (req) => { - req.continue((res) => { - return res.send(200, { - user_id: testUser.userId, - }); - }); - }); - - cy.createRoom({ - name: ROOM_NAME, - }).as("roomId"); - }); - }); - - afterEach(() => { - cy.stopHomeserver(homeserver); - cy.stopWebServers(); - }); - - it("should read a state event by state key", () => { - cy.all([cy.getNo response
- - - -`; - -function openIntegrationManager() { - cy.findByRole("button", { name: "Room info" }).click(); - cy.get(".mx_RoomSummaryCard_appsGroup").within(() => { - cy.findByRole("button", { name: "Add widgets, bridges & bots" }).click(); - }); -} - -function sendActionFromIntegrationManager( - integrationManagerUrl: string, - targetRoomId: string, - eventType: string, - stateKey: string, - content: RecordThank you, you've already accepted the license.
- {% else %} -Please accept the license!
- - {% endif %} - - diff --git a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html deleted file mode 100644 index 8db01e8a6e75..000000000000 --- a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -Danke schoen
- - diff --git a/cypress/plugins/synapsedocker/templates/default/README.md b/cypress/plugins/synapsedocker/templates/default/README.md deleted file mode 100644 index 8f6b11f999b8..000000000000 --- a/cypress/plugins/synapsedocker/templates/default/README.md +++ /dev/null @@ -1 +0,0 @@ -A synapse configured with user privacy consent disabled diff --git a/cypress/plugins/synapsedocker/templates/default/homeserver.yaml b/cypress/plugins/synapsedocker/templates/default/homeserver.yaml deleted file mode 100644 index e51ac1918ffb..000000000000 --- a/cypress/plugins/synapsedocker/templates/default/homeserver.yaml +++ /dev/null @@ -1,94 +0,0 @@ -server_name: "localhost" -pid_file: /data/homeserver.pid -public_baseurl: "{{PUBLIC_BASEURL}}" -listeners: - - port: 8008 - tls: false - bind_addresses: ["::"] - type: http - x_forwarded: true - - resources: - - names: [client] - compress: false - -database: - name: "sqlite3" - args: - database: ":memory:" - -log_config: "/data/log.config" - -rc_messages_per_second: 10000 -rc_message_burst_count: 10000 -rc_registration: - per_second: 10000 - burst_count: 10000 -rc_joins: - local: - per_second: 9999 - burst_count: 9999 - remote: - per_second: 9999 - burst_count: 9999 -rc_joins_per_room: - per_second: 9999 - burst_count: 9999 -rc_3pid_validation: - per_second: 1000 - burst_count: 1000 - -rc_invites: - per_room: - per_second: 1000 - burst_count: 1000 - per_user: - per_second: 1000 - burst_count: 1000 - -rc_login: - address: - per_second: 10000 - burst_count: 10000 - account: - per_second: 10000 - burst_count: 10000 - failed_attempts: - per_second: 10000 - burst_count: 10000 - -media_store_path: "/data/media_store" -uploads_path: "/data/uploads" -enable_registration: true -enable_registration_without_verification: true -disable_msisdn_registration: false -registration_shared_secret: "{{REGISTRATION_SECRET}}" -report_stats: false -macaroon_secret_key: "{{MACAROON_SECRET_KEY}}" -form_secret: "{{FORM_SECRET}}" -signing_key_path: "/data/localhost.signing.key" - -trusted_key_servers: - - server_name: "matrix.org" -suppress_key_server_warning: true - -ui_auth: - session_timeout: "300s" - -oidc_providers: - - idp_id: test - idp_name: "OAuth test" - issuer: "http://localhost:{{OAUTH_SERVER_PORT}}/oauth" - authorization_endpoint: "http://localhost:{{OAUTH_SERVER_PORT}}/oauth/auth.html" - # the token endpoint receives requests from synapse, rather than the webapp, so needs to escape the docker container. - # Hence, HOST_DOCKER_INTERNAL rather than localhost. This is set to - # host.docker.internal on Docker and host.containers.internal on Podman. - token_endpoint: "http://{{HOST_DOCKER_INTERNAL}}:{{OAUTH_SERVER_PORT}}/oauth/token" - userinfo_endpoint: "http://{{HOST_DOCKER_INTERNAL}}:{{OAUTH_SERVER_PORT}}/oauth/userinfo" - client_id: "synapse" - discover: false - scopes: ["profile"] - skip_verification: true - user_mapping_provider: - config: - display_name_template: "{{ user.name }}" diff --git a/cypress/plugins/synapsedocker/templates/default/log.config b/cypress/plugins/synapsedocker/templates/default/log.config deleted file mode 100644 index b9123d0f5b93..000000000000 --- a/cypress/plugins/synapsedocker/templates/default/log.config +++ /dev/null @@ -1,50 +0,0 @@ -# Log configuration for Synapse. -# -# This is a YAML file containing a standard Python logging configuration -# dictionary. See [1] for details on the valid settings. -# -# Synapse also supports structured logging for machine readable logs which can -# be ingested by ELK stacks. See [2] for details. -# -# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema -# [2]: https://matrix-org.github.io/synapse/latest/structured_logging.html - -version: 1 - -formatters: - precise: - format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' - -handlers: - # A handler that writes logs to stderr. Unused by default, but can be used - # instead of "buffer" and "file" in the logger handlers. - console: - class: logging.StreamHandler - formatter: precise - -loggers: - synapse.storage.SQL: - # beware: increasing this to DEBUG will make synapse log sensitive - # information such as access tokens. - level: DEBUG - - twisted: - # We send the twisted logging directly to the file handler, - # to work around https://github.com/matrix-org/synapse/issues/3471 - # when using "buffer" logger. Use "console" to log to stderr instead. - handlers: [console] - propagate: false - -root: - level: DEBUG - - # Write logs to the `buffer` handler, which will buffer them together in memory, - # then write them to a file. - # - # Replace "buffer" with "console" to log to stderr instead. (Note that you'll - # also need to update the configuration for the `twisted` logger above, in - # this case.) - # - handlers: [console] - -disable_existing_loggers: false diff --git a/cypress/plugins/synapsedocker/templates/email/README.md b/cypress/plugins/synapsedocker/templates/email/README.md deleted file mode 100644 index 40c23ba0be42..000000000000 --- a/cypress/plugins/synapsedocker/templates/email/README.md +++ /dev/null @@ -1 +0,0 @@ -A synapse configured to require an email for registration diff --git a/cypress/plugins/synapsedocker/templates/email/homeserver.yaml b/cypress/plugins/synapsedocker/templates/email/homeserver.yaml deleted file mode 100644 index fc20641ab401..000000000000 --- a/cypress/plugins/synapsedocker/templates/email/homeserver.yaml +++ /dev/null @@ -1,44 +0,0 @@ -server_name: "localhost" -pid_file: /data/homeserver.pid -public_baseurl: "{{PUBLIC_BASEURL}}" -listeners: - - port: 8008 - tls: false - bind_addresses: ["::"] - type: http - x_forwarded: true - - resources: - - names: [client] - compress: false - -database: - name: "sqlite3" - args: - database: ":memory:" - -log_config: "/data/log.config" - -media_store_path: "/data/media_store" -uploads_path: "/data/uploads" -enable_registration: true -registrations_require_3pid: - - email -registration_shared_secret: "{{REGISTRATION_SECRET}}" -report_stats: false -macaroon_secret_key: "{{MACAROON_SECRET_KEY}}" -form_secret: "{{FORM_SECRET}}" -signing_key_path: "/data/localhost.signing.key" - -trusted_key_servers: - - server_name: "matrix.org" -suppress_key_server_warning: true - -ui_auth: - session_timeout: "300s" - -email: - smtp_host: "%SMTP_HOST%" - smtp_port: %SMTP_PORT% - notif_from: "Your Friendly %(app)s homeserver