nano/docs

There is no license information available for the latest version (1.3.3) of this package.

Add fetch artifacts from gitlab and add docs route

1.3.3 2019-09-16 01:44 UTC

This package is auto-updated.

Last update: 2024-04-16 11:57:21 UTC


README

Add to your composer.json:

"repositories": [
       {
           "type": "vcs",
           "url": "https://git.nano.rocks/Kailum/nano-docs-package.git"
       }
   ]

Run composer require --dev nano/docs:dev-master

Make sure your Dusk Test Case extends NanoDocsTestCase

use Nano\Docs\NanoDocsTestCase;

abstract class DuskTestCase extends NanoDocsTestCase
{
    ...
}

Or contains the following code:


abstract class DuskTestCase extends BaseTestCase
{
    protected function newBrowser($driver) {
        return new \Nano\Docs\NanoDocsBrowser($driver);
    }

    ...
}

Publish the package config ./artisan vendor:publish

In gitlab .env, add DOCS_SCREENSHOTS=true

On the server, add DOCS=true, PROJECT_URL, GITLAB_TOKEN, DOCS_GITLAB_JOBS to the .env file

Project url will be similar to: https://git.lab.example/api/v4/projects/{project_id}

Gitlab jobs will be the names of the jobs that gitlab runs (in your gitlab-ci.yml)

Gitlab token: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

To view screenshots from git tests, run ./artisan docs:fetch on the server and visit /docs (can be changed by setting DOCS_URL in server .env)

To view screenshots from local tests, run ./artisan docs:local and visit DOCS_URL/local