我在 cypress 中编写了以下测试,该测试注册但在点击管理帐户中出现问题:
import faker from 'faker'
describe('Registration', () => {
const email = faker.internet.email()
const password = faker.internet.password()
it('successfully registering', () => {
cy.visit('http://l8.test/register')
cy.get('input[name=name]').type(faker.name.findName())
cy.get('input[name=email]').type(email)
cy.get('input[name=password]').type(password)
cy.get('input[name=password_confirmation]').type(password)
cy.get('button').contains('Register').click()
cy.url().should('contain', '/dashboard')
//I would like to click on the Management Account, but I can't
cy.get('button.flex.text-sm.border-2.border-transparent.rounded-full.focus:outline-none.focus:border-gray-300.transition.duration-150.ease-in-out').click()
// cy.contains('Logout').click()
})
})
给我以下错误:
button.flex.text-sm.border-2.border-transparent.rounded-full.focus:outline-none.focus:border-gray-300.transition.duration-150.ease-in-out Error 语法错误,无法识别表达式:不支持伪:outline-none