BLADE); expect($html) ->toContain('Host') ->toContain('minio.internal or 192.168.1.50') ->toContain("scheme: 'https'") ->toContain("host: ''") ->toContain("port: ''") ->toContain("path: ''"); }); it('does not reparse partial numeric hosts while typing', function () { $view = file_get_contents(resource_path('views/components/forms/domain-input.blade.php')); $writeMethod = str($view)->between('write() {', "\n },\n}")->value(); expect($writeMethod) ->toContain('this.syncing = true;') ->toContain('this.value = next;') ->toContain('this.$nextTick(() => this.syncing = false);') ->and(strpos($writeMethod, 'this.syncing = true;')) ->toBeLessThan(strpos($writeMethod, 'this.value = next;')); }); it('keeps validation errors attached to the composed endpoint', function () { $settingsUrl = route('settings.advanced').'#endpoint-section'; $errors = new ViewErrorBag; $errors->put('default', new MessageBag([ 'endpoint' => "The endpoint is invalid. Configure allowed internal targets: {$settingsUrl}", ])); View::share('errors', $errors); $html = Blade::render(''); expect($html) ->toContain('The endpoint is invalid.') ->toContain('href="'.$settingsUrl.'"') ->toContain('Set them here.'); });