Device manager - extract device deletion logic into util (#9168)

* extract deletedevices logic into util fn

* unit test deleteDevices

* test devicespanel device deletion

* remove debug logs

* i18n

* assert more on deleteMultipleDevices calls
This commit is contained in:
Kerry 2022-08-10 18:26:48 +02:00 committed by GitHub
parent b7872f2ff7
commit f020ed0b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 764 additions and 71 deletions

View file

@ -0,0 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`deleteDevices() opens interactive auth dialog when delete fails with 401 1`] = `
Object {
"m.login.sso": Object {
"1": Object {
"body": "Confirm logging out these devices by using Single Sign On to prove your identity.",
"continueKind": "primary",
"continueText": "Single Sign On",
"title": "Use Single Sign On to continue",
},
"2": Object {
"body": "Click the button below to confirm signing out these devices.",
"continueKind": "danger",
"continueText": "Sign out devices",
"title": "Confirm signing out these devices",
},
},
"org.matrix.login.sso": Object {
"1": Object {
"body": "Confirm logging out these devices by using Single Sign On to prove your identity.",
"continueKind": "primary",
"continueText": "Single Sign On",
"title": "Use Single Sign On to continue",
},
"2": Object {
"body": "Click the button below to confirm signing out these devices.",
"continueKind": "danger",
"continueText": "Sign out devices",
"title": "Confirm signing out these devices",
},
},
}
`;