mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: migrations e2e test (#8965)
Onboarding changed e2e test that should run before migration.
This commit is contained in:
		
							parent
							
								
									7a436347cb
								
							
						
					
					
						commit
						828ecf8d63
					
				| @ -19,6 +19,7 @@ describe('feature', () => { | ||||
| 
 | ||||
|     it('can create a feature flag', () => { | ||||
|         cy.createFeature_UI(featureToggleName, true, 'default', true); | ||||
|         cy.contains('a', featureToggleName).click(); | ||||
|         cy.url().should('include', featureToggleName); | ||||
|     }); | ||||
| }); | ||||
|  | ||||
| @ -57,6 +57,7 @@ export const createFeature_UI = ( | ||||
|     const projectName = project || 'default'; | ||||
|     const uiOpts = forceInteractions ? { force: true } : undefined; | ||||
|     cy.visit(`/projects/${projectName}`); | ||||
| 
 | ||||
|     cy.get('[data-testid=NAVIGATE_TO_CREATE_FEATURE').click(uiOpts); | ||||
| 
 | ||||
|     cy.intercept('POST', `/api/admin/projects/${projectName}/features`).as( | ||||
|  | ||||
| @ -28,6 +28,7 @@ import { CreateFeatureDialog } from './CreateFeatureDialog'; | ||||
| import IosShare from '@mui/icons-material/IosShare'; | ||||
| import type { OverridableStringUnion } from '@mui/types'; | ||||
| import type { ButtonPropsVariantOverrides } from '@mui/material/Button/Button'; | ||||
| import { NAVIGATE_TO_CREATE_FEATURE } from 'utils/testIds'; | ||||
| 
 | ||||
| interface IProjectFeatureTogglesHeaderProps { | ||||
|     isLoading?: boolean; | ||||
| @ -46,6 +47,7 @@ interface IFlagCreationButtonProps { | ||||
|         ButtonPropsVariantOverrides | ||||
|     >; | ||||
|     skipNavigationOnComplete?: boolean; | ||||
|     isLoading?: boolean; | ||||
|     onSuccess?: () => void; | ||||
| } | ||||
| 
 | ||||
| @ -57,6 +59,7 @@ export const FlagCreationButton = ({ | ||||
|     variant, | ||||
|     text = 'New feature flag', | ||||
|     skipNavigationOnComplete, | ||||
|     isLoading, | ||||
|     onSuccess, | ||||
| }: IFlagCreationButtonProps) => { | ||||
|     const { loading } = useUiConfig(); | ||||
| @ -72,10 +75,12 @@ export const FlagCreationButton = ({ | ||||
|                 maxWidth='960px' | ||||
|                 Icon={Add} | ||||
|                 projectId={projectId} | ||||
|                 disabled={loading} | ||||
|                 disabled={loading || isLoading} | ||||
|                 variant={variant} | ||||
|                 permission={CREATE_FEATURE} | ||||
|                 data-testid='NAVIGATE_TO_CREATE_FEATURE' | ||||
|                 data-testid={ | ||||
|                     loading || isLoading ? '' : NAVIGATE_TO_CREATE_FEATURE | ||||
|                 } | ||||
|             > | ||||
|                 {text} | ||||
|             </StyledResponsiveButton> | ||||
| @ -207,7 +212,7 @@ export const ProjectFeatureTogglesHeader: FC< | ||||
|                                 </Button> | ||||
|                             } | ||||
|                         /> | ||||
|                         <FlagCreationButton /> | ||||
|                         <FlagCreationButton isLoading={isLoading} /> | ||||
|                     </> | ||||
|                 } | ||||
|             > | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user