@@ -13,7 +13,6 @@ import {
1313
1414import app from '../../../app' ;
1515import { buildAppUrl , getConfig } from '../../../config' ;
16- import * as launchDarkly from '../../../config/launch_darkly' ;
1716import {
1817 buildJiraIssueUrl ,
1918 FigmaFileWebhookEventType ,
@@ -353,6 +352,12 @@ describe('/entities', () => {
353352 nodeId : '0:0' ,
354353 } ) ,
355354 } ) ;
355+ mockFigmaCreateWebhookEndpoint ( {
356+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
357+ } ) ;
358+ mockFigmaCreateWebhookEndpoint ( {
359+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
360+ } ) ;
356361
357362 await request ( app )
358363 . put ( buildAppUrl ( 'entities/onEntityAssociated' ) . pathname )
@@ -374,10 +379,7 @@ describe('/entities', () => {
374379 . expect ( HttpStatusCode . Ok ) ;
375380 } ) ;
376381
377- it ( 'should create Figma webhooks for the file when the feature flag is enabled' , async ( ) => {
378- jest . spyOn ( launchDarkly , 'getLDClient' ) . mockResolvedValue ( null ) ;
379- jest . spyOn ( launchDarkly , 'getFeatureFlag' ) . mockResolvedValue ( true ) ;
380-
382+ it ( 'should create Figma webhooks for the file' , async ( ) => {
381383 const connectInstallation = await connectInstallationRepository . upsert (
382384 generateConnectInstallationCreateParams ( ) ,
383385 ) ;
@@ -524,6 +526,12 @@ describe('/entities', () => {
524526 issueId,
525527 status : HttpStatusCode . NotFound ,
526528 } ) ;
529+ mockFigmaCreateWebhookEndpoint ( {
530+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
531+ } ) ;
532+ mockFigmaCreateWebhookEndpoint ( {
533+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
534+ } ) ;
527535
528536 await request ( app )
529537 . put ( buildAppUrl ( 'entities/onEntityAssociated' ) . pathname )
@@ -682,6 +690,12 @@ describe('/entities', () => {
682690 } ) ,
683691 status : HttpStatusCode . Forbidden ,
684692 } ) ;
693+ mockFigmaCreateWebhookEndpoint ( {
694+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
695+ } ) ;
696+ mockFigmaCreateWebhookEndpoint ( {
697+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
698+ } ) ;
685699
686700 await request ( app )
687701 . put ( buildAppUrl ( 'entities/onEntityAssociated' ) . pathname )
@@ -758,6 +772,12 @@ describe('/entities', () => {
758772 nodeId : '0:0' ,
759773 } ) ,
760774 } ) ;
775+ mockFigmaCreateWebhookEndpoint ( {
776+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
777+ } ) ;
778+ mockFigmaCreateWebhookEndpoint ( {
779+ baseUrl : getConfig ( ) . figma . apiBaseUrl ,
780+ } ) ;
761781
762782 await request ( app )
763783 . put ( buildAppUrl ( 'entities/onEntityAssociated' ) . pathname )
0 commit comments