File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,27 @@ describe('Client print test', () => {
2121 cy . getPdfProperties ( filePath ) . its ( 'numPages' ) . should ( 'eq' , 18 )
2222 cy . moveDownloads ( )
2323 } )
24+
25+ it ( 'downloads A6 PDF' , ( ) => {
26+ cy . task ( 'deleteDownloads' )
27+ cy . login ( 'test@example.com' )
28+
29+ cy . visit ( '/camps' )
30+ cy . get ( 'a:contains("GRGR")' ) . click ( )
31+ cy . get ( 'a:contains("Admin")' ) . click ( )
32+ cy . get ( 'a:contains("Drucken")' ) . click ( )
33+ cy . get ( 'button:contains("PDF herunterladen")' )
34+ cy . get ( 'button:contains("Einstellungen")' ) . click ( )
35+ cy . get ( 'label:contains("Schriftgrösse")' ) . click ( )
36+ cy . get ( '.v-list-item__content:contains("Druck auf A6")' ) . click ( )
37+ cy . get ( 'button:contains("PDF herunterladen (Layout #2)")' ) . click ( )
38+
39+ const downloadsFolder = Cypress . config ( 'downloadsFolder' )
40+ const filePath = path . join ( downloadsFolder , 'Pfila-2023.pdf' )
41+ cy . readFile ( filePath , {
42+ timeout : 30000 ,
43+ } )
44+ cy . getPdfProperties ( filePath ) . its ( 'numPages' ) . should ( 'eq' , 30 )
45+ cy . moveDownloads ( )
46+ } )
2447} )
Original file line number Diff line number Diff line change @@ -92,6 +92,23 @@ describe('Nuxt print test', () => {
9292 cy . getPdfProperties ( pdfPath ) . its ( 'numPages' ) . should ( 'eq' , 25 )
9393 } )
9494
95+ it ( 'for whole camp in A6' , ( ) => {
96+ cy . get ( 'a:contains("Admin")' ) . click ( )
97+ cy . get ( 'a:contains("Drucken")' ) . click ( )
98+ cy . get ( 'button:contains("PDF herunterladen")' )
99+ cy . get ( 'button:contains("Einstellungen")' ) . click ( )
100+ cy . get ( 'label:contains("Schriftgrösse")' ) . click ( )
101+ cy . get ( '.v-list-item__content:contains("Druck auf A6")' ) . click ( )
102+ cy . get ( 'button:contains("PDF herunterladen (Layout #1)")' ) . click ( )
103+
104+ const downloadsFolder = Cypress . config ( 'downloadsFolder' )
105+ const pdfPath = path . join ( downloadsFolder , 'Pfila-2023.pdf' )
106+ cy . readFile ( pdfPath , {
107+ timeout : 30000 ,
108+ } )
109+ cy . getPdfProperties ( pdfPath ) . its ( 'numPages' ) . should ( 'eq' , 44 )
110+ } )
111+
95112 it ( 'for picasso' , ( ) => {
96113 if ( Cypress . browser . name === 'firefox' ) {
97114 console . log (
You can’t perform that action at this time.
0 commit comments