import TopicAreaListingPage from "./TopicAreaListing" ; class EditTopicAreaLabelPage { renameTopicAreaLabel ( newName ) { cy . findByLabelText ( "Rename single 'topic area'*" ) . clear ( ) . type ( newName ) ; } renameTopicAreasLabel ( newNames ) { cy . findByLabelText ( "Rename multiple 'topic areas'*" ) . clear ( ) . type ( newNames ) ; } submit ( ) { cy . intercept ( { method : "PUT" , url : "/prod/settings" , } ) . as ( "editTopicAreaLabelRequest" ) ; cy . intercept ( { method : "GET" , url : "/prod/topicarea" , } ) . as ( "listTopicAreasRequest" ) ; cy . intercept ( { method : "GET" , url : "/prod/settings" , } ) . as ( "settingsRequest" ) ; cy . get ( "form" ) . submit ( ) ; cy . wait ( [ "@editTopicAreaLabelRequest" , "@listTopicAreasRequest" , "@settingsRequest" , ] ) ; return new TopicAreaListingPage ( ) ; } } export default EditTopicAreaLabelPage ;