-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11503 e2e tests for process editor (#12976)
* add first test for process editor and logic to click inside bpmn * removing spinner and implementing drag on editor * refactoring logic * Almost working * implementing more on new test * writing more tests * adding tests for actions * Remove feature flag for endEvent in process and update url to docs * adding changed files * Completing test for CustomEndEvent * removing unused comments * fixing feedback from PR * removing css variable
- Loading branch information
Showing
16 changed files
with
991 additions
and
45 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
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
11 changes: 0 additions & 11 deletions
11
frontend/packages/process-editor/src/components/Canvas/BPMNEditor/BPMNEditor.module.css
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
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
20 changes: 1 addition & 19 deletions
20
frontend/packages/process-editor/src/components/Canvas/BPMNEditor/BPMNEditor.tsx
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 |
---|---|---|
@@ -1,28 +1,10 @@ | ||
import React from 'react'; | ||
import classes from './BPMNEditor.module.css'; | ||
import { useBpmnEditor } from '../../../hooks/useBpmnEditor'; | ||
|
||
import './BPMNEditor.css'; | ||
import { useBpmnApiContext } from '../../../contexts/BpmnApiContext'; | ||
import { StudioSpinner } from '@studio/components'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
export const BPMNEditor = (): React.ReactElement => { | ||
const { t } = useTranslation(); | ||
const { canvasRef } = useBpmnEditor(); | ||
const { pendingApiOperations } = useBpmnApiContext(); | ||
|
||
return ( | ||
<> | ||
{pendingApiOperations && ( | ||
<div className={classes.spinner}> | ||
<StudioSpinner spinnerTitle={t('process_editor.loading')} /> | ||
</div> | ||
)} | ||
<div | ||
className={pendingApiOperations ? classes.container : classes.editorContainer} | ||
ref={canvasRef} | ||
></div> | ||
</> | ||
); | ||
return <div className={classes.editorContainer} ref={canvasRef}></div>; | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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,20 @@ | ||
import type { Page } from '@playwright/test'; | ||
|
||
type SvgElement = 'svg' | 'g'; | ||
|
||
export class BpmnJSQuery { | ||
public readonly page: Page; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
} | ||
|
||
/** | ||
* Gets the BPMN element by its 'data-element-id' | ||
*/ | ||
public async getTaskByIdAndType(id: string, type: SvgElement): Promise<string> { | ||
const elementSelector = `${type}[data-element-id="${id}"]`; | ||
await this.page.waitForSelector(elementSelector); | ||
return elementSelector; | ||
} | ||
} |
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
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
Oops, something went wrong.