core
core copied to clipboard
Where to post some questions ?
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?
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.
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