import TopicAreaListingPage from "./TopicAreaListing" ; class CreateTopicAreaPage { createTopicArea ( topicAreaName ) { cy . get ( "[data-testid='CreateTopicAreaForm'] input" ) . type ( topicAreaName ) ; } submit ( ) { cy . intercept ( { method : "POST" , url : "prod/topicarea" , } ) . as ( "createTopicAreaRequest" ) ; cy . intercept ( { method : "GET" , url : "/prod/topicarea" , } ) . as ( "listTopicAreasRequest" ) ; cy . intercept ( { method : "GET" , url : "/prod/settings" , } ) . as ( "settingsRequest" ) ; cy . get ( "form" ) . submit ( ) ; cy . wait ( [ "@createTopicAreaRequest" , "@listTopicAreasRequest" , "@settingsRequest" , ] ) ; return new TopicAreaListingPage ( ) ; } } export default CreateTopicAreaPage ;