55 */
66
77import { validateSingleAction , validateRuleActionsField } from './schema' ;
8- import { isUuidv4 , getActionTypeName , validateMustache , validateActionParams } from './utils' ;
8+ import { isUuid , getActionTypeName , validateMustache , validateActionParams } from './utils' ;
99import { actionTypeRegistryMock } from '../../../../../../triggers_actions_ui/public/application/action_type_registry.mock' ;
1010import { FormHook } from '../../../../shared_imports' ;
1111jest . mock ( './utils' ) ;
@@ -15,7 +15,7 @@ describe('stepRuleActions schema', () => {
1515
1616 describe ( 'validateSingleAction' , ( ) => {
1717 it ( 'should validate single action' , ( ) => {
18- ( isUuidv4 as jest . Mock ) . mockReturnValue ( true ) ;
18+ ( isUuid as jest . Mock ) . mockReturnValue ( true ) ;
1919 ( validateActionParams as jest . Mock ) . mockReturnValue ( [ ] ) ;
2020 ( validateMustache as jest . Mock ) . mockReturnValue ( [ ] ) ;
2121
@@ -33,7 +33,7 @@ describe('stepRuleActions schema', () => {
3333 } ) ;
3434
3535 it ( 'should validate single action with invalid mustache template' , ( ) => {
36- ( isUuidv4 as jest . Mock ) . mockReturnValue ( true ) ;
36+ ( isUuid as jest . Mock ) . mockReturnValue ( true ) ;
3737 ( validateActionParams as jest . Mock ) . mockReturnValue ( [ ] ) ;
3838 ( validateMustache as jest . Mock ) . mockReturnValue ( [ 'Message is not valid mustache template' ] ) ;
3939
@@ -54,7 +54,7 @@ describe('stepRuleActions schema', () => {
5454 } ) ;
5555
5656 it ( 'should validate single action with incorrect id' , ( ) => {
57- ( isUuidv4 as jest . Mock ) . mockReturnValue ( false ) ;
57+ ( isUuid as jest . Mock ) . mockReturnValue ( false ) ;
5858 ( validateMustache as jest . Mock ) . mockReturnValue ( [ ] ) ;
5959 ( validateActionParams as jest . Mock ) . mockReturnValue ( [ ] ) ;
6060
@@ -117,9 +117,9 @@ describe('stepRuleActions schema', () => {
117117 } ) ;
118118
119119 it ( 'should validate multiple incorrect rule actions field' , ( ) => {
120- ( isUuidv4 as jest . Mock ) . mockReturnValueOnce ( false ) ;
120+ ( isUuid as jest . Mock ) . mockReturnValueOnce ( false ) ;
121121 ( getActionTypeName as jest . Mock ) . mockReturnValueOnce ( 'Slack' ) ;
122- ( isUuidv4 as jest . Mock ) . mockReturnValueOnce ( true ) ;
122+ ( isUuid as jest . Mock ) . mockReturnValueOnce ( true ) ;
123123 ( getActionTypeName as jest . Mock ) . mockReturnValueOnce ( 'Pagerduty' ) ;
124124 ( validateActionParams as jest . Mock ) . mockReturnValue ( [ 'Summary is required' ] ) ;
125125 ( validateMustache as jest . Mock ) . mockReturnValue ( [ 'Component is not valid mustache template' ] ) ;
0 commit comments