File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { expect , test , galata } from '@jupyterlab/galata' ;
2
+
3
+ test . describe ( 'JupyterCAD Lite Tests' , ( ) => {
4
+ test . beforeEach ( ( { page } ) => {
5
+ page . setDefaultTimeout ( 600000 ) ;
6
+
7
+ page . on ( 'console' , message => {
8
+ console . log ( 'CONSOLE MSG ---' , message . text ( ) ) ;
9
+ } ) ;
10
+ } ) ;
11
+
12
+ test . afterEach ( async ( { page } ) => {
13
+ await page . close ( { runBeforeUnload : true } ) ;
14
+ } ) ;
15
+
16
+ test ( 'Render Tree' , async ( { page } , testInfo ) => {
17
+ await page . goto ( 'lite' ) ;
18
+
19
+ const widget = await page . getByText ( 'widgets' ) ;
20
+
21
+ // Wait a bit for the theme to be applied
22
+ await page . waitForTimeout ( 1000 ) ;
23
+
24
+ expect ( await page . screenshot ( ) ) . toMatchSnapshot ( 'jupytercad-lite-tree.png' ) ;
25
+
26
+ await widget . click ( ) ;
27
+
28
+ expect ( await page . screenshot ( ) ) . toMatchSnapshot (
29
+ 'jupytercad-lite-subtree.png'
30
+ ) ;
31
+
32
+ const goUp = await page . getByTitle ( 'Jupyter Server Root' ) . locator ( 'svg' ) ;
33
+ await goUp . click ( ) ;
34
+
35
+ expect ( await page . screenshot ( ) ) . toMatchSnapshot ( 'jupytercad-lite-tree.png' ) ;
36
+ } ) ;
37
+ } ) ;
You can’t perform that action at this time.
0 commit comments