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
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const COMMENTS = [ | |
["🙌 praise", "Praises highlight something positive. Try to leave at least one of these comments per review. Do not leave false praise (which can actually be damaging). Do look for something to sincerely praise."], | |
["🧐 nitpick", "Nitpicks are trivial preference-based requests. These should be non-blocking by nature."], | |
["🚀 suggestion", "Suggestions propose improvements to the current subject. It's important to be explicit and clear on what is being suggested and why it is an improvement. Consider using patches and the blocking or non-blocking decorations to further communicate your intent."], | |
["🛠️ issue", "Issues highlight specific problems with the subject under review. These problems can be user-facing or behind the scenes. It is strongly recommended to pair this comment with a suggestion. If you are not sure if a problem exists or not, consider leaving a question."], | |
["📌 todo", |
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
# Install and load packages | |
> install.packages("shiny") | |
> library(shiny) | |
> devtools::install_github("process-analytics/bpmn-visualization-R") | |
> library(bpmnVisualization) | |
> displayBpmn <- function() { | |
bpmn_file <- system.file("examples/Travel_Booking.bpmn", package = "bpmnVisualization") | |
overlays <- list(bpmnVisualization::create_overlay("_6–203", "9")) | |
bpmnVisualization::display(bpmn_file, overlays) | |
} |
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
> overlays <- list(bpmnVisualization::create_overlay("bpmn_element_id_1", "42"), bpmnVisualization::create_overlay("bpmn_element_id_2", "9")) | |
> bpmnVisualization::display(bpmn_file, overlays) |
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
> bpmnVisualization::display(bpmn_file) |
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
> bpmn_file <- system.file("examples/Email_Voting.bpmn", package = "bpmnVisualization") |
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
> devtools::install_github("process-analytics/bpmn-visualization-R") | |
> library(bpmnVisualization) |
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
import { getConfig } from './helpers/image-snapshot-config'; | |
function async gotoPageWithBPMNContainer(margin: number): Promise<ElementHandle<Element>> { | |
// Redirect the current page in the browser to a new url with Playwright | |
const response = await page.goto('http://localhost:10002/rendering-diagram.html?bpmn=./gateways.bpmn&fitMargin=${margin}'); | |
// Be sure the page is displayed correctly with Playwright & Jest | |
expect(response.status()).toBe(200); | |
await expect(page.title()).resolves.toMatch('BPMN Visualization - Diagram Rendering' ); | |
return await page.waitForSelector('#bpmn-container', { timeout: 5_000 }); |
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
// jest-image-snapshot custom configuration | |
export function getConfig (customSnapshotIdentifier: string, customDiffDir: string) { | |
return { | |
// …, | |
customSnapshotIdentifier, | |
customDiffDir | |
}; | |
} | |
// … |
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
import { gotoPageWithBPMNContainer, getConfig } from './helpers/image-snapshot-config'; | |
it(`no BPMN Gateway visual regression`, async () => { | |
await gotoPageWithBPMNContainer(); | |
// Take the screenshot of the page with Playwright | |
const image = await page.screenshot({ fullPage: true }); | |
// Compare the taken screenshot with the baseline screenshot (if exists), or create it (else) | |
const config = getConfig('__image_snapshots__/bpmn'); |
NewerOlder