mirror of
https://github.com/projectstorm/react-diagrams.git
synced 2025-08-14 16:51:29 +08:00
fix demos
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
import { Toolkit } from "@projectstorm/react-canvas-core";
|
||||
Toolkit.TESTING = true;
|
||||
|
||||
export default {
|
||||
title: 'Simple Usage'
|
||||
};
|
||||
|
||||
import demo_simple from "./demo-simple";
|
||||
import demo_flow from "./demo-simple-flow";
|
||||
import demo_performance from "./demo-performance";
|
||||
@ -10,10 +17,6 @@ import demo_canvas_drag from "./demo-canvas-drag";
|
||||
import demo_dynamic_ports from "./demo-dynamic-ports";
|
||||
import demo_labels from "./demo-labelled-links";
|
||||
|
||||
export default {
|
||||
title: 'Simple Usage'
|
||||
};
|
||||
|
||||
export const DemoSimple = demo_simple;
|
||||
export const SimpleFlowExample = demo_flow;
|
||||
export const PerformanceDemo = demo_performance
|
||||
|
@ -1,3 +1,6 @@
|
||||
import { Toolkit } from "@projectstorm/react-canvas-core";
|
||||
Toolkit.TESTING = true;
|
||||
|
||||
export default {
|
||||
title: 'Advanced Usage'
|
||||
};
|
||||
|
@ -1,3 +1,6 @@
|
||||
import { Toolkit } from "@projectstorm/react-canvas-core";
|
||||
Toolkit.TESTING = true;
|
||||
|
||||
export default {
|
||||
title: 'Customization'
|
||||
};
|
||||
|
@ -1,3 +1,6 @@
|
||||
import { Toolkit } from "@projectstorm/react-canvas-core";
|
||||
Toolkit.TESTING = true;
|
||||
|
||||
export default {
|
||||
title: 'External Libs'
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ElementHandle, FrameBase } from 'puppeteer';
|
||||
import { ElementHandle } from 'puppeteer';
|
||||
|
||||
export abstract class E2EBase {
|
||||
name: string;
|
||||
@ -7,8 +7,8 @@ export abstract class E2EBase {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
async getSelector(): Promise<FrameBase> {
|
||||
return page as FrameBase;
|
||||
async getSelector(): Promise<any> {
|
||||
return page;
|
||||
}
|
||||
|
||||
async getElement(): Promise<ElementHandle> {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as _ from 'lodash';
|
||||
import { FrameBase } from 'puppeteer';
|
||||
import { E2EBase } from './E2EBase';
|
||||
import { E2ENode } from './E2ENode';
|
||||
import { E2ELink } from './E2ELink';
|
||||
@ -73,7 +72,7 @@ export class E2EPort extends E2EBase {
|
||||
return new E2ELink(link);
|
||||
}
|
||||
|
||||
async getSelector(): Promise<FrameBase> {
|
||||
async getSelector(): Promise<any> {
|
||||
return (await this.parent.getElement()) as any;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { E2ENode } from './helpers/E2ENode';
|
||||
|
||||
describe('simple test', () => {
|
||||
beforeAll(async () => {
|
||||
await page.goto(`file://${__dirname}/../.out/iframe.html?path=/story/simple-usage--simple-example`);
|
||||
await page.goto(`file://${__dirname}/../.out/iframe.html?path=/story/simple-usage--demo-simple`);
|
||||
});
|
||||
|
||||
it('should delete a link and create a new one', async () => {
|
||||
|
@ -31,6 +31,7 @@
|
||||
"publish:prod": "yarn build:prod && lerna publish --force-publish",
|
||||
"publish:storybook": "cd packages/diagrams-demo-gallery && yarn storybook:build && ../../node_modules/.bin/storybook-to-ghpages --existing-output-dir .out",
|
||||
"test:ci": "lerna run test --stream -- --runInBand --ci ",
|
||||
"test": "lerna run test --stream",
|
||||
"pretty": "prettier --write \"packages/**/*.{ts,tsx,scss,js,jsx}\""
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -12,7 +12,7 @@
|
||||
"build": "../../node_modules/.bin/webpack",
|
||||
"build:es": "../../node_modules/.bin/tsc",
|
||||
"build:prod": "NODE_ENV=production ../../node_modules/.bin/webpack && NODE_ENV=production ../../node_modules/.bin/tsc",
|
||||
"test": "../../node_modules/.bin/jest --no-cache"
|
||||
"test": "../../node_modules/.bin/jest"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
Reference in New Issue
Block a user