@@ -8,12 +8,8 @@ import { htmlSafe } from '@ember/template';
88import { setupRenderingTest } from 'test-app/tests/helpers' ;
99import { Example } from 'test-app/react/example' ;
1010import { ExampleIntl } from 'test-app/react/exampleIntl' ;
11- import { ExampleWithLD } from 'test-app/react/example-ld' ;
1211import { CustomProviders } from 'test-app/react/custom-providers' ;
13- import { CustomProvidersWithLD } from 'test-app/react/custom-providers-with-ld' ;
1412import { setupIntl } from 'ember-intl/test-support' ;
15- import { setupLaunchDarkly } from 'ember-launch-darkly/test-support' ;
16- import { getCurrentContext } from 'ember-launch-darkly/-sdk/context' ;
1713
1814module ( 'Integration | Component | react-bridge' , function ( hooks ) {
1915 setupRenderingTest ( hooks ) ;
@@ -183,51 +179,6 @@ module('Integration | Component | react-bridge', function (hooks) {
183179 assert . dom ( this . element ) . hasText ( 'Willkommen in React!' ) ;
184180 } ) ;
185181
186- module ( 'when LDProvider is part of custom providers' , function ( hooks ) {
187- setupLaunchDarkly ( hooks ) ;
188-
189- hooks . beforeEach ( async function ( ) {
190- this . customProvidersComponent = CustomProvidersWithLD ;
191- this . reactExample = ExampleWithLD ;
192-
193- this . context = getCurrentContext ( ) ;
194- } ) ;
195-
196- test ( 'it can access flags via useFlags hook' , async function ( assert ) {
197- await this . withVariation ( 'feature--experiment-a' , true ) ;
198- await render ( hbs `
199- <ReactBridge
200- @reactComponent={{this.reactExample}}
201- @providerOptions={{hash
202- component=this.customProvidersComponent
203- props=(hash ldFlags=this.context.allFlags)
204- }}
205- />
206- ` ) ;
207-
208- assert . dom ( '[data-test-feature-experiment-a]' ) . exists ( ) ;
209- } ) ;
210-
211- test ( 'it re-renders when a flag changes' , async function ( assert ) {
212- await this . withVariation ( 'feature--experiment-a' , true ) ;
213- await render ( hbs `
214- <ReactBridge
215- @reactComponent={{this.reactExample}}
216- @providerOptions={{hash
217- component=this.customProvidersComponent
218- props=(hash ldFlags=this.context.allFlags)
219- }}
220- />
221- ` ) ;
222-
223- assert . dom ( '[data-test-feature-experiment-a]' ) . exists ( ) ;
224-
225- await this . withVariation ( 'feature--experiment-a' , false ) ;
226-
227- assert . dom ( '[data-test-feature-experiment-a]' ) . doesNotExist ( ) ;
228- } ) ;
229- } ) ;
230-
231182 test ( 'it defaults to a div if no tag name is passed as a prop' , async function ( assert ) {
232183 await render ( hbs `
233184 <ReactBridge @reactComponent={{this.reactExample}} />
0 commit comments