Fixes for tests

This commit is contained in:
Benjamin Beganović 2021-05-03 17:25:03 +02:00
parent 3d6f256e33
commit a3099b5cde
8 changed files with 10 additions and 8 deletions

View File

@ -14,7 +14,7 @@ describe('Credits', () => {
cy.visit('/client/credits'); cy.visit('/client/credits');
cy.get('body') cy.get('body')
.find('span') .find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Credits'); .should('contain.text', 'Credits');
}); });

View File

@ -14,7 +14,7 @@ context('Invoices', () => {
cy.visit('/client/invoices'); cy.visit('/client/invoices');
cy.get('body') cy.get('body')
.find('span') .find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Invoices'); .should('contain.text', 'Invoices');
}); });

View File

@ -14,7 +14,7 @@ context('Payment methods', () => {
cy.visit('/client/payment_methods'); cy.visit('/client/payment_methods');
cy.get('body') cy.get('body')
.find('span') .find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Payment Method'); .should('contain.text', 'Payment Method');
}); });

View File

@ -14,7 +14,7 @@ context('Payments', () => {
cy.visit('/client/payments'); cy.visit('/client/payments');
cy.get('body') cy.get('body')
.find('span') .find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Payments'); .should('contain.text', 'Payments');
}); });

View File

@ -14,7 +14,7 @@ describe('Quotes', () => {
cy.visit('/client/quotes'); cy.visit('/client/quotes');
cy.get('body') cy.get('body')
.find('span') .find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Quotes'); .should('contain.text', 'Quotes');
}); });

View File

@ -14,7 +14,8 @@ context('Recurring invoices', () => {
it('should show reucrring invoices text', () => { it('should show reucrring invoices text', () => {
cy.visit('/client/recurring_invoices'); cy.visit('/client/recurring_invoices');
cy.get('span') cy.get('body')
.find('[data-ref=meta-title]')
.first() .first()
.should('contain.text', 'Recurring Invoices'); .should('contain.text', 'Recurring Invoices');
}); });

View File

@ -5,7 +5,7 @@
</svg> </svg>
</button> </button>
<div class="flex-1 px-3 md:px-8 flex justify-between items-center"> <div class="flex-1 px-3 md:px-8 flex justify-between items-center">
<span class="text-xl text-gray-900">@yield('meta_title')</span> <span class="text-xl text-gray-900" data-ref="meta-title">@yield('meta_title')</span>
<div class="flex items-center md:ml-6 md:mr-2"> <div class="flex items-center md:ml-6 md:mr-2">
@if($multiple_contacts->count() > 1) @if($multiple_contacts->count() > 1)
<div class="relative inline-block text-left" x-data="{ open: false }"> <div class="relative inline-block text-left" x-data="{ open: false }">
@ -23,7 +23,7 @@
<div class="rounded bg-white shadow-xs"> <div class="rounded bg-white shadow-xs">
<div class="py-1"> <div class="py-1">
@foreach($multiple_contacts as $contact) @foreach($multiple_contacts as $contact)
<a data-turbolinks="false" href="{{ route('client.switch_company', $contact->hashed_id) }}" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ $contact->company->present()->name }}</a> <a href="{{ route('client.switch_company', $contact->hashed_id) }}" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ $contact->company->present()->name }}</a>
@endforeach @endforeach
</div> </div>
</div> </div>

View File

@ -26,6 +26,7 @@
<div class="mx-auto px-4 sm:px-6 md:px-8"> <div class="mx-auto px-4 sm:px-6 md:px-8">
<div class="pt-4 py-6"> <div class="pt-4 py-6">
@includeWhen(session()->has('success'), 'portal.ninja2020.components.general.messages.success') @includeWhen(session()->has('success'), 'portal.ninja2020.components.general.messages.success')
{{ $slot }} {{ $slot }}
</div> </div>
</div> </div>