https://cypress.io logo
Join Discord
Powered by
# help
  • b

    bulky-sundown-74498

    04/21/2021, 10:12 PM
    https://docs.cypress.io/guides/references/configuration#Runner-Specific-Overrides
  • f

    future-gold-77198

    04/21/2021, 10:12 PM
    concept is making sense, but yeah, how to do it is not clear. Does it have to do with env variables?
  • f

    future-gold-77198

    04/21/2021, 10:12 PM
    Ok, I'll read through this
  • b

    bulky-sundown-74498

    04/21/2021, 10:13 PM
    Copy code
    json
    // cypress.json
    {
      "component":{
        "pluginsFile": "cypress/plugins/componentTesting.js"
      }
    }
  • b

    bulky-sundown-74498

    04/21/2021, 10:14 PM
    This way, you can have one plugins file for CT and one for e2e
  • b

    bulky-sundown-74498

    04/21/2021, 10:15 PM
    same for support since I guess the global CSS import are not necessary for the e2e tests
  • b

    bulky-sundown-74498

    04/21/2021, 10:15 PM
    but are very important to ct
  • f

    future-gold-77198

    04/21/2021, 10:15 PM
    sounds good to me. Thanks!
  • b

    bulky-sundown-74498

    04/21/2021, 10:16 PM
    We desperately need docs and talks and tutorials
  • b

    bulky-sundown-74498

    04/21/2021, 10:16 PM
    but alpha is always a tough phase
  • b

    bulky-sundown-74498

    04/21/2021, 10:17 PM
    And we are working on it
  • f

    future-gold-77198

    04/21/2021, 10:17 PM
    yeah, I understand it being so early. I'm waiting for people smarter than me to come up with better prop management/mocking setups to show me how to do it 🙂
  • b

    bulky-sundown-74498

    04/21/2021, 10:20 PM
    Yeah, but you're here, this has to count for something 😉
  • f

    future-gold-77198

    04/21/2021, 10:26 PM
    I am very committed to making component testing valuable for my team. The past 2 companies I've worked at, I promised it would be great. The first was unfortunately cut short. The one I'm on now I think has a going for it. Just more to work through than I first expect, since I don't know what I don't know. Things are feeling a lot better since I found this discord though. So I really appreciate the help. That I can ask direct questions and you guys have great response time!
  • f

    future-gold-77198

    04/21/2021, 10:29 PM
    BTW, I notice there doesn't seem to be a componentFolder config option, right? How does the component runner determine which test files to find?
  • f

    future-gold-77198

    04/21/2021, 10:29 PM
    Or maybe it is just that I don't find it in the documentation. I can confirm that having it in the cypress.json doesn't harm anything at least
  • b

    bulky-sundown-74498

    04/21/2021, 10:30 PM
    It is probably a documentation issue
  • b

    bulky-sundown-74498

    04/21/2021, 10:31 PM
    Will fix it
  • q

    quick-gpu-68223

    04/22/2021, 5:17 AM
    Hello! I want to try component testing inside an old laravel app. I am moving the app to a full spa app. So what i am thinking about is just put laravel stuff on side and create a library components like. so i have my components folder inside app-next/components/BaseButton.vue and the .spec.js I have added a
    plugin.js
    as https://github.com/cypress-io/cypress/blob/master/npm/vue/examples/vue-cli/cypress/plugins.js
    Copy code
    js
    <template>
     <MyButton class="bg-red-500">
      hello
     </MyButton>
    </template>
    <script>
    import "tailwind-generate.css"
    import "global.css"
    export default {}
    </script>
    The think is i have no css apparently
  • q

    quick-gpu-68223

    04/22/2021, 5:23 AM
    i also tried to add inside the spec but nothing is working here. I probablly missing something. I can't spend too much time on the config side. So if you have any idea would be awesome because using it directly would be awesome instead of using jest for my SPA rewrite
  • q

    quick-gpu-68223

    04/22/2021, 5:40 AM
    ok it seems the question was asked just before me ^^. i think this part is just so import for the css 🙂
  • q

    quick-gpu-68223

    04/22/2021, 5:41 AM
    if you explain how easy can be to use css i would be more than happy to make an article or video on it
  • q

    quick-gpu-68223

    04/22/2021, 5:43 AM
    it's like my css is import it is present inside my head but none is applied
  • s

    stocky-dream-36427

    04/22/2021, 2:54 PM
  • s

    stocky-dream-36427

    04/22/2021, 2:54 PM
    @User Hmmm that looks correct.
  • s

    stocky-dream-36427

    04/22/2021, 2:54 PM
    Do you have a vanilla repo for us to look at?
  • s

    stocky-dream-36427

    04/22/2021, 2:55 PM
    I've never used Laravel. If your CSS import is inside the head, it should Just Work (TM)
  • s

    stocky-dream-36427

    04/22/2021, 2:55 PM
    BUT! I will debug any repo you send along
  • f

    future-gold-77198

    04/22/2021, 3:41 PM
    @User I don't think it would matter if your CSS is in your head, but do you only import within the spec file, or do you do it from the support/index file? All I know is my CSS works everywhere and I import from support/index
  • q

    quick-gpu-68223

    04/22/2021, 6:27 PM
    i will try to extract inside a repo soon thanks for your help
12345...252Latest