mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: override field changed name to contextName
This commit is contained in:
		
							parent
							
								
									ba9d28b18d
								
							
						
					
					
						commit
						f51500ec78
					
				@ -28,7 +28,7 @@ const variantsSchema = joi.object().keys({
 | 
				
			|||||||
        joi
 | 
					        joi
 | 
				
			||||||
            .object()
 | 
					            .object()
 | 
				
			||||||
            .keys({
 | 
					            .keys({
 | 
				
			||||||
                field: joi.string().required(),
 | 
					                contextName: joi.string().required(),
 | 
				
			||||||
                values: joi.array().items(joi.string()),
 | 
					                values: joi.array().items(joi.string()),
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
            .optional()
 | 
					            .optional()
 | 
				
			||||||
 | 
				
			|||||||
@ -56,7 +56,7 @@ test('should be possible to define variant overrides', t => {
 | 
				
			|||||||
                weight: 1,
 | 
					                weight: 1,
 | 
				
			||||||
                overrides: [
 | 
					                overrides: [
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        field: 'userId',
 | 
					                        contextName: 'userId',
 | 
				
			||||||
                        values: ['123'],
 | 
					                        values: ['123'],
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
                ],
 | 
					                ],
 | 
				
			||||||
 | 
				
			|||||||
@ -250,7 +250,7 @@ test.serial('creates new feature toggle with variant overrides', async t => {
 | 
				
			|||||||
                    weight: 50,
 | 
					                    weight: 50,
 | 
				
			||||||
                    overrides: [
 | 
					                    overrides: [
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            field: 'userId',
 | 
					                            contextName: 'userId',
 | 
				
			||||||
                            values: ['123'],
 | 
					                            values: ['123'],
 | 
				
			||||||
                        },
 | 
					                        },
 | 
				
			||||||
                    ],
 | 
					                    ],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user