Skip to content

Commit

Permalink
[4312] Add Cypress test on Details view when its input is deselected
Browse files Browse the repository at this point in the history
Bug: #4312
Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid authored and sbegaudeau committed Dec 18, 2024
1 parent 9103e68 commit 1548784
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions integration-tests/cypress/e2e/project/details/details.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*******************************************************************************
* 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 { Details } from '../../../workbench/Details';
import { Explorer } from '../../../workbench/Explorer';

describe('Details', () => {
context('Given a flow project', () => {
let flowProjectId: string = '';

before(() =>
new Flow().createFlowProject().then((createdProjectData) => {
flowProjectId = createdProjectData.projectId;
new Project().visit(flowProjectId);
})
);
after(() => cy.deleteProject(flowProjectId));

it('no details are shown when everything is deselected', () => {
const explorer = new Explorer();
explorer.expandWithDoubleClick('Flow');
explorer.expandWithDoubleClick('NewSystem');
explorer.expandWithDoubleClick('CompositeProcessor1');
explorer.select('CompositeProcessor1');
const details = new Details();
details.getTextField('Name').should('exist');
// Deselect
explorer.select('CompositeProcessor1', true);
details.getTextField('Name').should('not.exist');
details.getDetailsView().find('h6').should('have.text', 'No object selected');
});
});
});

0 comments on commit 1548784

Please sign in to comment.