* initial application of recovery key input redesign
* update styling to agree more with design, and fix jest tests
* look for the right element for entering the key
* fix more playwright tests
* use return value of validation function instead of state
* Assert that we set backup_disabled when turning off key storage
* Prompt the user when key storage is unexpectedly off
* Playwright tests for the Turn on key storage toast
* feat(crypto): rename "security key" into "recovery key" in lang file
* test(crypto): rename "security key" into "recovery key" in test files
* test(e2e crypto): rename "security key" into "recovery key" in test files
* doc(crypto): rename "security key" into "recovery key"
* Wire up the "Forgot recovery key" button for the "Key storage out of sync" toast
* Unused import & fix test
* Test 'forgot' variant
* Fix dependencies
* Add more toast tests
* Unused import
* Test initialState in Encryption Tab
* Let's see if github has any more luck running this test than me
* Working playwright test with screenshot
* year
* Convert playwright test to use the bot client
* Disambiguate
Co-authored-by: Florian Duros <florianduros@element.io>
* Add doc & do other part of rename
* Split out into custom hook
* Fix tests
---------
Co-authored-by: Florian Duros <florianduros@element.io>
* SecurityManager: improve logging
* Only prompt user for default 4S key
We don't really support the concept of having multiple 4S keys active, so
prompting the user to enter a non-default 4S key without even telling them
which one we want is rather silly.
* playwright: factor out helper for setting up 4S
We seem to already have about 5 copies of this code, so before I add another,
let's factor it out.
* Playwright test for dehydrated device in reset flow
This should be fixed by the previous commit, so let's check it stays that way.
* test(e2e): `checkDeviceIsConnectedKeyBackup` is checking the key backup with the matrix client and the crypto api instead of relying of the `Security & Privacy` tab.
* test(e2e): renaming and improve documentation
* Refine `SettingsSection` & `SettingsTab`
* Add encryption tab
* Add recovery section
* Add device verification
* Rename `Panel` into `State`
* Update & add tests to user settings common
* Add tests to `RecoveryPanel`
* Add tests to `ChangeRecoveryKey`
* Update CreateSecretStorageDialog-test snapshot
* Add tests to `EncryptionUserSettingsTab`
* Update existing screenshots of e2e tests
* Add new encryption tab ownership to `@element-hq/element-crypto-web-reviewers`
* Add e2e tests
* Fix monospace font and add figma link to hardcoded value
* Add unit to Icon
* Improve e2e doc
* Assert that the crypto module is defined
* Add classname doc
* Fix typo
* Use `good` state instead of default
* Rename `ChangeRecoveryKey.isSetupFlow` into `ChangeRecoveryKey.userHasKeyBackup`
* Move `deleteCachedSecrets` fixture in `recovery.spec.ts`
* Use one callback instead of two in `RecoveryPanel`
* Fix docs and naming of `utils.createBot`
* Fix typo in `RecoveryPanel`
* Add more doc to the state of the `EncryptionUserSettingsTab`
* Rename `verification_required` into `set_up_encryption`
* Update test
* ADd new license
* Very early WIP of rejigged e2e error toast code
* Update comments and doc
* Assert that `recoveryKey.encodedPrivateKey` is always defined
* Add comments to explain how the secrets could be uncached
* Use `matrixClient.secretStorage.getDefaultKeyId` instead of `matrixClient.getCrypto().checkKeyBackupAndEnable` to know if we need to set up a recovery key
* Update existing screenshot to add encryption tab.
* Fix tests
* Remove unused file!
* Remove test for unused file
* Show 'set up encryption' in the 'other' case.
* Test 'key storage out of sync' toast
* Update tests
* Fix test & make toast look correct
* Use new labels when changing the recovery key
* Fix docs
* Don't reset key backup when creating a recovery key
* Add playwright test for toast
* Dismiss the toast as it's now in the way due to being wider
* Doesn't look like this needs to be async
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Override width for just this toast
---------
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Refine `SettingsSection` & `SettingsTab`
* Add encryption tab
* Add recovery section
* Add device verification
* Rename `Panel` into `State`
* Update & add tests to user settings common
* Add tests to `RecoveryPanel`
* Add tests to `ChangeRecoveryKey`
* Update CreateSecretStorageDialog-test snapshot
* Add tests to `EncryptionUserSettingsTab`
* Update existing screenshots of e2e tests
* Add new encryption tab ownership to `@element-hq/element-crypto-web-reviewers`
* Add e2e tests
* Fix monospace font and add figma link to hardcoded value
* Add unit to Icon
* Improve e2e doc
* Assert that the crypto module is defined
* Add classname doc
* Fix typo
* Use `good` state instead of default
* Rename `ChangeRecoveryKey.isSetupFlow` into `ChangeRecoveryKey.userHasKeyBackup`
* Move `deleteCachedSecrets` fixture in `recovery.spec.ts`
* Use one callback instead of two in `RecoveryPanel`
* Fix docs and naming of `utils.createBot`
* Fix typo in `RecoveryPanel`
* Add more doc to the state of the `EncryptionUserSettingsTab`
* Rename `verification_required` into `set_up_encryption`
* Update test
* ADd new license
* Update comments and doc
* Assert that `recoveryKey.encodedPrivateKey` is always defined
* Add comments to explain how the secrets could be uncached
* Use `matrixClient.secretStorage.getDefaultKeyId` instead of `matrixClient.getCrypto().checkKeyBackupAndEnable` to know if we need to set up a recovery key
* Update existing screenshot to add encryption tab.
* Update tests
* Use new labels when changing the recovery key
* Fix docs
* Don't reset key backup when creating a recovery key
* Fix doc
* Remove access to homeserver.config.baseUrl field in favour of homeserver.baseUrl
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use sane default_server_config and specify server.invalid in the specific tests which demand it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* break cycle
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* typo
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Clean up Playwright test code related to legacy crypto
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy further
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add extra buttons to room summary card
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove right panel tabs in favour of X button on each panel
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update room summary card header to align close button correctly
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix typo in pinned messages heading
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix base card title colours
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add labs option to exclude unverified devices
Add a labs option which will, when set, switch into the "invisible crypto"
mode of refusing to send keys to, or decrypt messages from, devices that have
not been signed by their owner.
* DecryptionFailureBody: better error messages
Improve the error messages shown for messages from insecure devices.
* playwright: factor out `createSecondBotDevice` utility
* Playwright test for messages from insecure devices
* fixup! DecryptionFailureBody: better error messages
Use compound colour tokens, and add a background colour.
* fixup! DecryptionFailureBody: better error messages
Use compound spacing tokens
* Default the room header to on
* Refactor code into helper method
Add a method to open/close the room info panel and use it everywhere.
* Fix broken tests, update snapshots and screenshots
* Update room header tests to make sense with the new header
* Split up slow Playwright tests
To optimise parallelism
Deals with:
```
Slow test file: read-receipts/redactions.spec.ts (5.4m)
Slow test file: read-receipts/new-messages.spec.ts (3.9m)
Slow test file: read-receipts/high-level.spec.ts (3.6m)
Slow test file: read-receipts/editing-messages.spec.ts (3.1m)
Slow test file: read-receipts/reactions.spec.ts (2.2m)
Slow test file: crypto/crypto.spec.ts (2.4m)
Slow test file: settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts (1.2m)
Slow test file: composer/composer.spec.ts (1.1m)
Slow test file: crypto/verification.spec.ts (1.1m)
```
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move around snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use different messages for UTDs sent before login
* Playwright test for historical events
* Add some tests
* Don't show "verify" message if backup is working
* Apply suggestions from code review
* Fix references to `crypto-api/verification`
This is supposed to be an internal module; use the front door instead.
* `IRecoveryKey` -> `GeneratedSecretStorageKey`
`IRecoveryKey` is just a backwards-compatibility alias for
`GeneratedSecretStorageKey`
* `ISecretStorageKeyInfo` -> `SecretStorage.SecretStorageKeyDescription`
Again, same thing
* `IPassphraseInfo` -> `SecretStorage.PassphraseInfo`
* Remove unused import restriction exceptions
* Move mailhog fixture to element-web-test.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove spurious debug log
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Lazily set up ElementAppPage subfixtures to avoid conflicting on network routing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update playwright/e2e/crypto/utils.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix bot MatrixClient being set up multiple times
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Migrate verification.spec.ts from Cypress to Playwright
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Migrate crypto.spec.ts from Cypress to Playwright
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add screenshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Record trace on-first-retry
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Don't start client when not needed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add bot log prefixing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Turns out we need these
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix crypto tests in rust crypto
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>