kind-artist-70775
05/20/2022, 8:40 PMvite-plugin-md
plugin which uses Vite to transform the MD files to components so it is in fact the directory where my "components" reside. I did move test files into the fixtures directory to see if I could get this to work but it didn't recognize it there either.wonderful-match-15836
05/20/2022, 8:41 PMcomponentFolder
should point to where your specs are, not where your components themselves livekind-artist-70775
05/20/2022, 8:42 PMsrc
for this config itemwonderful-match-15836
05/20/2022, 8:43 PMkind-artist-70775
05/20/2022, 8:43 PMkind-artist-70775
05/20/2022, 8:44 PMcomponentFolder
prop sits at the root of cypress.json
or is nested into a component
prop? I've seen bothkind-artist-70775
05/20/2022, 8:44 PMkind-artist-70775
05/20/2022, 8:45 PM/test/integration/my-test.test.ts
kind-artist-70775
05/20/2022, 8:46 PMkind-artist-70775
05/20/2022, 8:46 PMwonderful-match-15836
05/20/2022, 8:47 PMcomponent
works from what I can see. The main thing is, the componentFolder
will be the root that your testFiles
pattern applies in. "**/test/integration/**/*.test.{ts,jsx,tsx}"
looks like it will work fine if you just don't specify a componentFolder
at allwonderful-match-15836
05/20/2022, 8:48 PMkind-artist-70775
05/20/2022, 8:48 PMkind-artist-70775
05/20/2022, 8:49 PMkind-artist-70775
05/20/2022, 8:49 PMkind-artist-70775
05/20/2022, 8:50 PMkind-artist-70775
05/20/2022, 8:50 PMkind-artist-70775
05/20/2022, 8:51 PMwonderful-match-15836
05/20/2022, 8:51 PMopen
mode, not open-ct
your component specs matched your top-level testFiles pattern, and since the top-level testFiles pattern and the integrationFolder you configured don't conflict (no reference to /fixtures), it was able to match... but since those are component specs, not actual e2e specs, trying to open them without starting with open-ct
would not work, even though the files matchkind-artist-70775
05/20/2022, 8:51 PMjson
{
"downloadsFolder": "test/integration/downloads",
"fixturesFolder": "test/fixtures",
"commandsFolder": "test/integration/support",
"videosFolder": "test/integration/videos",
// "integrationFolder": "test/integration",
"screenshotsFolder": "test/integration/screenshots",
"testFiles": "test/integration/**/*.test.ts",
"pluginsFile": "test/integration/plugins/index.ts",
// "component": {
// "testFiles": "test/integration/**/*.[spec|test].ts",
// "componentFolder": "test/integration"
// },
"componentFolder": "test/integration",
"supportFile": "test/integration/support",
}
kind-artist-70775
05/20/2022, 8:51 PMwonderful-match-15836
05/20/2022, 8:53 PMcomponent: {
testFiles: {your pattern}
}
and probably you don't need to specify compoentFolder
anywherewonderful-match-15836
05/20/2022, 8:53 PMtest/integration/
kind-artist-70775
05/20/2022, 8:54 PMwonderful-match-15836
05/20/2022, 8:55 PMtest/integration/
from the testFiles
patternwonderful-match-15836
05/20/2022, 8:56 PMcomponentFolder
you specifykind-artist-70775
05/20/2022, 8:56 PMkind-artist-70775
05/20/2022, 8:56 PMkind-artist-70775
05/20/2022, 8:56 PMwonderful-match-15836
05/20/2022, 8:56 PMtestFiles
value?kind-artist-70775
05/20/2022, 8:57 PMwonderful-match-15836
05/20/2022, 8:57 PMtest/integration/
from the testFiles pattern, the rest should staykind-artist-70775
05/20/2022, 8:58 PMkind-artist-70775
05/20/2022, 8:58 PMwonderful-match-15836
05/20/2022, 8:58 PMtest/integration/test/integration
kind-artist-70775
05/20/2022, 8:58 PMwonderful-match-15836
05/20/2022, 8:59 PMkind-artist-70775
05/20/2022, 8:59 PMts
describe('loading a page with tabular format correctly presents', () => {
it('load a markdown file with a code block', () => {
const c = mount(TsCodeBlock)
c.pause()
})
})
kind-artist-70775
05/20/2022, 8:59 PMkind-artist-70775
05/20/2022, 8:59 PMkind-artist-70775
05/20/2022, 9:00 PMwonderful-match-15836
05/20/2022, 9:00 PMpause
method? Or did you mean cy.pause()
?kind-artist-70775
05/20/2022, 9:01 PMkind-artist-70775
05/20/2022, 9:01 PMkind-artist-70775
05/20/2022, 9:02 PMts
import { mount } from '@cypress/vue'
import TsCodeBlock from '../../fixtures/ts-code-block.md'
describe('loading a page with tabular format correctly presents', () => {
it('load a markdown file with a code block', () => {
const c = mount(TsCodeBlock)
cy.pause()
})
})
kind-artist-70775
05/20/2022, 9:02 PMkind-artist-70775
05/20/2022, 9:03 PMwonderful-match-15836
05/20/2022, 9:03 PMkind-artist-70775
05/20/2022, 9:03 PMdeclare interface Window {
// extend the window
}
// with vite-plugin-md, markdowns can be treat as Vue components
declare module '*.md' {
import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
declare module '*.vue' {
import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
that allows the import of the MD file and then I transform that to an SFC syntaxkind-artist-70775
05/20/2022, 9:04 PMwonderful-match-15836
05/20/2022, 9:04 PMkind-artist-70775
05/20/2022, 9:05 PMkind-artist-70775
05/20/2022, 9:05 PMkind-artist-70775
05/20/2022, 9:06 PMkind-artist-70775
05/20/2022, 9:06 PMkind-artist-70775
05/20/2022, 9:07 PMwonderful-match-15836
05/20/2022, 9:07 PMkind-artist-70775
05/20/2022, 9:08 PMkind-artist-70775
05/20/2022, 9:08 PMkind-artist-70775
05/20/2022, 9:09 PMkind-artist-70775
05/20/2022, 9:09 PMkind-artist-70775
05/20/2022, 9:09 PMkind-artist-70775
05/20/2022, 9:10 PMkind-artist-70775
05/20/2022, 9:12 PMkind-artist-70775
05/20/2022, 9:12 PMwonderful-match-15836
05/20/2022, 9:14 PMkind-artist-70775
05/20/2022, 9:14 PMkind-artist-70775
05/20/2022, 9:14 PMkind-artist-70775
05/20/2022, 9:14 PMkind-artist-70775
05/20/2022, 9:14 PMwonderful-match-15836
05/20/2022, 9:15 PMwonderful-match-15836
05/20/2022, 9:15 PMkind-artist-70775
05/20/2022, 9:15 PMkind-artist-70775
05/20/2022, 9:15 PMkind-artist-70775
05/20/2022, 9:16 PMkind-artist-70775
05/20/2022, 9:16 PMkind-artist-70775
05/20/2022, 9:16 PMkind-artist-70775
05/20/2022, 9:16 PMkind-artist-70775
05/20/2022, 9:18 PMwonderful-match-15836
05/20/2022, 9:19 PMwonderful-match-15836
05/20/2022, 9:19 PMkind-artist-70775
05/20/2022, 9:19 PMkind-artist-70775
05/20/2022, 9:20 PMkind-artist-70775
05/20/2022, 9:22 PMts
import { mount } from '@cypress/vue'
import TsCodeBlock from '../../fixtures/ts-code-block.md'
describe('loading a page with tabular format correctly presents', () => {
it('load a markdown file with a code block', () => {
mount(TsCodeBlock)
cy.get('h1').contains('foobar')
})
})
kind-artist-70775
05/20/2022, 9:22 PMkind-artist-70775
05/20/2022, 9:24 PMkind-artist-70775
05/20/2022, 9:24 PMwonderful-match-15836
05/20/2022, 9:25 PMkind-artist-70775
05/20/2022, 9:26 PMts
// import { mount } from '@cypress/vue'
// import TsCodeBlock from '../../fixtures/ts-code-block.md'
describe('loading a page with tabular format correctly presents', () => {
it('load a markdown file with a code block', () => {
// mount(TsCodeBlock)
// cy.get('h1').contains('foobar')
})
})
kind-artist-70775
05/20/2022, 9:26 PMkind-artist-70775
05/20/2022, 9:27 PMts
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import Pages from 'vite-plugin-pages'
import Layouts from 'vite-plugin-vue-layouts'
import Vue from '@vitejs/plugin-vue'
import CT from 'cypress-types'
import Markdown, { code, link, meta } from './src/index'
// used for testing, library code uses TSUP to build exports
export default defineConfig(() => ({
test: {
dir: 'test',
},
plugins: [
Pages({
extensions: ['vue', 'md'],
}),
Layouts(),
Markdown({ builders: [link(), meta(), code({ theme: 'base' })] }),
Vue({
include: [/\.vue$/, /\.md$/],
reactivityTransform: true,
}),
// CT(Cypress),
],
}))
wonderful-match-15836
05/20/2022, 9:27 PMkind-artist-70775
05/20/2022, 9:27 PMkind-artist-70775
05/20/2022, 9:27 PMkind-artist-70775
05/20/2022, 9:28 PMkind-artist-70775
05/20/2022, 9:29 PMkind-artist-70775
05/20/2022, 9:29 PMkind-artist-70775
05/20/2022, 9:29 PMwonderful-match-15836
05/20/2022, 9:30 PMwonderful-match-15836
05/20/2022, 9:31 PMkind-artist-70775
05/20/2022, 9:32 PMwonderful-match-15836
05/20/2022, 9:32 PMkind-artist-70775
05/20/2022, 9:32 PMkind-artist-70775
05/20/2022, 9:32 PMkind-artist-70775
05/20/2022, 9:33 PMkind-artist-70775
05/20/2022, 9:33 PMkind-artist-70775
05/20/2022, 9:34 PMkind-artist-70775
05/20/2022, 9:35 PMkind-artist-70775
05/20/2022, 9:35 PMwonderful-match-15836
05/20/2022, 9:37 PMkind-artist-70775
05/20/2022, 9:37 PMkind-artist-70775
05/20/2022, 9:40 PMkind-artist-70775
05/20/2022, 9:41 PMkind-artist-70775
05/20/2022, 9:42 PMkind-artist-70775
05/20/2022, 9:42 PMkind-artist-70775
05/20/2022, 9:42 PMkind-artist-70775
05/20/2022, 9:47 PMkind-artist-70775
05/20/2022, 9:48 PM<script setup>
components which I had been turned on. I turned it off and now it loads.kind-artist-70775
05/20/2022, 9:49 PMkind-artist-70775
05/20/2022, 10:38 PMkind-artist-70775
05/20/2022, 10:40 PMkind-artist-70775
05/20/2022, 10:40 PM.mjs
extensionkind-artist-70775
05/20/2022, 11:20 PMkind-artist-70775
05/20/2022, 11:20 PMkind-artist-70775
05/20/2022, 11:21 PMkind-artist-70775
05/20/2022, 11:21 PM