-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4312] Add Cypress test on Details view when its input is deselected
Bug: #4312 Signed-off-by: Pierre-Charles David <[email protected]>
- Loading branch information
1 parent
9103e68
commit 1548784
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
integration-tests/cypress/e2e/project/details/details.cy.ts
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,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'); | ||
}); | ||
}); | ||
}); |