Hello everyone, In the Laravel 5.5 / vue.js2.5 application I do a check with Dusk:

$this->browse(function (Browser $browser) { $browser->resize(1920, 1080); // Width and Height $new_document_category= 'new document category created at ' . time(); $browser->loginAs(User::find(5)) ->visit('/admin/dashboard#/admin/document_categories/edit/new') ->type('#name', $new_document_category) // Поле заполняется ->type , но НЕ заполняется если ->value ->select('#type', 'D') ->value('#document_category_content', $new_document_category .' content lorem...') ->click('.editor_button_submit') ->assertTitleContains('Tasks/Chats/Events') ->assertPathIs('/admin/dashboard#/admin/document_categories'); }); 

This is a Vuejs 2.5 application with root configuration:

 const routes = [ { path: '/', ... {path: '/admin/document_categories', component: DocumentCategoriesIndex, name: 'documentCategoriesIndex'}, {path: '/admin/document_categories/edit/:id', component: DocumentCategoryEdit, name: 'editDocumentCategory'}, ... ] const router = new VueRouter( { mode: 'hash', // default routes }) 

And when you open the form to create a URL opens:

 http://local-tasks.com/admin/dashboard#/admin/document_categories/edit/new 

And when saving goes to

 http://local-tasks.com/admin/dashboard#/admin/document_categories 

The test works but on the last assertPathIs I get an error:

 Tests\Browser\ExampleTest::testBasicExample Failed asserting that '/admin/dashboard' matches PCRE pattern "/^\/admin\/dashboard#\/admin\/document_categories$/u". 

Why and how to fix it?

Thank !

  • Welcome to Stack Overflow in English! Here it is customary to ask one question in the question)) Please create a separate question for each of the three sub-questions. - diraria
  • The text of the post corrected - user2339232

0