class DateTimeFormatPage { startEditDateTime ( ) { cy . intercept ( { method : "GET" , pathname : "/prod/settings" , } ) . as ( "settingsRequest" ) ; cy . get ( "button" ) . contains ( "Edit" ) . click ( ) ; cy . wait ( [ "@settingsRequest" ] ) ; } updateFormat ( dateFormat , timeFormat ) { cy . get ( "select#dateFormat" ) . select ( dateFormat ) ; cy . get ( "select#timeFormat" ) . select ( timeFormat ) ; } verifyFormat ( dateFormat , timeFormat ) { cy . get ( "div.font-sans-lg" ) . first ( ) . contains ( dateFormat ) ; cy . get ( "div.font-sans-lg" ) . last ( ) . contains ( timeFormat ) ; } submit ( ) { cy . intercept ( { method : "PUT" , url : "/prod/settings" , } ) . as ( "updateSettingsRequest" ) ; cy . intercept ( { method : "GET" , url : "/prod/settings" , } ) . as ( "settingsRequest" ) ; cy . get ( "form" ) . submit ( ) ; cy . wait ( [ "@updateSettingsRequest" , "@settingsRequest" , "@settingsRequest" ] ) ; } } export default DateTimeFormatPage ;