File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
cypress/e2e/dashboard/login Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,26 @@ module.exports = defineConfig({
3535 launchOptions . args . push ( "--disable-gl-drawing-for-tests" ) ;
3636 launchOptions . args . push ( "--disable-gpu" ) ;
3737 launchOptions . args . push ( "--disable-dev-shm-usage" ) ;
38+ launchOptions . args . push ( '--enable-precise-memory-info' ) ;
39+ launchOptions . args . push ( '--js-flags="--expose-gc"' ) ;
3840 }
3941 launchOptions . args . push ( '--js-flags="--max_old_space_size=3500 --max_semi_space_size=1024"' ) ;
4042 }
4143 return launchOptions ;
4244 } ) ;
45+ on ( 'task' , {
46+ logMemory ( ) {
47+ if ( global . gc ) {
48+ global . gc ( ) ;
49+ } else {
50+ console . warn ( 'Garbage collection is not exposed. Run node with --expose-gc' ) ;
51+ }
52+
53+ const used = process . memoryUsage ( ) ;
54+ console . log ( `MEMORY USAGE: RSS: ${ Math . round ( used . rss / 1024 / 1024 ) } MB | Heap Used: ${ Math . round ( used . heapUsed / 1024 / 1024 ) } MB` ) ;
55+ return null ;
56+ }
57+ } ) ;
4358 } ,
4459 } ,
4560} ) ;
Original file line number Diff line number Diff line change @@ -12,10 +12,13 @@ describe('Login', () => {
1212 } ) ;
1313
1414 it ( 'should successfully log in to with valid username and password' , function ( ) {
15+ cy . task ( 'logMemory' ) ;
1516 loginHelpers . typeUsername ( user . username ) ;
1617 loginHelpers . typePassword ( user . password ) ;
1718 loginHelpers . clickLoginButton ( ) ;
19+ cy . task ( 'logMemory' ) ;
1820 navigationHelpers . isNavigatedToDashboard ( ) ;
21+ cy . task ( 'logMemory' ) ;
1922 } ) ;
2023
2124 it ( 'should successfully log in to with valid e-mail and password' , function ( ) {
You can’t perform that action at this time.
0 commit comments