antonioribeiro / tddd

A Laravel Continuous Integration Package
MIT License
721 stars 57 forks source link

Errors with Laravel 5.5 #65

Open jkenneydaniel opened 6 years ago

jkenneydaniel commented 6 years ago

Seems there's a few issues with Laravel 5.5, namely default config issues:

In Inline.php line 600:

  Malformed inline YAML string: {{ config('app.name') }} at line 2 (near "dashboard: {{ config('app.name') }}").

which is easily resolved by wrapping that string in double quotes within the YML config.

As well as errors associated with the watcher:

Config loaded from /Users/dkenney/Documents/Personal/NukeYa/config
Loading testers...
No testers found.
Loading projects and suites...
No projects found.
Loading tests...
FATAL ERROR: directory not found: /Users/dkenney/code/pragmarx/tddd/tests/Feature.
[1]    24730 done       php artisan tddd:watch

I am new to Laravel and will try to figure these issues out on my own - documentation isn't really clear regarding how the configuration for tests work and what directory to point to. I'm not sure why pragmarx/tddd is chosen or why it's assuming it should point to my home directory as well?

From the config I can see that it's configured this way but wouldn't a better way to do this be to default to the root of the Laravel application and not assume the location of the code base?

Any help here would be greatly appreciated - I can try to make a PR for fixing this - I was looking forward to having a nice way to manage my tests and code coverage while I learn and build with Laravel.

System info: OSX High Sierra PHP 7.1.3

If you need anymore let me know.

jkenneydaniel commented 6 years ago

Just an update, I actually figured out my latter issue with not being able to use the watcher was due to misunderstanding on my part (which is the required configuration in my .env file), perhaps documentation regarding install could be done to outline this?

Using this from your starter app seems to have gotten me up and running:

TDDD_CONFIG_PATH="{{ laravel.config.path }}/tddd"
TDDD_CODE_PATH=/code
TDDD_HOST_OS=macos
jkenneydaniel commented 6 years ago

Additionally, there appears to be an issue with the routes prefixes. When defining a global prefix it doesn't appear to be used by the AJAX calls and results in 404 errors.

For example:

prefixes:
  global: 'tests'
  dashboard: '/dashboard'
  tests: "/tests"
  projects: "/projects"
  files: "/files"
  html: "/html"

Results in AJAX calls to dashboard/data and not tests/dashboard/data.

EDIT: Looks like my routes.yml was incorrect - this appears to work now:

prefixes:
  global: 'test-watcher'
  dashboard: 'dashboard'
  tests: "tests"
  projects: "/projects"
  files: "/files"
  html: "/html"