core icon indicating copy to clipboard operation
core copied to clipboard

Where to post some questions ?

Open Barbapapazes opened this issue 2 years ago • 1 comments

Hello,

I've a question about Japa on adonis but I think it could be a general question for Japa, where can I post it?


Here my code in /todos:

<h1 class="text-2xl font-bold text-cyan-700">Tâches de la journée</h1>

Do I have to write a test to check if the text is in a h1? And how to check that the text is in a h1 without considering tag attributes?

  test('title must be in a h1', async ({ client }) => {
    const response = await client.get('/todos')

    response.assertStatus(200)
    response.assertTextIncludes(
      '<h1>Tâches de la journée</h1>'
    )
    // Maybe we could use a regex, or a querySelector or I'm wrong on what to test?
  })

Is functional tests only for behavior without considering styles? And how to test styles?

Barbapapazes avatar Jun 18 '22 09:06 Barbapapazes

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 17 '22 16:08 stale[bot]

Ohh sorry for taking so long. I have created a dedicated category for Japa in the AdonisJS discussions forum and we can use that. https://github.com/adonisjs/core/discussions/new?category=japa

thetutlage avatar Aug 31 '22 10:08 thetutlage