File tree Expand file tree Collapse file tree
AudioCuesheetEditor.End2EndTests/Pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,13 +79,29 @@ public async Task Record()
7979 [ TestMethod ]
8080 public async Task ChangeLanguage ( )
8181 {
82+ //TODO: Doesn't work in CI and using a new context conflicts tracing the default one
8283 // We need to use a new context because the default one doesn't work with changing a language
8384 var context = await Browser . NewContextAsync ( ) ;
85+ await context . Tracing . StartAsync ( new ( )
86+ {
87+ Title = $ "{ TestContext . FullyQualifiedTestClassName } .{ TestContext . TestName } ",
88+ Screenshots = true ,
89+ Snapshots = true ,
90+ Sources = true
91+ } ) ;
8492 var page = await context . NewPageAsync ( ) ;
8593 await page . GotoAsync ( "http://localhost:5132/" ) ;
8694 await page . GetByRole ( AriaRole . Button , new ( ) { Name = "Change language" } ) . ClickAsync ( ) ;
8795 await page . Locator ( "div" ) . Filter ( new ( ) { HasTextRegex = new Regex ( "^German \\ (Germany\\ )$" ) } ) . ClickAsync ( ) ;
8896 await Expect ( page . Locator ( "#app" ) ) . ToContainTextAsync ( "Allgemeine Informationen" ) ;
97+ await context . Tracing . StopAsync ( new ( )
98+ {
99+ Path = Path . Combine (
100+ Environment . CurrentDirectory ,
101+ "playwright-traces" ,
102+ $ "{ TestContext . FullyQualifiedTestClassName } .{ TestContext . TestName } .zip"
103+ )
104+ } ) ;
89105 await context . CloseAsync ( ) ;
90106 }
91107
You can’t perform that action at this time.
0 commit comments