Skip to content

Commit c6bc709

Browse files
committed
fix spaces issue
1 parent aab9aca commit c6bc709

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/compass-e2e-tests/tests/data-modeling-tab.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ describe('Data Modeling tab', function () {
153153
// react flow uses its own coordinate system,
154154
// so we get the node element location for the pointer action
155155
const testCollection1 = browser.$(
156-
Selectors.DataModelPreviewCollection('test.testCollection1')
156+
Selectors.DataModelPreviewCollection('test.testCollection-one')
157157
);
158158
const startPosition = await testCollection1.getLocation();
159159
const nodeSize = await testCollection1.getSize();
@@ -311,15 +311,19 @@ describe('Data Modeling tab', function () {
311311
cachePath: tmpdir,
312312
});
313313

314-
expect(data.text).to.include('test.testCollection-one');
315-
expect(data.text).to.include('test.testCollection-two');
314+
// Remove all the extra spaces to make it easier to assert
315+
// that the text contains the expected values.
316+
const text = data.text.replace(/\s+/g, '');
316317

317-
expect(data.text).to.include('_id objectId');
318-
expect(data.text).to.include('i int');
319-
expect(data.text).to.include('j int');
318+
expect(text).to.include('test.testCollection-one');
319+
expect(text).to.include('test.testCollection-two');
320+
321+
expect(text).to.include('_idobjectId');
322+
expect(text).to.include('iint');
323+
expect(text).to.include('jint');
320324
// it does not correctly recognize `iString` and only returns `String`.
321325
// its already good enough to verify this for now and if it flakes
322326
// more, we may need to revisit this test.
323-
expect(data.text).to.include('String string');
327+
expect(text).to.include('Stringstring');
324328
});
325329
});

0 commit comments

Comments
 (0)