{"version":3,"file":"VDialog.spec.cy.mjs","names":["VDialog","ref","describe","it","model","cy","mount","_createVNode","value","$event","default","_createTextVNode","get","should","then","click","expect","to","be","false","onAfterLeave","spy","as"],"sources":["../../../../src/components/VDialog/__test__/VDialog.spec.cy.tsx"],"sourcesContent":["/// <reference types=\"../../../../types/cypress\" />\n\n// Components\nimport { VDialog } from '..'\n\n// Utilities\nimport { ref } from 'vue'\n\n// Tests\ndescribe('VDialog', () => {\n  it('should render correctly', () => {\n    const model = ref(false)\n    cy.mount(() => (\n      <VDialog v-model={ model.value } data-test=\"dialog\">\n        <div data-test=\"content\">Content</div>\n      </VDialog>\n    )).get('[data-test=\"dialog\"]').should('not.exist')\n      .then(() => { model.value = true })\n      .get('[data-test=\"dialog\"]').should('be.visible')\n      .get('[data-test=\"content\"]').should('be.visible')\n      .get('body').click()\n      .then(() => {\n        expect(model.value).to.be.false\n      })\n      .get('[data-test=\"dialog\"]').should('not.exist')\n      .get('[data-test=\"content\"]').should('not.exist')\n  })\n\n  it('should emit afterLeave', () => {\n    const model = ref(true)\n    const onAfterLeave = cy.spy().as('afterLeave')\n    cy.mount(() => (\n      <VDialog v-model={ model.value } onAfterLeave={ onAfterLeave }>\n        <div data-test=\"content\">Content</div>\n      </VDialog>\n    )).get('body').click()\n      .get('@afterLeave').should('have.been.calledOnce')\n  })\n})\n"],"mappings":";AAAA;AAEA;AAAA,SACSA,OAAO,wBAEhB;AACA,SAASC,GAAG,QAAQ,KAAK;;AAEzB;AACAC,QAAQ,CAAC,SAAS,EAAE,MAAM;EACxBC,EAAE,CAAC,yBAAyB,EAAE,MAAM;IAClC,MAAMC,KAAK,GAAGH,GAAG,CAAC,KAAK,CAAC;IACxBI,EAAE,CAACC,KAAK,CAAC,MAAAC,YAAA,CAAAP,OAAA;MAAA,cACYI,KAAK,CAACI,KAAK;MAAA,uBAAAC,MAAA,IAAXL,KAAK,CAACI,KAAK,GAAAC,MAAA;MAAA;IAAA;MAAAC,OAAA,EAAAA,CAA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