Antonella's avatar

Test E2E Cypress Jetstream fail click

I wrote the following test in cypress that registers but gives me problems in click management account:

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()
})
})

this is html in question:

<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('Dashboard') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">
                <x-jet-welcome />
            </div>
        </div>
    </div>
</x-app-layout>

gives me the following error:

button.flex.text-sm.border-2.border-transparent.rounded-full.focus:outline-none.focus:border-gray-300.transition.duration-150.ease-in-out Error Syntax error, unrecognized expression: unsupported pseudo: outline-none

0 likes
0 replies

Please or to participate in this conversation.