Hi there, really enjoying the course so far but I’ve gotten a bit stuck with the first two examples.
- Building a Basic Unit Component Check
The tests for this one appear to be running fine but my linter doesn’t like this line of code and I’ve had to get it to ignore it (using // eslint-disable-next-line testing-library/prefer-screen-queries.
I was wondering what this meant/ why my IDE sees it as incorrect as I don’t understand it.
await findByText('Project 1');
Getting Stuck in With Code - UI Layer
I’m having a bit more problems with this in terms of the code looks sound to me, please let me know if i’m missing anything…
const { expect, browser, $ } = require('@wdio/globals')
describe('My Login application', () => {
it('should login with valid credentials', async () => {
await browser.url(`http://localhost:3000/#/login`)
await $('input[name="email"]').setValue('admin@test.com')
await $('input[name="password"]').setValue('password123')
await $('button').click()
const element = await $('.card-title')
await expect(element).toHaveText('Projects')
})
})
From what I can see the capabilities part of the wdio.conf.js file looks as expected, but when i run the command npx wdio run ./wdio.conf.js --spec login.e2e.js it isn’t happy.