@@ -41,7 +41,12 @@ test.describe("Cryptography", function () {
41
41
} ) ;
42
42
} ) ;
43
43
44
- test ( "should show the correct shield on e2e events" , async ( { page, app, bot : bob , homeserver } ) => {
44
+ test ( "should show the correct shield on e2e events" , async ( {
45
+ page,
46
+ app,
47
+ bot : bob ,
48
+ homeserver,
49
+ } , workerInfo ) => {
45
50
// Bob has a second, not cross-signed, device
46
51
const bobSecondDevice = new Bot ( page , homeserver , {
47
52
bootstrapSecretStorage : false ,
@@ -117,7 +122,10 @@ test.describe("Cryptography", function () {
117
122
await lastTileE2eIcon . focus ( ) ;
118
123
await expect ( page . getByRole ( "tooltip" ) ) . toContainText ( "Encrypted by a device not verified by its owner." ) ;
119
124
120
- /* Should show a grey padlock for a message from an unknown device */
125
+ /* In legacy crypto: should show a grey padlock for a message from a deleted device.
126
+ * In rust crypto: should show a red padlock for a message from an unverified device.
127
+ * Rust crypto remembers the verification state of the sending device, so it will know that the device was
128
+ * unverified, even if it gets deleted. */
121
129
// bob deletes his second device
122
130
await bobSecondDevice . evaluate ( ( cli ) => cli . logout ( true ) ) ;
123
131
@@ -148,7 +156,11 @@ test.describe("Cryptography", function () {
148
156
await expect ( last ) . toContainText ( "test encrypted from unverified" ) ;
149
157
await expect ( lastE2eIcon ) . toHaveClass ( / m x _ E v e n t T i l e _ e 2 e I c o n _ w a r n i n g / ) ;
150
158
await lastE2eIcon . focus ( ) ;
151
- await expect ( page . getByRole ( "tooltip" ) ) . toContainText ( "Encrypted by an unknown or deleted device." ) ;
159
+ await expect ( page . getByRole ( "tooltip" ) ) . toContainText (
160
+ workerInfo . project . name === "Legacy Crypto"
161
+ ? "Encrypted by an unknown or deleted device."
162
+ : "Encrypted by a device not verified by its owner." ,
163
+ ) ;
152
164
} ) ;
153
165
154
166
test ( "Should show a grey padlock for a key restored from backup" , async ( {
0 commit comments