collab/mermaid/cypress/integration/rendering/appli.spec.jsblame
View source
6dd74de1import { imgSnapshotTest } from '../../helpers/util.ts';
6dd74de2
6dd74de3describe('Git Graph diagram', () => {
6dd74de4 it('1: should render a simple gitgraph with commit on main branch', () => {
6dd74de5 imgSnapshotTest(
6dd74de6 `gitGraph
6dd74de7 commit id: "1"
6dd74de8 commit id: "2"
6dd74de9 commit id: "3"
6dd74de10 `,
6dd74de11 {}
6dd74de12 );
6dd74de13 });
6dd74de14 it('Should render subgraphs with title margins and edge labels', () => {
6dd74de15 imgSnapshotTest(
6dd74de16 `flowchart LR
6dd74de17
6dd74de18 subgraph TOP
6dd74de19 direction TB
6dd74de20 subgraph B1
6dd74de21 direction RL
6dd74de22 i1 --lb1-->f1
6dd74de23 end
6dd74de24 subgraph B2
6dd74de25 direction BT
6dd74de26 i2 --lb2-->f2
6dd74de27 end
6dd74de28 end
6dd74de29 A --lb3--> TOP --lb4--> B
6dd74de30 B1 --lb5--> B2
6dd74de31 `,
6dd74de32 { flowchart: { subGraphTitleMargin: { top: 10, bottom: 5 } } }
6dd74de33 );
6dd74de34 });
6dd74de35 // it(`ultraFastTest`, function () {
6dd74de36 // // Navigate to the url we want to test
6dd74de37 // // ⭐️ Note to see visual bugs, run the test using the above URL for the 1st run.
6dd74de38 // // but then change the above URL to https://demo.applitools.com/index_v2.html
6dd74de39 // // (for the 2nd run)
6dd74de40 // cy.visit('https://demo.applitools.com');
6dd74de41
6dd74de42 // // Call Open on eyes to initialize a test session
6dd74de43 // cy.eyesOpen({
6dd74de44 // appName: 'Demo App',
6dd74de45 // testName: 'UltraFast grid demo',
6dd74de46 // });
6dd74de47
6dd74de48 // // check the login page with fluent api, see more info here
6dd74de49 // // https://applitools.com/docs/topics/sdk/the-eyes-sdk-check-fluent-api.html
6dd74de50 // cy.eyesCheckWindow({
6dd74de51 // tag: 'Login Window',
6dd74de52 // target: 'window',
6dd74de53 // fully: true,
6dd74de54 // });
6dd74de55
6dd74de56 // cy.get('#log-in').click();
6dd74de57
6dd74de58 // // Check the app page
6dd74de59 // cy.eyesCheckWindow({
6dd74de60 // tag: 'App Window',
6dd74de61 // target: 'window',
6dd74de62 // fully: true,
6dd74de63 // });
6dd74de64
6dd74de65 // // Call Close on eyes to let the server know it should display the results
6dd74de66 // cy.eyesClose();
6dd74de67 // });
6dd74de68 // it('works', () => {
6dd74de69 // cy.visit('https://applitools.com/helloworld');
6dd74de70 // cy.eyesOpen({
6dd74de71 // appName: 'Hello World!',
6dd74de72 // testName: 'My first JavaScript test!',
6dd74de73 // browser: { width: 800, height: 600 },
6dd74de74 // });
6dd74de75 // cy.eyesCheckWindow('Main Page');
6dd74de76 // cy.get('button').click();
6dd74de77 // cy.eyesCheckWindow('Click!');
6dd74de78 // cy.eyesClose();
6dd74de79 // });
6dd74de80});