Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2133] Fix NPE in Related Elements view
Since #2032, `self` is a single element, not a list. Bug: #2133 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr> Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
- Loading branch information
1 parent
587d2e3
commit 6027063
Showing
3 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
integration-tests/cypress/e2e/project/edit/related-elements-view.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the erms 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 | ||
*******************************************************************************/ | ||
|
||
/** | ||
* This test suite will be used to validate the proper lifecycle of our application. | ||
* | ||
* For that, we will open and close in various ways several representations and we will evaluate if we have | ||
* the proper number of representations and if they behave properly. | ||
*/ | ||
describe('/projects/:projectId/edit - Related ELements View', () => { | ||
beforeEach(() => { | ||
cy.deleteAllProjects(); | ||
cy.createProject('Cypress Project').then((res) => { | ||
const projectId = res.body.data.createProject.project.id; | ||
cy.wrap(projectId).as('projectId'); | ||
const robot_flow_id = 'c26b6086-b444-3ee6-b8cd-9a4fde5956a7'; | ||
|
||
cy.createDocument(projectId, robot_flow_id, 'robot').then(() => { | ||
cy.visit(`/projects/${projectId}/edit`); | ||
}); | ||
}); | ||
}); | ||
|
||
it('can open the related elements view', function () { | ||
cy.getByTestId('robot').dblclick(); | ||
cy.getByTestId('Robot').dblclick(); | ||
cy.getByTestId('viewselector-Related Elements').click(); | ||
cy.getByTestId('view-Related Elements').within(() => { | ||
cy.getByTestId('form').should('exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters