This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into florianduros/fix/high-contrast-theme
- Loading branch information
Showing
46 changed files
with
642 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Pull Request Base Branch | ||
on: | ||
pull_request: | ||
types: [opened, edited, synchronize] | ||
jobs: | ||
check_base_branch: | ||
name: Check PR base branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
const baseBranch = context.payload.pull_request.base.ref; | ||
if (!['develop', 'staging'].includes(baseBranch) && !baseBranch.startsWith('feat/')) { | ||
core.setFailed(`Invalid base branch: ${baseBranch}`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright 2024 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. | ||
*/ | ||
|
||
/* | ||
* Tests for application startup with guest registration enabled on the server. | ||
*/ | ||
|
||
import { expect, test } from "../../element-web-test"; | ||
|
||
test.use({ | ||
startHomeserverOpts: "guest-enabled", | ||
config: async ({ homeserver }, use) => { | ||
await use({ | ||
default_server_config: { | ||
"m.homeserver": { base_url: homeserver.config.baseUrl }, | ||
}, | ||
}); | ||
}, | ||
}); | ||
|
||
test("Shows the welcome page by default", async ({ page }) => { | ||
await page.goto("/"); | ||
await expect(page.getByRole("heading", { name: "Welcome to Element!" })).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "Sign in" })).toBeVisible(); | ||
}); | ||
|
||
test("Room link correctly loads a room view", async ({ page }) => { | ||
await page.goto("/#/room/!room:id"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
await expect(page).toHaveURL(/\/#\/room\/!room:id$/); | ||
await expect(page.getByRole("heading", { name: "Join the conversation with an account" })).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
Copyright 2024 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. | ||
*/ | ||
|
||
import { expect, test } from "../../element-web-test"; | ||
import { ElementAppPage } from "../../pages/ElementAppPage"; | ||
|
||
/* | ||
* Tests for application startup with credentials stored in localstorage. | ||
*/ | ||
|
||
test.use({ displayName: "Boris" }); | ||
|
||
test("Shows the homepage by default", async ({ pageWithCredentials: page }) => { | ||
await page.goto("/"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
|
||
await expect(page).toHaveURL(/\/#\/home/); | ||
await expect(page.getByRole("heading", { name: "Welcome Boris", exact: true })).toBeVisible(); | ||
}); | ||
|
||
test("Shows the last known page on reload", async ({ pageWithCredentials: page }) => { | ||
await page.goto("/"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
|
||
const app = new ElementAppPage(page); | ||
await app.client.createRoom({ name: "Test Room" }); | ||
await app.viewRoomByName("Test Room"); | ||
|
||
// Navigate away | ||
await page.goto("about:blank"); | ||
|
||
// And back again | ||
await page.goto("/"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
|
||
// Check that the room reloaded | ||
await expect(page).toHaveURL(/\/#\/room\//); | ||
await expect(page.locator(".mx_LegacyRoomHeader")).toContainText("Test Room"); | ||
}); | ||
|
||
test("Room link correctly loads a room view", async ({ pageWithCredentials: page }) => { | ||
await page.goto("/#/room/!room:id"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
|
||
await expect(page).toHaveURL(/\/#\/room\/!room:id$/); | ||
await expect(page.getByRole("button", { name: "Join the discussion" })).toBeVisible(); | ||
}); | ||
|
||
test("Login link redirects to home page", async ({ pageWithCredentials: page }) => { | ||
await page.goto("/#/login"); | ||
await page.waitForSelector(".mx_MatrixChat", { timeout: 30000 }); | ||
|
||
await expect(page).toHaveURL(/\/#\/home/); | ||
await expect(page.getByRole("heading", { name: "Welcome Boris", exact: true })).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
playwright/plugins/homeserver/synapse/templates/guest-enabled/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A synapse configured with guest registration enabled. |
Oops, something went wrong.