@@ -48,31 +48,38 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
4848 return promiseVerificationRequest ;
4949 }
5050
51- test ( "Verify device with SAS during login" , async ( { page, app, credentials, homeserver } ) => {
52- await logIntoElement ( page , credentials ) ;
53-
54- // Launch the verification request between alice and the bot
55- const verificationRequest = await initiateAliceVerificationRequest ( page ) ;
56-
57- // Handle emoji SAS verification
58- const infoDialog = page . locator ( ".mx_InfoDialog" ) ;
59- // the bot chooses to do an emoji verification
60- const verifier = await verificationRequest . evaluateHandle ( ( request ) => request . startVerification ( "m.sas.v1" ) ) ;
61-
62- // Handle emoji request and check that emojis are matching
63- await doTwoWaySasVerification ( page , verifier ) ;
64-
65- await infoDialog . getByRole ( "button" , { name : "They match" } ) . click ( ) ;
66- await infoDialog . getByRole ( "button" , { name : "Got it" } ) . click ( ) ;
67-
68- // Check that our device is now cross-signed
69- await checkDeviceIsCrossSigned ( app ) ;
70-
71- // Check that the current device is connected to key backup
72- // For now we don't check that the backup key is in cache because it's a bit flaky,
73- // as we need to wait for the secret gossiping to happen.
74- await checkDeviceIsConnectedKeyBackup ( app , expectedBackupVersion , false ) ;
75- } ) ;
51+ test (
52+ "Verify device with SAS during login" ,
53+ { tag : "@screenshot" } ,
54+ async ( { page, app, credentials, homeserver } ) => {
55+ await logIntoElement ( page , credentials ) ;
56+
57+ // Launch the verification request between alice and the bot
58+ const verificationRequest = await initiateAliceVerificationRequest ( page ) ;
59+
60+ // Handle emoji SAS verification
61+ const infoDialog = page . locator ( ".mx_InfoDialog" ) ;
62+ // the bot chooses to do an emoji verification
63+ const verifier = await verificationRequest . evaluateHandle ( ( request ) =>
64+ request . startVerification ( "m.sas.v1" ) ,
65+ ) ;
66+
67+ // Handle emoji request and check that emojis are matching
68+ await doTwoWaySasVerification ( page , verifier ) ;
69+
70+ await infoDialog . getByRole ( "button" , { name : "They match" } ) . click ( ) ;
71+ await expect ( page . locator ( ".mx_E2EIcon_verified" ) ) . toMatchScreenshot ( "device-verified-e2eIcon.png" ) ;
72+ await infoDialog . getByRole ( "button" , { name : "Got it" } ) . click ( ) ;
73+
74+ // Check that our device is now cross-signed
75+ await checkDeviceIsCrossSigned ( app ) ;
76+
77+ // Check that the current device is connected to key backup
78+ // For now we don't check that the backup key is in cache because it's a bit flaky,
79+ // as we need to wait for the secret gossiping to happen.
80+ await checkDeviceIsConnectedKeyBackup ( app , expectedBackupVersion , false ) ;
81+ } ,
82+ ) ;
7683
7784 // Regression test for https://github.com/element-hq/element-web/issues/29110
7885 test ( "No toast after verification, even if the secrets take a while to arrive" , async ( { page, credentials } ) => {
0 commit comments