| 1 | import { imgSnapshotTest } from '../../helpers/util.ts'; |
| 2 | |
| 3 | describe('Git Graph diagram', () => { |
| 4 | it('1: should render a simple gitgraph with commit on main branch', () => { |
| 5 | imgSnapshotTest( |
| 6 | `gitGraph |
| 7 | commit id: "1" |
| 8 | commit id: "2" |
| 9 | commit id: "3" |
| 10 | `, |
| 11 | {} |
| 12 | ); |
| 13 | }); |
| 14 | it('Should render subgraphs with title margins and edge labels', () => { |
| 15 | imgSnapshotTest( |
| 16 | `flowchart LR |
| 17 | |
| 18 | subgraph TOP |
| 19 | direction TB |
| 20 | subgraph B1 |
| 21 | direction RL |
| 22 | i1 --lb1-->f1 |
| 23 | end |
| 24 | subgraph B2 |
| 25 | direction BT |
| 26 | i2 --lb2-->f2 |
| 27 | end |
| 28 | end |
| 29 | A --lb3--> TOP --lb4--> B |
| 30 | B1 --lb5--> B2 |
| 31 | `, |
| 32 | { flowchart: { subGraphTitleMargin: { top: 10, bottom: 5 } } } |
| 33 | ); |
| 34 | }); |
| 35 | // it(`ultraFastTest`, function () { |
| 36 | // // Navigate to the url we want to test |
| 37 | // // ⭐️ Note to see visual bugs, run the test using the above URL for the 1st run. |
| 38 | // // but then change the above URL to https://demo.applitools.com/index_v2.html |
| 39 | // // (for the 2nd run) |
| 40 | // cy.visit('https://demo.applitools.com'); |
| 41 | |
| 42 | // // Call Open on eyes to initialize a test session |
| 43 | // cy.eyesOpen({ |
| 44 | // appName: 'Demo App', |
| 45 | // testName: 'UltraFast grid demo', |
| 46 | // }); |
| 47 | |
| 48 | // // check the login page with fluent api, see more info here |
| 49 | // // https://applitools.com/docs/topics/sdk/the-eyes-sdk-check-fluent-api.html |
| 50 | // cy.eyesCheckWindow({ |
| 51 | // tag: 'Login Window', |
| 52 | // target: 'window', |
| 53 | // fully: true, |
| 54 | // }); |
| 55 | |
| 56 | // cy.get('#log-in').click(); |
| 57 | |
| 58 | // // Check the app page |
| 59 | // cy.eyesCheckWindow({ |
| 60 | // tag: 'App Window', |
| 61 | // target: 'window', |
| 62 | // fully: true, |
| 63 | // }); |
| 64 | |
| 65 | // // Call Close on eyes to let the server know it should display the results |
| 66 | // cy.eyesClose(); |
| 67 | // }); |
| 68 | // it('works', () => { |
| 69 | // cy.visit('https://applitools.com/helloworld'); |
| 70 | // cy.eyesOpen({ |
| 71 | // appName: 'Hello World!', |
| 72 | // testName: 'My first JavaScript test!', |
| 73 | // browser: { width: 800, height: 600 }, |
| 74 | // }); |
| 75 | // cy.eyesCheckWindow('Main Page'); |
| 76 | // cy.get('button').click(); |
| 77 | // cy.eyesCheckWindow('Click!'); |
| 78 | // cy.eyesClose(); |
| 79 | // }); |
| 80 | }); |
| 81 | |