Skip to content

Playwright: add populateLocalStorageWithCredentials helper#80

Merged
richvdh merged 2 commits intomainfrom
rav/credentials_funcs
Oct 3, 2025
Merged

Playwright: add populateLocalStorageWithCredentials helper#80
richvdh merged 2 commits intomainfrom
rav/credentials_funcs

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Oct 3, 2025

A couple of commits which culminate in adding a populateLocalStorageWithCredentials utility method, allowing Element to be used with an account other than the default provided by the credentials fixture, without doing the slow login flow.

`Credentials` is used to record the access token etc once we log in a or
register a user. An access token isn't much use to you unless you know where to
send it, so this patch addes a new field, `homeserverUrl`, which contains
the base public URL for the homeserver.
@richvdh richvdh requested a review from a team as a code owner October 3, 2025 11:33
This just takes the innards of the `pageWithCredentials` fixture and makes it
reusable in contexts outside the fixture. (This can be useful if you want to
use Element with an account other than the default provided by the
`credentials` fixture.)
@richvdh richvdh force-pushed the rav/credentials_funcs branch from d46c659 to 2214dc0 Compare October 3, 2025 11:43
@richvdh richvdh merged commit 35b6052 into main Oct 3, 2025
17 checks passed
@richvdh richvdh deleted the rav/credentials_funcs branch October 3, 2025 11:48
richvdh added a commit to element-hq/element-web that referenced this pull request Oct 3, 2025
Pick up the extended `Credentials` interface that was added in
element-hq/element-modules#80.
richvdh added a commit to element-hq/element-web that referenced this pull request Oct 3, 2025
Pick up the extended `Credentials` interface that was added in
element-hq/element-modules#80.
richvdh added a commit to element-hq/element-web that referenced this pull request Oct 3, 2025
Pick up the extended `Credentials` interface that was added in
element-hq/element-modules#80.
github-merge-queue bot pushed a commit to element-hq/element-web that referenced this pull request Oct 8, 2025
* Playwright: `getCurrentRoomIdFromUrl`

Helper function to fish a room ID out of the URL

* Playwright: use updated `Credentials` class from common lib

Pick up the extended `Credentials` interface that was added in
element-hq/element-modules#80.

* Playwright: use `routeConfigJson` from common lib

element-hq/element-modules#81 added a utility function
for building and routing `config.json`; we should use it.

* Playwright test for history sharing on invite

Fixes element-hq/element-meta#2920

* Avoid use of CSS in playwright locators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants