@@ -109,53 +109,45 @@ describe('Collection schema tab', function () {
109109 } ) ;
110110 }
111111
112- describe ( 'with the enableExportSchema feature flag enabled' , function ( ) {
113- beforeEach ( async function ( ) {
114- // TODO(COMPASS-8819): remove web skip when defaulted true.
115- skipForWeb ( this , "can't toggle features in compass-web" ) ;
116- await browser . setFeature ( 'enableExportSchema' , true ) ;
117- } ) ;
118-
119- it ( 'shows an exported schema to copy' , async function ( ) {
120- await browser . navigateToCollectionTab (
121- DEFAULT_CONNECTION_NAME_1 ,
122- 'test' ,
123- 'numbers' ,
124- 'Schema'
125- ) ;
126- await browser . clickVisible ( Selectors . AnalyzeSchemaButton ) ;
112+ it ( 'shows an exported schema to copy' , async function ( ) {
113+ await browser . navigateToCollectionTab (
114+ DEFAULT_CONNECTION_NAME_1 ,
115+ 'test' ,
116+ 'numbers' ,
117+ 'Schema'
118+ ) ;
119+ await browser . clickVisible ( Selectors . AnalyzeSchemaButton ) ;
127120
128- const element = browser . $ ( Selectors . SchemaFieldList ) ;
129- await element . waitForDisplayed ( ) ;
121+ const element = browser . $ ( Selectors . SchemaFieldList ) ;
122+ await element . waitForDisplayed ( ) ;
130123
131- await browser . clickVisible ( Selectors . ExportSchemaButton ) ;
124+ await browser . clickVisible ( Selectors . ExportSchemaButton ) ;
132125
133- const exportModal = browser . $ ( Selectors . ExportSchemaFormatOptions ) ;
134- await exportModal . waitForDisplayed ( ) ;
126+ const exportModal = browser . $ ( Selectors . ExportSchemaFormatOptions ) ;
127+ await exportModal . waitForDisplayed ( ) ;
135128
136- const exportSchemaContent = browser . $ ( Selectors . ExportSchemaOutput ) ;
137- await exportSchemaContent . waitForDisplayed ( ) ;
138- const text = await browser . getCodemirrorEditorText (
139- Selectors . ExportSchemaOutput
140- ) ;
141- const parsedText = JSON . parse ( text ) ;
142- delete parsedText . $defs ;
143- expect ( parsedText ) . to . deep . equal ( {
144- $schema : 'https://json-schema.org/draft/2020-12/schema' ,
145- type : 'object' ,
146- required : [ '_id' , 'i' , 'j' ] ,
147- properties : {
148- _id : {
149- $ref : '#/$defs/ObjectId' ,
150- } ,
151- i : {
152- type : 'integer' ,
153- } ,
154- j : {
155- type : 'integer' ,
156- } ,
129+ const exportSchemaContent = browser . $ ( Selectors . ExportSchemaOutput ) ;
130+ await exportSchemaContent . waitForDisplayed ( ) ;
131+ const text = await browser . getCodemirrorEditorText (
132+ Selectors . ExportSchemaOutput
133+ ) ;
134+ const parsedText = JSON . parse ( text ) ;
135+ delete parsedText . $defs ;
136+ expect ( parsedText ) . to . deep . equal ( {
137+ $schema : 'https://json-schema.org/draft/2020-12/schema' ,
138+ type : 'object' ,
139+ required : [ '_id' , 'i' , 'j' ] ,
140+ properties : {
141+ _id : {
142+ $ref : '#/$defs/ObjectId' ,
143+ } ,
144+ i : {
145+ type : 'integer' ,
146+ } ,
147+ j : {
148+ type : 'integer' ,
157149 } ,
158- } ) ;
150+ } ,
159151 } ) ;
160152 } ) ;
161153
0 commit comments