Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn rw g scaffold post, is missing tests files(layouts, pages and cells) #686

Closed
3 tasks
guledali opened this issue Jun 12, 2020 · 3 comments
Closed
3 tasks

Comments

@guledali
Copy link
Contributor

guledali commented Jun 12, 2020

https://github.com/redwoodjs/redwood/tree/master/packages/cli/src/commands/generate/scaffold/templates

  • Layout missing test file
  • Page missing test file
  • Cell is missing test file

Individually they all have test files in them, just not when you run the yarn rw g scaffold command. So we can just copy them into scaffold folder.

Cell: https://github.com/redwoodjs/redwood/blob/master/packages/cli/src/commands/generate/cell/templates/test.js.template

Pages:
https://github.com/redwoodjs/redwood/blob/master/packages/cli/src/commands/generate/page/templates/test.js.template

Layout
https://github.com/redwoodjs/redwood/blob/master/packages/cli/src/commands/generate/layout/templates/test.js.template

@guledali guledali changed the title yarn rw g scaffold post is missing tests file(layouts, pages and cells) yarn rw g scaffold post, is missing tests file(layouts, pages and cells) Jun 12, 2020
@guledali guledali changed the title yarn rw g scaffold post, is missing tests file(layouts, pages and cells) yarn rw g scaffold post, is missing tests files(layouts, pages and cells) Jun 12, 2020
@jtoar
Copy link
Contributor

jtoar commented Jun 12, 2020

@guledali Thanks for noticing this. @AryanJ-NYC brought this up as well in issue #603. As @cannikin said there, the reason we don't have tests is we haven't figured out the best way to test cells, GraphQL, and Prisma yet. But this is probably also going to have to wait for the generator refactor, which is being discussed in #653.

Moreover, we probably won't just copy the files over. Ideally, the tests for scaffolds will be one of the ways we show off Redwood's testing package and some best practices for it.

@guledali
Copy link
Contributor Author

@jtoar I'm closing this issue then

@thedavidprice
Copy link
Contributor

@guledali thanks for making sure this was on our radar! Always appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants