File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
packages/compass-e2e-tests Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1444,6 +1444,8 @@ export const CreateDataModelCollectionCheckbox = (
14441444) : string =>
14451445 `${ CreateDataModelModal } [data-testid="new-diagram-collection-checkbox-${ collectionName } "]` ;
14461446export const DataModelEditor = '[data-testid="diagram-editor-container"]' ;
1447+ export const DataModelZoomOutButton = `${ DataModelEditor } [aria-label="Minus Icon"]` ;
1448+ export const DataModelZoomInButton = `${ DataModelEditor } [aria-label="Plus Icon"]` ;
14471449export const DataModelPreview = `${ DataModelEditor } [data-testid="model-preview"]` ;
14481450export const DataModelPreviewCollection = ( collectionId : string ) =>
14491451 `${ DataModelPreview } [data-nodeid="${ collectionId } "]` ;
@@ -1484,6 +1486,8 @@ export const DataModelRelationshipForeignFieldSelect =
14841486 '//label[text()="Foreign field"]' ;
14851487export const DataModelRelationshipForeignCardinalitySelect =
14861488 '//label[text()="Foreign cardinality"]' ;
1489+ export const DataModelRelationshipCardinalityOption = ( value : string ) =>
1490+ `[role="option"][value="${ value } "]` ;
14871491export const DataModelCollectionRelationshipItem = ( relationshipId : string ) =>
14881492 `li[data-relationship-id="${ relationshipId } "]` ;
14891493export const DataModelCollectionRelationshipItemEdit = `[aria-label="Edit relationship"]` ;
Original file line number Diff line number Diff line change @@ -572,6 +572,12 @@ describe('Data Modeling tab', function () {
572572 } ) ;
573573 const relationshipId = edges [ 0 ] . id ;
574574
575+ // Zooming out so that the collections are more accessible
576+ // (they can be covered by the drawer or the minimap)
577+ await browser . clickVisible ( Selectors . DataModelZoomOutButton ) ;
578+ await browser . clickVisible ( Selectors . DataModelZoomOutButton ) ;
579+ await browser . clickVisible ( Selectors . DataModelZoomOutButton ) ;
580+
575581 // Select the other collection and see that the new relationship is listed
576582 await selectCollectionOnTheDiagram ( browser , 'test.testCollection-two' ) ;
577583 const collection2Name = await browser . getInputByLabel (
@@ -599,7 +605,7 @@ describe('Data Modeling tab', function () {
599605 selectSelector : await browser . getInputByLabel (
600606 drawer . $ ( Selectors . DataModelRelationshipForeignCardinalitySelect )
601607 ) ,
602- optionSelector : `[role="option"][value=" 100"]` ,
608+ optionSelector : Selectors . DataModelRelationshipCardinalityOption ( ' 100' ) ,
603609 } ) ;
604610
605611 // See the updated relationship on the diagram
You can’t perform that action at this time.
0 commit comments