Skip to content

Commit 2089e22

Browse files
committed
[fix] Fix View customnode layout
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
1 parent 2af51de commit 2089e22

4 files changed

Lines changed: 23 additions & 15 deletions

File tree

frontend/syson-components/src/nodes/view_frame/SysMLViewFrameNode.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const sysMLViewFrameNodeStyle = (
3737
hovered: boolean,
3838
faded: boolean
3939
): React.CSSProperties => {
40-
const packageContainerStyle: React.CSSProperties = {
40+
const frameContainerStyle: React.CSSProperties = {
4141
display: 'flex',
4242
padding: '0px',
4343
width: '100%',
@@ -49,10 +49,10 @@ const sysMLViewFrameNodeStyle = (
4949
};
5050

5151
if (selected || hovered) {
52-
packageContainerStyle.outline = `${theme.palette.selected} solid 1px`;
52+
frameContainerStyle.outline = `${theme.palette.selected} solid 1px`;
5353
}
5454

55-
return packageContainerStyle;
55+
return frameContainerStyle;
5656
};
5757

5858
const viewFrameNameCompartmentStyle = (
@@ -63,8 +63,8 @@ const viewFrameNameCompartmentStyle = (
6363
return {
6464
display: 'flex',
6565
position: 'absolute',
66-
top: 0,
67-
left: 0,
66+
top: -1,
67+
left: -1,
6868
width: '70%',
6969
padding: '4px 8px',
7070
opacity: faded ? '0.4' : '',

integration-tests-cypress/cypress/e2e/project/explorer/semanticElementCreationTests.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -87,7 +87,7 @@ describe('Semantic Element Creation Tests', () => {
8787
);
8888
});
8989

90-
context('When we select the Libraries directory in the explorer', () => {
90+
context('When we select the Libraries directory in the explorer', { retries: 3 }, () => {
9191
it('Then we cannot create a new object in it', () => {
9292
const explorer = new Explorer();
9393
explorer.getTreeItemByLabel(sysmlv2.getLibrariesLabel()).first().find('button').click();

integration-tests-cypress/cypress/usecases/Batmobile.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -16,12 +16,16 @@ import { CreatedProjectData } from './Batmobile.types';
1616

1717
export class Batmobile {
1818
public createBatmobileProject(): Cypress.Chainable<CreatedProjectData> {
19-
return cy.createProject('Batmobile', 'batmobile-template').then((res) => {
19+
return cy.createProject('Batmobile', 'batmobile-template', []).then((res) => {
20+
if (!res?.body?.data?.createProject) {
21+
throw new Error(
22+
'The project Batmobile has not been created: createProject did not return an HTTP response payload'
23+
);
24+
}
2025
const payload = res.body.data.createProject;
2126
if (isCreateProjectSuccessPayload(payload)) {
2227
const projectId = payload.project.id;
23-
const data: CreatedProjectData = { projectId };
24-
return cy.wrap(data);
28+
return { projectId };
2529
} else {
2630
throw new Error(`The project Batmobile has not been created`);
2731
}

integration-tests-cypress/cypress/usecases/SysMLv2.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024, 2025 Obeo.
2+
* Copyright (c) 2024, 2026 Obeo.
33
* This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -16,12 +16,16 @@ import { CreatedProjectData } from './SysMLv2.types';
1616

1717
export class SysMLv2 {
1818
public createSysMLv2Project(): Cypress.Chainable<CreatedProjectData> {
19-
return cy.createProject('SysMLv2', 'sysmlv2-template').then((res) => {
19+
return cy.createProject('SysMLv2', 'sysmlv2-template', []).then((res) => {
20+
if (!res?.body?.data?.createProject) {
21+
throw new Error(
22+
'The project SysMLv2 has not been created: createProject did not return an HTTP response payload'
23+
);
24+
}
2025
const payload = res.body.data.createProject;
2126
if (isCreateProjectSuccessPayload(payload)) {
2227
const projectId = payload.project.id;
23-
const data: CreatedProjectData = { projectId };
24-
return cy.wrap(data);
28+
return { projectId };
2529
} else {
2630
throw new Error(`The project SysMLv2 has not been created`);
2731
}

0 commit comments

Comments
 (0)