Skip to content

Cypress flow #330

Answered by bcakmakoglu
zdendai asked this question in Q&A
Oct 13, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The way I do it is like this:

cy.mount(VueFlow, {
    props: {
      id: 'test',
      fitViewOnInit: true,
      ...props,
    },
    attrs: {
      key: 'flowy',
      style: {
        height: '100vh',
        width: '100vw',
      },
      ...attrs,
    },
})
describe('Viewpane test', () => {
	// mounts vue flow component fresh on each test
	beforeEach(() => {
		// cy.vueFlow is a custom command
    	cy.vueFlow({
     		nodes,
    	})
  })

  it('drag pane', () => {
	// wait for window obj
    cy.window().then((win) => {
      cy.get('.vue-flow__pane')
		// use force and pass win as view to event
        .trigger('mousedown', 'center', { force: true, view: win })
        .trigger('mous…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zdendai
Comment options

Answer selected by bcakmakoglu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants