Skip to content

Commit

Permalink
[2765] Add support for portal representation
Browse files Browse the repository at this point in the history
Bug: #2765
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
  • Loading branch information
pcdavid committed Jan 8, 2024
1 parent e89a294 commit 8a69bea
Show file tree
Hide file tree
Showing 121 changed files with 7,113 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const nodeTypeRegistry: NodeTypeRegistry = {
- https://github.com/eclipse-sirius/sirius-web/issues/1545[#1545] [core] The current selection can now be read and set from anywhere using the new `useSelection()` hook.
- https://github.com/eclipse-sirius/sirius-web/issues/2736[#2736] [gantt] Add a starter project for beans related to task meta-model.
- https://github.com/eclipse-sirius/sirius-web/issues/2819[#2819] [deck] Contribute the first version of the Deck representation.
- https://github.com/eclipse-sirius/sirius-web/issues/2765[#2765] [portal] Contribute the first version of the Portal representation.

=== Improvements

Expand Down
51 changes: 51 additions & 0 deletions integration-tests/cypress/e2e/project/portals/portals.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*******************************************************************************
* Copyright (c) 2024 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/

import { Project } from '../../../pages/Project';
import { Flow } from '../../../usecases/Flow';
import { Explorer } from '../../../workbench/Explorer';

const projectName = 'Cypress - portal';

describe('/projects/:projectId/edit - Portal', () => {
context('Given a flow project with a robot document', () => {
let projectId: string = '';
beforeEach(() =>
new Flow().createRobotProject(projectName).then((createdProjectData) => {
projectId = createdProjectData.projectId;
new Project().visit(projectId);
})
);

afterEach(() => cy.deleteProject(projectId));

context('When we create a new portal using the contextual menu', () => {
beforeEach(() => {
const explorer = new Explorer();
explorer.expand('robot');
explorer.getTreeItemByLabel('Robot').should('exist');
explorer.createRepresentation('Robot', 'Portal', 'Portal');
});

it('Then it reveals a newly created portal', () => {
const explorer = new Explorer();
explorer.getTreeItemByLabel('Central_Unit').should('exist');
explorer.getTreeItemByLabel('CaptureSubSystem').should('exist');
explorer.getTreeItemByLabel('Portal').should('exist');

explorer.getSelectedTreeItems().should('have.length', 1);
explorer.getSelectedTreeItems().contains('Portal').should('exist');
});
});
});
});
193 changes: 193 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023 Obeo.
* Copyright (c) 2023, 2024 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -127,7 +127,7 @@ export const DiagramRepresentation = ({ editingContextId, representationId }: Re
}, [diagramDescriptionLoading, diagramDescriptionData, diagramDescriptionError]);

const onComplete = () => {
setState((prevState) => ({ ...prevState, diagram: null, complete: true }));
setState((prevState) => ({ ...prevState, diagramRefreshedEventPayload: null, complete: true }));
};

const { graphQLNodeStyleFragments } = useContext<NodeTypeContextValue>(NodeTypeContext);
Expand Down
3 changes: 2 additions & 1 deletion packages/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Obeo.
Copyright (c) 2022, 2024 Obeo.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -53,6 +53,7 @@
<module>selection/backend</module>
<module>trees/backend</module>
<module>validation/backend</module>
<module>portals/backend</module>
<module>compatibility/backend</module>
<module>domain/backend</module>
<module>view/backend</module>
Expand Down
Loading

0 comments on commit 8a69bea

Please sign in to comment.