File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
playwright/e2e/mobile-guide Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2025 New Vector Ltd.
3
+
4
+ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
5
+ Please see LICENSE files in the repository root for full details.
6
+ */
7
+
8
+ import { test , expect } from '../../element-web-test' ;
9
+ import { MobileAppVariant } from '../../../src/vector/mobile_guide/mobile-apps' ;
10
+
11
+ const variants = [
12
+ MobileAppVariant . Classic ,
13
+ MobileAppVariant . X ,
14
+ MobileAppVariant . Pro ,
15
+ ] ;
16
+
17
+ // Use a base config, can be extended per variant
18
+ test . use ( {
19
+ config : {
20
+ // Add any required base config here
21
+ default_server_config : {
22
+ 'm.homeserver' : {
23
+ base_url : 'https://matrix.server.invalid' ,
24
+ server_name : 'server.invalid' ,
25
+ } ,
26
+ } ,
27
+ } ,
28
+ } ) ;
29
+
30
+ test . describe ( 'Mobile Guide Screenshots' , ( ) => {
31
+ for ( const variant of variants ) {
32
+ test . use ( {
33
+ config : {
34
+ mobile_guide_app_variant : variant ,
35
+ } ,
36
+ viewport : { width : 390 , height : 844 } , // iPhone 16e
37
+ } ) ;
38
+ test ( `should match the homepage screenshot for variant: ${ variant } ` , async ( { page, axe } ) => {
39
+ await page . goto ( '/mobile_guide/' ) ;
40
+ await expect ( page ) . toMatchScreenshot ( `mobile-guide-${ variant } .png` ) ;
41
+ await expect ( axe ) . toHaveNoViolations ( ) ;
42
+ } ) ;
43
+ }
44
+ } ) ;
You can’t perform that action at this time.
0 commit comments