@@ -84,6 +84,7 @@ declare global {
8484 * @param text text of the ui5-option that should be clicked
8585 * @param options ClickOptions
8686 *
87+ * @deprecated This command is deprecated. Please use `clickDropdownMenuItemByText` instead.
8788 *
8889 * @example cy.get('[ui5-select]').clickUi5SelectOptionByText('Option2');
8990 */
@@ -94,7 +95,7 @@ declare global {
9495 *
9596 * __Note:__ The select popover must be visible, otherwise it can lead to unwanted side effects.
9697 *
97- * @deprecated : This command is deprecated. Please use `clickDropdownMenuItem` instead.
98+ * @deprecated This command is deprecated. Please use `clickDropdownMenuItem` instead.
9899 *
99100 * @example cy.get('[ui5-option]').clickUi5SelectOption();
100101 */
@@ -208,6 +209,14 @@ Cypress.Commands.add('clickUi5ListItemByText', { prevSubject: 'optional' }, (sub
208209} ) ;
209210
210211Cypress . Commands . add ( 'clickUi5SelectOptionByText' , { prevSubject : 'element' } , ( subject , text , options = { } ) => {
212+ Cypress . log ( {
213+ name : 'Deprecation' ,
214+ message : [ '`clickUi5SelectOptionByText` is deprecated! Please use `clickDropdownMenuItemByText` instead.' ] ,
215+ consoleProps : ( ) => ( {
216+ deprecated : 'clickUi5SelectOptionByText' ,
217+ replacement : 'clickDropdownMenuItemByText' ,
218+ } ) ,
219+ } ) ;
211220 cy . wrap ( subject )
212221 . contains ( text )
213222 . then ( ( $option ) => {
@@ -217,6 +226,14 @@ Cypress.Commands.add('clickUi5SelectOptionByText', { prevSubject: 'element' }, (
217226} ) ;
218227
219228Cypress . Commands . add ( 'clickUi5SelectOption' , { prevSubject : 'element' } , ( subject , options = { } ) => {
229+ Cypress . log ( {
230+ name : 'Deprecation' ,
231+ message : [ '`clickUi5SelectOption` is deprecated! Please use `clickDropdownMenuItem` instead.' ] ,
232+ consoleProps : ( ) => ( {
233+ deprecated : 'clickUi5SelectOption' ,
234+ replacement : 'clickDropdownMenuItem' ,
235+ } ) ,
236+ } ) ;
220237 cy . wrap ( subject ) . then ( ( $option ) => {
221238 // @ts -expect-error: cannot set $option to use OptionDomRef
222239 const domRef = $option . get ( 0 ) . getDomRef ( ) ;
0 commit comments