test Next.js server components with Cypress component tests

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 8

  • @MrVWRoli
    @MrVWRoli 8 месяцев назад +2

    For fixing the CSS issue you need to add this line to the component-index.html file. After that you will be able to import your global CSS file in component.ts.

  • @Brunoenribeiro
    @Brunoenribeiro 11 месяцев назад

    Nicely done. I was having trouble with it, you saved my skin.

    • @MuratKeremOzcan
      @MuratKeremOzcan  11 месяцев назад

      there are still 2 shortcomings; css is a problem and routing is a problem. If you search for issues in the repo, there are links to cy GitHub issues. I have another repo called next-issue-tracker, more complete app.

  • @igor_cojocaru
    @igor_cojocaru 5 месяцев назад

    Hi Murat, thanks for the video.
    I love Cypress component testing. After Dan Abramov's talk, I have started to look at Next.js server components, and my first thoughts were that it would be a pain in the neck to component test this kind of stuff with Cypress. It looks like you found a workaround, but I really miss the intercept syntax. What would you do if the component has more than one fetch request?
    I would like to learn how you plan this.
    Subscribed!

    • @MuratKeremOzcan
      @MuratKeremOzcan  5 месяцев назад

      You're asking how to differentiate between fetch calls, this will be a problem I think. Time for a feature request with reproducible repo example. Go for it.

  • @nirmalfernando6217
    @nirmalfernando6217 7 месяцев назад

    Have you integrated e2e coverage report with Next

    • @MuratKeremOzcan
      @MuratKeremOzcan  7 месяцев назад

      nah, code cov is soon going to be superfluous when UI interaction coverage becomes available