├── public ├── favicon.ico ├── robots.txt ├── img │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── logo.png │ ├── github.png │ ├── header.jpg │ ├── 1_small.png │ ├── 2_small.png │ ├── 3_small.png │ ├── 4_small.png │ ├── 5_small.png │ ├── 6_small.png │ ├── favicon.ico │ ├── logo_full.png │ └── telegram.png ├── mix-manifest.json ├── editor │ └── font │ │ ├── summernote.eot │ │ ├── summernote.ttf │ │ ├── summernote.woff │ │ └── summernote.woff2 ├── .htaccess ├── web.config ├── css │ └── tree.css ├── js │ ├── js.cookie.min.js │ ├── repo │ │ └── repository.js │ ├── test_plan_page.js │ └── test_run.js └── index.php ├── .phpstorm.meta.php └── .gitkeep ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore ├── debugbar │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2022_05_18_112056_create_projects_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2022_05_21_102744_create_test_runs_table.php │ ├── 2022_05_18_112057_create_repositories_table.php │ ├── 2022_05_18_121723_create_suites_table.php │ ├── 2022_05_28_142756_create_documents_table.php │ ├── 2022_05_21_102440_create_test_plans_table.php │ ├── 2022_05_18_121732_create_test_cases_table.php │ └── 2024_07_02_124723_update_permissions_model_types.php └── seeds │ ├── AdminSeeder.php │ └── TestSeeder.php ├── resources ├── sass │ └── app.scss ├── js │ ├── app.js │ └── bootstrap.js ├── views │ ├── test_plan │ │ ├── tree.blade.php │ │ ├── tree_item.blade.php │ │ └── list_page.blade.php │ ├── test_run │ │ ├── tree.blade.php │ │ ├── chart.blade.php │ │ ├── show_page.blade.php │ │ ├── create_page.blade.php │ │ ├── list_page.blade.php │ │ ├── edit_page.blade.php │ │ ├── tree_item.blade.php │ │ └── test_cases_list.blade.php │ ├── docs │ │ ├── tree_item.blade.php │ │ ├── selector_tree_item.blade.php │ │ ├── edit_page.blade.php │ │ ├── list_page.blade.php │ │ └── create_page.blade.php │ ├── test_suite │ │ ├── create_form.blade.php │ │ ├── selector_tree_item.blade.php │ │ ├── editor.blade.php │ │ └── edit_form.blade.php │ ├── layout │ │ ├── sidebar_nav.blade.php │ │ ├── base_layout.blade.php │ │ └── header_nav.blade.php │ ├── project │ │ ├── create_page.blade.php │ │ ├── edit_page.blade.php │ │ └── list_page.blade.php │ ├── users │ │ └── list_page.blade.php │ ├── repository │ │ ├── list_page.blade.php │ │ ├── create_page.blade.php │ │ ├── test_cases_list.blade.php │ │ └── edit_page.blade.php │ ├── auth │ │ └── login_page.blade.php │ └── test_case │ │ └── show_overlay.blade.php └── lang │ ├── es.json │ └── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── docker ├── app │ ├── php.ini │ └── Dockerfile └── nginx │ ├── Dockerfile │ └── conf.d │ └── default.conf ├── .gitattributes ├── app ├── Enums │ ├── CasePriority.php │ ├── UserRole.php │ └── TestRunCaseStatus.php ├── Models │ ├── TestPlan.php │ ├── Category.php │ ├── Expenses.php │ ├── Document.php │ ├── TestCase.php │ ├── Suite.php │ ├── Repository.php │ ├── User.php │ ├── Project.php │ └── TestRun.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── Authenticate.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── SummaryController.php │ │ ├── AuthController.php │ │ ├── ProjectController.php │ │ ├── TestSuiteController.php │ │ └── DocumentsController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AuthServiceProvider.php │ ├── AppServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ └── Kernel.php └── Exceptions │ └── Handler.php ├── .idea ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── vcs.xml └── phpunit.xml ├── docker-run.sh ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── CreatesApplication.php └── Feature │ └── IndexRedirectTest.php ├── .styleci.yml ├── .editorconfig ├── DOCKER_README.md ├── .env_docker ├── .gitignore ├── webpack.mix.js ├── routes ├── channels.php ├── api.php └── console.php ├── server.php ├── notes.txt ├── .env.testing ├── config ├── cors.php ├── services.php ├── view.php ├── hashing.php ├── broadcasting.php ├── filesystems.php ├── queue.php ├── logging.php ├── cache.php └── mail.php ├── .env_sqlite.backup ├── .env.backup ├── LICENSE ├── package.json ├── phpunit.xml ├── artisan ├── composer.json └── docker-compose.yml /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.phpstorm.meta.php/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | @import '~bulma/bulma'; 2 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /public/img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/1.png -------------------------------------------------------------------------------- /public/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/2.png -------------------------------------------------------------------------------- /public/img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/3.png -------------------------------------------------------------------------------- /public/img/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/4.png -------------------------------------------------------------------------------- /public/img/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/5.png -------------------------------------------------------------------------------- /public/img/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/6.png -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/logo.png -------------------------------------------------------------------------------- /public/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/github.png -------------------------------------------------------------------------------- /public/img/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/header.jpg -------------------------------------------------------------------------------- /public/img/1_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/1_small.png -------------------------------------------------------------------------------- /public/img/2_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/2_small.png -------------------------------------------------------------------------------- /public/img/3_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/3_small.png -------------------------------------------------------------------------------- /public/img/4_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/4_small.png -------------------------------------------------------------------------------- /public/img/5_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/5_small.png -------------------------------------------------------------------------------- /public/img/6_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/6_small.png -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/favicon.ico -------------------------------------------------------------------------------- /public/img/logo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/logo_full.png -------------------------------------------------------------------------------- /public/img/telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/img/telegram.png -------------------------------------------------------------------------------- /docker/app/php.ini: -------------------------------------------------------------------------------- 1 | cgi.fix_pathinfo=0 2 | max_execution_time = 1000 3 | max_input_time = 1000 4 | memory_limit=4G -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/editor/font/summernote.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/editor/font/summernote.eot -------------------------------------------------------------------------------- /public/editor/font/summernote.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/editor/font/summernote.ttf -------------------------------------------------------------------------------- /public/editor/font/summernote.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/editor/font/summernote.woff -------------------------------------------------------------------------------- /public/editor/font/summernote.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a13xh7/QaraTMS/HEAD/public/editor/font/summernote.woff2 -------------------------------------------------------------------------------- /resources/views/test_plan/tree.blade.php: -------------------------------------------------------------------------------- 1 | @foreach($testSuitesTree as $testSuite) 2 | @include('test_plan.tree_item') 3 | @endforeach 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /docker/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.25.1 2 | 3 | # RUN rm /etc/nginx/conf.d 4 | COPY ./docker/nginx/conf.d /etc/nginx/conf.d 5 | 6 | EXPOSE 80 -------------------------------------------------------------------------------- /resources/views/test_run/tree.blade.php: -------------------------------------------------------------------------------- 1 | @foreach($testSuitesTree as $testSuite) 2 | 3 | @include('test_run.tree_item') 4 | 5 | @endforeach 6 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /app/Enums/CasePriority.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/Enums/UserRole.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/Models/TestPlan.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /DOCKER_README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | You can configure various parameters by setting the desired values in the [.env_docker](.env_docker) file. 3 | 1. ```docker compose --env-file=.env_docker up -d --build``` 4 | 2. only on first run ```docker exec app php artisan migrate``` 5 | 3. only on first run ```docker exec app php artisan db:seed --class=AdminSeeder``` 6 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | hasMany(Expense::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | belongsTo(Category::class); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{$document->title}} 4 | 5 | 6 | @foreach($document->children as $document) 7 |
8 | @include('docs.tree_item') 9 |
10 | @endforeach 11 | 12 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.env_docker: -------------------------------------------------------------------------------- 1 | # You can see default values in docker-compose.yml 2 | 3 | # Port to access project 4 | NGINX_PORT= 5 | # Application URL 6 | APP_FULL_URL= 7 | # Database docker container name 8 | DB_CONTAINER_NAME= 9 | # Database name 10 | DB_NAME= 11 | # Database user name - dont use root 12 | DB_USER= 13 | # Database your user password 14 | DB_PASS= 15 | # Database port 16 | DB_PORT= 17 | # Database root password 18 | DB_ROOT_PASS= 19 | # Port to access PhpMyAdmin 20 | PHP_MY_ADMIN_PORT= 21 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | # Allow codestyle to be synced with project 3 | !/.idea/ 4 | /.idea/* 5 | !/.idea/codeStyles 6 | 7 | # Generated by laravel-ide-helper 8 | .phpstorm.meta.php 9 | 10 | # Databse for unit tests 11 | testing.sqlite 12 | 13 | /node_modules 14 | /public/hot 15 | /public/storage 16 | /public/media 17 | /storage/*.key 18 | /tests-coverage 19 | /vendor 20 | 21 | .env 22 | 23 | .phpunit.result.cache 24 | Homestead.json 25 | Homestead.yaml 26 | npm-debug.log 27 | yarn-error.log 28 | .ddev 29 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | descendants; 18 | 19 | foreach ($descendants as $descendant) { 20 | $descendant->delete(); 21 | } 22 | return parent::delete(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /resources/lang/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "Repositories": "Repositorios", 3 | "All projects": "Proyectos", 4 | "Test Plans": "Planes de prueba", 5 | "Test Runs": "Ejecuciones", 6 | "Documents": "Documentos", 7 | "Users": "Usuarios", 8 | "Logout": "Cerrar sesión", 9 | "Projects": "Proyectos", 10 | "Create new project": "Crear nuevo proyecto", 11 | "Test Suites": "Conjuntos de pruebas", 12 | "Test Cases": "Casos de prueba", 13 | "Dashboard of project": "Panel de control del proyecto", 14 | "Settings": "Ajustes", 15 | "Automation": "Automatización", 16 | "Add New": "Agregar nuevo" 17 | } 18 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 19 | return route('login_page'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/TestCase.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->describe('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 16 | ]; 17 | 18 | /** 19 | * Register any authentication / authorization services. 20 | * 21 | * @return void 22 | */ 23 | public function boot() 24 | { 25 | $this->registerPolicies(); 26 | 27 | // 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Suite... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | check()) { 23 | return redirect(RouteServiceProvider::HOME); 24 | } 25 | 26 | return $next($request); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | hasMany(TestCase::class, 'suite_id', 'id'); 18 | } 19 | 20 | public function testCasesCount() 21 | { 22 | return $this->testCases->count(); 23 | } 24 | 25 | public function delete() 26 | { 27 | $descendants = $this->descendants; 28 | 29 | foreach ($descendants as $descendant) { 30 | $descendant->delete(); 31 | } 32 | return parent::delete(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 18 | SendEmailVerificationNotification::class, 19 | ], 20 | ]; 21 | 22 | /** 23 | * Register any events for your application. 24 | * 25 | * @return void 26 | */ 27 | public function boot() 28 | { 29 | parent::boot(); 30 | 31 | // 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 19 | 'email' => $this->faker->unique()->safeEmail(), 20 | 'email_verified_at' => Carbon::now(), 21 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 22 | 'remember_token' => Str::random(10), 23 | 'created_at' => Carbon::now(), 24 | 'updated_at' => Carbon::now(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/migrations/2022_05_18_112056_create_projects_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string("title"); 19 | $table->string("description")->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('projects'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docker/nginx/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen *:80; 3 | index index.html index.php; 4 | error_log /var/log/nginx/error.log; 5 | access_log /var/log/nginx/access.log; 6 | root /var/www/public; 7 | 8 | location / { 9 | try_files $uri /index.php; 10 | # kill cache 11 | add_header Last-Modified $date_gmt; 12 | add_header Cache-Control 'no-store, no-cache'; 13 | if_modified_since off; 14 | expires off; 15 | etag off; 16 | } 17 | 18 | location ~ \.php$ { 19 | try_files $uri =404; 20 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 21 | fastcgi_pass app:9000; 22 | fastcgi_index index.php; 23 | include fastcgi_params; 24 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 25 | fastcgi_param PATH_INFO $fastcgi_path_info; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Models/Repository.php: -------------------------------------------------------------------------------- 1 | hasMany(Suite::class, 'repository_id', 'id'); 15 | } 16 | 17 | public function suitesCount() 18 | { 19 | return $this->suites->count(); 20 | } 21 | 22 | public function casesCount() 23 | { 24 | $suiteIds = Suite::where('repository_id', $this->id)->pluck('id')->toArray(); 25 | return TestCase::whereIn('suite_id', $suiteIds)->count(); 26 | } 27 | 28 | public function automatedCasesCount() 29 | { 30 | $suiteIds = Suite::where('repository_id', $this->id)->pluck('id')->toArray(); 31 | return TestCase::whereIn('suite_id', $suiteIds)->where('automated', true)->count(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /notes.txt: -------------------------------------------------------------------------------- 1 | https://github.com/staudenmeir/laravel-adjacency-list 2 | https://rodionoff.space/all/mysql8-in-docker/ 3 | 4 | docker start mysql 5 | 6 | php artisan db:seed --class=AdminSeeder 7 | 8 | 9 | image inside test area 10 | 11 | 12 | roles 13 | 14 | admin 15 | qa 16 | tester 17 | 18 | 19 | 20 | replace collapse icon test suite 21 | 22 | new editor 23 | registration / users 24 | 25 | $( document ).ready(function() { 26 | 27 | }); 28 | 29 | html код новых шагов находится в 4-х местах - формы создать, обновить(if,else) и в js коде case_viewer 30 | 31 | 32 | composer dumpautoload 33 | 34 | 35 | 36 | 37 | git reset --hard HEAD~1 38 | 39 | php artisan db:seed --class=AdminSeeder 40 | 41 | 42 | php artisan make:migration create_repositories_table 43 | 44 | php artisan make:controller UsersController 45 | 46 | php artisan make:controller RepositoryController --resource --model=Repository 47 | 48 | php artisan make:model TestPlan 49 | -------------------------------------------------------------------------------- /.env.testing: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY=base64:rKDTiN5GuLaiNppTQgn4eGh/jOCM1EUG7vpNfQ29G+g= 4 | APP_DEBUG=true 5 | DEBUGBAR_ENABLED=false 6 | APP_URL=http://localhost 7 | 8 | LOG_CHANNEL=stack 9 | 10 | DB_CONNECTION=sqlite 11 | DB_DATABASE=testing.sqlite 12 | 13 | BROADCAST_DRIVER=log 14 | QUEUE_CONNECTION=sync 15 | 16 | REDIS_HOST=127.0.0.1 17 | REDIS_PASSWORD=null 18 | REDIS_PORT=6379 19 | 20 | MAIL_MAILER=smtp 21 | MAIL_HOST=smtp.mailtrap.io 22 | MAIL_PORT=2525 23 | MAIL_USERNAME=null 24 | MAIL_PASSWORD=null 25 | MAIL_ENCRYPTION=null 26 | MAIL_FROM_ADDRESS=null 27 | MAIL_FROM_NAME="${APP_NAME}" 28 | 29 | AWS_ACCESS_KEY_ID= 30 | AWS_SECRET_ACCESS_KEY= 31 | AWS_DEFAULT_REGION=us-east-1 32 | AWS_BUCKET= 33 | 34 | PUSHER_APP_ID= 35 | PUSHER_APP_KEY= 36 | PUSHER_APP_SECRET= 37 | PUSHER_APP_CLUSTER=mt1 38 | 39 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 40 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 41 | 42 | FORCE_HTTPS=false 43 | APP_LOCALE=en 44 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /resources/views/test_run/chart.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
4 | {{$testRun->getChartData()['passed'][0]}} 5 |
6 | 7 |
9 | {{$testRun->getChartData()['failed'][0]}} 10 |
11 | 12 |
14 | {{$testRun->getChartData()['blocked'][0]}} 15 |
16 | 17 |
19 | {{$testRun->getChartData()['not_tested'][0]}} 20 |
21 |
22 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /.env_sqlite.backup: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY=base64:cT+0JTXhBmTM9KDSIWQE1s4EY0gIyUkGfrUxUOIp2R0= 4 | APP_DEBUG=true 5 | DEBUGBAR_ENABLED=true 6 | APP_URL=http://localhost 7 | 8 | LOG_CHANNEL=stack 9 | 10 | DB_CONNECTION=sqlite 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | QUEUE_CONNECTION=sync 18 | SESSION_DRIVER=file 19 | SESSION_LIFETIME=525600 20 | 21 | REDIS_HOST=127.0.0.1 22 | REDIS_PASSWORD=null 23 | REDIS_PORT=6379 24 | 25 | MAIL_MAILER=smtp 26 | MAIL_HOST=smtp.mailtrap.io 27 | MAIL_PORT=2525 28 | MAIL_USERNAME=null 29 | MAIL_PASSWORD=null 30 | MAIL_ENCRYPTION=null 31 | MAIL_FROM_ADDRESS=null 32 | MAIL_FROM_NAME="${APP_NAME}" 33 | 34 | AWS_ACCESS_KEY_ID= 35 | AWS_SECRET_ACCESS_KEY= 36 | AWS_DEFAULT_REGION=us-east-1 37 | AWS_BUCKET= 38 | 39 | PUSHER_APP_ID= 40 | PUSHER_APP_KEY= 41 | PUSHER_APP_SECRET= 42 | PUSHER_APP_CLUSTER=mt1 43 | 44 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 45 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email', 100)->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Feature/IndexRedirectTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | // expect redirect because user is unauthenticated 18 | $response->assertStatus(302); 19 | $response->assertRedirect(route('login_page')); 20 | } 21 | 22 | public function testRedirectToProjectsForAuthenticatedUser() 23 | { 24 | 25 | $user = User::factory()->create(); 26 | $response = $this->actingAs($user)->get('/'); 27 | 28 | // expect redirect because route for index is configured to redirect to 29 | // projects index page 30 | $response->assertStatus(302); 31 | $response->assertRedirect(route('project_list_page')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2022_05_21_102744_create_test_runs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('test_plan_id')->constrained('test_plans')->onDelete('cascade'); 19 | $table->integer('project_id'); 20 | $table->string('title'); 21 | $table->longText('data')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('test_runs'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2022_05_18_112057_create_repositories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('project_id')->constrained('projects')->onDelete('cascade'); 19 | $table->string('title'); 20 | $table->string("prefix", 3); 21 | $table->string('description')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('repositories'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /resources/views/test_suite/create_form.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | 17 | 18 |
19 | 20 |
21 | -------------------------------------------------------------------------------- /database/migrations/2022_05_18_121723_create_suites_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('repository_id')->constrained('repositories')->onDelete('cascade'); 19 | $table->unsignedBigInteger('parent_id')->nullable(); 20 | $table->string("title"); 21 | $table->integer("order")->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('suites'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /resources/views/test_suite/selector_tree_item.blade.php: -------------------------------------------------------------------------------- 1 | @if(isset($editableSuite->id)) 2 | 3 | @if($suite->id != $editableSuite->id) 4 | 5 | 18 | 19 | @foreach($suite->children as $suite) 20 | @include('test_suite.selector_tree_item') 21 | @endforeach 22 | @endif 23 | 24 | @else 25 | 26 | 33 | 34 | @foreach($suite->children as $suite) 35 | @include('test_suite.selector_tree_item') 36 | @endforeach 37 | @endif 38 | 39 | -------------------------------------------------------------------------------- /database/migrations/2022_05_28_142756_create_documents_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('project_id')->constrained('projects')->onDelete('cascade'); 19 | $table->unsignedBigInteger('parent_id')->nullable(); 20 | $table->string('title'); 21 | $table->longText('content')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('documents'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /resources/views/docs/selector_tree_item.blade.php: -------------------------------------------------------------------------------- 1 | @if(isset($selectedDocument->id)) 2 | 3 | @if($document->id != $selectedDocument->id) 4 | 5 | 18 | 19 | @foreach($document->children as $document) 20 | @include('docs.selector_tree_item') 21 | @endforeach 22 | @endif 23 | 24 | @else 25 | 26 | 33 | 34 | @foreach($document->children as $document) 35 | @include('docs.selector_tree_item') 36 | @endforeach 37 | @endif 38 | 39 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /database/migrations/2022_05_21_102440_create_test_plans_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('project_id')->constrained('projects')->onDelete('cascade'); 19 | $table->integer('repository_id'); 20 | $table->string('title'); 21 | $table->string('description')->nullable(); 22 | $table->longText('data')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('test_plans'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Controllers/SummaryController.php: -------------------------------------------------------------------------------- 1 | get(); 21 | 22 | $summary = []; 23 | 24 | foreach ($categories as $category) { 25 | $totalSpent = $expenses->where('category_id', $category->id)->sum('amount'); 26 | $status = $totalSpent > $category->limit ? 'over' : 'under'; 27 | 28 | $summary[$category->name] = [ 29 | 'totalSpent' => $totalSpent, 30 | 'status' => $status 31 | ]; 32 | } 33 | 34 | return response()->json($summary); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /.env.backup: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY=base64:DoTBMSWnd8Q761mGwmNAGD37kIqro7CzCES0IB/apdg= 4 | APP_DEBUG=true 5 | DEBUGBAR_ENABLED=true 6 | APP_URL=http://localhost 7 | 8 | LOG_CHANNEL=stack 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=mysql 12 | DB_PORT=3306 13 | DB_DATABASE=tms 14 | DB_USERNAME=root 15 | DB_PASSWORD=root 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=525600 22 | 23 | REDIS_HOST=127.0.0.1 24 | REDIS_PASSWORD=null 25 | REDIS_PORT=6379 26 | 27 | MAIL_MAILER=smtp 28 | MAIL_HOST=smtp.mailtrap.io 29 | MAIL_PORT=2525 30 | MAIL_USERNAME=null 31 | MAIL_PASSWORD=null 32 | MAIL_ENCRYPTION=null 33 | MAIL_FROM_ADDRESS=null 34 | MAIL_FROM_NAME="${APP_NAME}" 35 | 36 | AWS_ACCESS_KEY_ID= 37 | AWS_SECRET_ACCESS_KEY= 38 | AWS_DEFAULT_REGION=us-east-1 39 | AWS_BUCKET= 40 | 41 | PUSHER_APP_ID= 42 | PUSHER_APP_KEY= 43 | PUSHER_APP_SECRET= 44 | PUSHER_APP_CLUSTER=mt1 45 | 46 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 47 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 48 | 49 | FORCE_HTTPS=false 50 | APP_LOCALE=en -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-present Evan You 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /database/migrations/2022_05_18_121732_create_test_cases_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('suite_id')->constrained('suites')->onDelete('cascade'); 19 | $table->string("title"); 20 | $table->boolean("automated")->default(false); 21 | $table->integer("priority")->default(\App\Enums\CasePriority::MEDIUM); 22 | $table->longText("data")->nullable(); 23 | $table->integer("order")->nullable(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('test_cases'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /resources/views/test_suite/editor.blade.php: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "cross-env": "^7.0", 15 | "laravel-mix": "^5.0.1", 16 | "lodash": "^4.17.19", 17 | "resolve-url-loader": "^3.1.0", 18 | "sass": "^1.15.2", 19 | "sass-loader": "^8.0.0", 20 | "vue-template-compiler": "^2.6.14" 21 | }, 22 | "dependencies": { 23 | "@ckeditor/ckeditor5-build-classic": "^34.0.0", 24 | "@ckeditor/ckeditor5-image": "^34.0.0", 25 | "@material/typography": "^14.0.0", 26 | "ckeditor5-build-classic-image-resize": "^1.5.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | validate([ 28 | 'email' => 'required', 29 | 'password' => 'required', 30 | ]); 31 | 32 | $credentials = $request->only('email', 'password'); 33 | 34 | if (Auth::attempt($credentials)) { 35 | return redirect()->intended('/'); 36 | } 37 | 38 | return redirect()->route("login_page")->withErrors('Login details are not valid'); 39 | } 40 | 41 | /***************************************** 42 | * LOGOUT 43 | *****************************************/ 44 | 45 | public function logout() 46 | { 47 | Session::flush(); 48 | Auth::logout(); 49 | return redirect()->route('login_page'); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /resources/views/test_suite/edit_form.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 11 |
12 | 13 |
14 | 15 | 16 | 25 | 26 |
27 | 28 |
29 | 32 | 33 |
34 | 35 |
36 | -------------------------------------------------------------------------------- /public/css/tree.css: -------------------------------------------------------------------------------- 1 | 2 | .selected_case { 3 | border: 1px solid rgba(25, 54, 84, 0.22) !important; 4 | background: #edf7fb !important; 5 | border-radius: 3px; 6 | } 7 | 8 | /************************************************************************************* 9 | * Repository - TEST SUITES / CASES TREE 10 | *************************************************************************************/ 11 | 12 | #tree { 13 | margin-left: -30px; 14 | overflow-y: auto; 15 | max-height: calc(100vh - 120px) 16 | } 17 | 18 | .tree_suite { 19 | padding-left: 30px; 20 | } 21 | 22 | .tree_test_suite_content { 23 | background: #d9dfe3; 24 | padding-left: 10px; 25 | border: 1px solid #ddd; 26 | border-radius: 5px; 27 | } 28 | 29 | .tree_suite_test_cases { 30 | margin-bottom: 10px; 31 | } 32 | 33 | .tree_test_case_content { 34 | border-bottom: 1px solid #ddd; 35 | border-radius: 5px; 36 | } 37 | 38 | .tree_test_case_click { 39 | padding-top: 5px; 40 | padding-bottom: 5px; 41 | padding-left: 10px; 42 | width: 90%; 43 | } 44 | 45 | .tree_test_case_controls { 46 | padding-top: 5px; 47 | padding-bottom: 5px; 48 | padding-left: 10px; 49 | } 50 | 51 | .tree_test_case_content:hover { 52 | background: #7c87911c; 53 | } 54 | 55 | .test_case_id { 56 | display: inline-block; 57 | width: 110px; 58 | } 59 | 60 | .test_suite_cbx { 61 | margin-top: 10px; 62 | } 63 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./app 10 | 11 | 12 | 13 | 14 | ./tests/Unit 15 | 16 | 17 | ./tests/Feature 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /docker/app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.3-fpm 2 | 3 | # Install system dependencies 4 | RUN apt-get update && apt-get install -y \ 5 | libonig-dev \ 6 | libpng-dev \ 7 | zlib1g-dev \ 8 | libxml2-dev \ 9 | zip \ 10 | unzip \ 11 | vim && \ 12 | apt-get clean && \ 13 | rm -rf /var/lib/apt/lists/* /tpm/* /var/tmp/* 14 | 15 | # Install PHP extensions 16 | RUN docker-php-ext-install pdo 17 | RUN docker-php-ext-install pdo_mysql 18 | RUN docker-php-ext-install gd 19 | RUN docker-php-ext-install mbstring 20 | RUN docker-php-ext-install exif 21 | RUN docker-php-ext-install pcntl 22 | RUN docker-php-ext-install bcmath 23 | RUN docker-php-ext-install xml 24 | 25 | # RUN mkdir -p /usr/local/etc/php/conf.d 26 | 27 | COPY ./docker/app/php.ini /usr/local/etc/php/conf.d/php.ini 28 | 29 | ENV COMPOSER_ALLOW_SUPERUSER=1 30 | RUN curl -sS https://getcomposer.org/installer | php -- \ 31 | --filename=composer \ 32 | --install-dir=/usr/local/bin 33 | 34 | COPY . /var/www 35 | 36 | RUN chown -R www-data:www-data /var/www 37 | 38 | WORKDIR /var/www 39 | 40 | RUN mv .env.backup .env 41 | 42 | RUN composer install 43 | RUN composer require doctrine/dbal 44 | 45 | RUN php artisan key:generate && \ 46 | php artisan cache:clear && \ 47 | php artisan config:clear && \ 48 | php artisan view:clear && \ 49 | php artisan optimize:clear 50 | 51 | RUN chown -R www-data:www-data /var/www 52 | RUN chmod -R 755 /var/www/storage 53 | 54 | # RUN addgroup -gid 1000 -system www && \ 55 | # adduser -uid 1000 --system www --ingroup www 56 | 57 | # COPY --chown=www-data:www-data . /var/www 58 | 59 | # USER www 60 | 61 | EXPOSE 9000 62 | 63 | 64 | CMD [ "php-fpm" ] 65 | 66 | 67 | -------------------------------------------------------------------------------- /public/js/js.cookie.min.js: -------------------------------------------------------------------------------- 1 | /*! js-cookie v3.0.1 | MIT */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t 9 | 10 | {{-- COLUMN header--}} 11 |
12 | 13 | Test Run {{$testRun->title}} 14 | 15 | 16 | @can('add_edit_test_runs') 17 | 20 | 21 | 22 | @endcan 23 | 24 |
25 | 26 |
27 | @include('test_run.chart') 28 |
29 | 30 |
31 | {{-- @include('test_run.tree')--}} 32 | @include('test_run.test_cases_list') 33 |
34 | 35 | 36 | 37 | 38 |
39 | 40 |
41 | Select Test Case 42 |
43 | 44 |
45 | 46 | @endsection 47 | 48 | @section('footer') 49 | 50 | 51 | 52 | 55 | 56 | @endsection 57 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /resources/views/test_run/create_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 |
8 | 9 |
10 |

11 | Add Test Run 12 |

13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 | @csrf 21 | 22 | 23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 | 38 |
39 | 40 | 41 | 42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 | @endsection 52 | 53 | 54 | -------------------------------------------------------------------------------- /resources/views/layout/sidebar_nav.blade.php: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 16 | 17 | 32 | 33 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /resources/views/project/create_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 | 8 |
9 | 10 |
11 |

12 | Create Project 13 |

14 |
15 | 16 | @if ($errors->any()) 17 |
18 | Whoops! There were some problems with your input.

19 |
    20 | @foreach ($errors->all() as $error) 21 |
  • {{ $error }}
  • 22 | @endforeach 23 |
24 |
25 | @endif 26 | 27 |
28 |
29 | 30 | @csrf 31 | 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 | 42 | 45 | 46 | 47 | Cancel 48 | 49 |
50 |
51 | 52 | 53 | @endsection 54 |
55 | 56 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /resources/views/test_plan/tree_item.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 8 |
9 | 10 |
11 | 12 | {{$testSuite->title}} 13 |
14 |
15 | 16 |
17 | @foreach($testSuite->testCases->sortBy('order') as $testCase) 18 | 19 |
20 |
21 |
22 | 25 |
26 | 27 |
28 | @if($testCase->automated) 29 | 30 | @else 31 | 32 | @endif 33 | {{$prefix}}-{{$testCase->id}} 34 | {{$testCase->title}} 35 |
36 |
37 |
38 | 39 | @endforeach 40 |
41 | 42 | @foreach($testSuite->children as $testSuite) 43 | @include('test_plan.tree_item') 44 | @endforeach 45 | 46 |
47 | 48 | -------------------------------------------------------------------------------- /resources/views/test_run/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 |
8 | 9 |
10 |

11 | Test Runs 12 | 13 | @can('add_edit_test_runs') 14 | id)}}"> 15 | 17 | 18 | @endcan 19 | 20 |

21 |
22 | 23 |
24 | @foreach($testRuns as $testRun) 25 | 26 |
27 |
28 | 29 |
30 | 35 | 36 |
37 | {{$testRun->created_at->format('d-m-Y H:i')}} 39 |
40 |
41 | 42 |
43 | 44 | 45 | @include('test_run.chart') 46 | 47 |
48 | 49 |
50 |
51 | @endforeach 52 |
53 | 54 | 55 |
56 | @endsection 57 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 46 | 47 | $this->mapWebRoutes(); 48 | 49 | // 50 | } 51 | 52 | /** 53 | * Define the "web" routes for the application. 54 | * 55 | * These routes all receive session state, CSRF protection, etc. 56 | * 57 | * @return void 58 | */ 59 | protected function mapWebRoutes() 60 | { 61 | Route::middleware('web') 62 | ->namespace($this->namespace) 63 | ->group(base_path('routes/web.php')); 64 | } 65 | 66 | /** 67 | * Define the "api" routes for the application. 68 | * 69 | * These routes are typically stateless. 70 | * 71 | * @return void 72 | */ 73 | protected function mapApiRoutes() 74 | { 75 | Route::prefix('api') 76 | ->middleware('api') 77 | ->namespace($this->namespace) 78 | ->group(base_path('routes/api.php')); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^8.1", 12 | "ext-dom": "*", 13 | "ext-json": "*", 14 | "ext-libxml": "*", 15 | "guzzlehttp/guzzle": "^7.0.1", 16 | "laravel/framework": "^11.0", 17 | "laravel/tinker": "^2.5", 18 | "spatie/laravel-permission": "^6.9", 19 | "staudenmeir/laravel-adjacency-list": "^1.0" 20 | }, 21 | "require-dev": { 22 | "barryvdh/laravel-debugbar": "^3.6", 23 | "barryvdh/laravel-ide-helper": "^3.0", 24 | "fakerphp/faker": "^1.9.1", 25 | "mockery/mockery": "^1.3.1", 26 | "phpunit/phpunit": "^10.0", 27 | "spatie/laravel-ignition": "^2.0" 28 | }, 29 | "config": { 30 | "optimize-autoloader": true, 31 | "preferred-install": "dist", 32 | "sort-packages": true 33 | }, 34 | "extra": { 35 | "laravel": { 36 | "dont-discover": [] 37 | } 38 | }, 39 | "autoload": { 40 | "psr-4": { 41 | "App\\": "app/" 42 | }, 43 | "classmap": [ 44 | "database/seeds", 45 | "database/factories" 46 | ] 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { 50 | "Tests\\": "tests/" 51 | } 52 | }, 53 | "minimum-stability": "stable", 54 | "prefer-stable": true, 55 | "scripts": { 56 | "post-autoload-dump": [ 57 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 58 | "@php artisan package:discover --ansi" 59 | ], 60 | "post-root-package-install": [ 61 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 62 | ], 63 | "post-create-project-cmd": [ 64 | "@php artisan key:generate --ansi" 65 | ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /resources/views/layout/base_layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | QaraTMS - Open Source Test Management System 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | @yield('head') 16 | 17 | 18 |
19 | @include('layout.header_nav') 20 |
21 |
22 |
23 | @yield('content') 24 |
25 |
26 | 27 | 34 | 35 | 39 | 40 | 41 | @yield('footer') 42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | volumes: 4 | database-volume: 5 | app-volume: 6 | 7 | services: 8 | nginx: 9 | build: 10 | context: . 11 | dockerfile: docker/nginx/Dockerfile 12 | restart: unless-stopped 13 | ports: 14 | - '${NGINX_PORT:-80}:80' 15 | volumes: 16 | - 'app-volume:/var/www' 17 | depends_on: 18 | - app 19 | container_name: 'nginx' 20 | 21 | app: 22 | build: 23 | context: . 24 | dockerfile: docker/app/Dockerfile 25 | restart: unless-stopped 26 | ports: 27 | - '9000:9000' 28 | volumes: 29 | - 'app-volume:/var/www' 30 | depends_on: 31 | mysqldb: 32 | condition: service_healthy 33 | environment: 34 | APP_URL: ${APP_FULL_URL:-http://localhost} 35 | DB_HOST: ${DB_CONTAINER_NAME:-mysqldb} 36 | DB_DATABASE: ${DB_NAME:-qara} 37 | DB_USERNAME: ${DB_USER:-qara} 38 | DB_PASSWORD: ${DB_PASS:-qarapass} 39 | DB_PORT: ${DB_PORT:-3306} 40 | user: 'www-data:www-data' 41 | command: sh -c "php-fpm" 42 | links: 43 | - mysqldb 44 | container_name: 'app' 45 | 46 | mysqldb: 47 | image: 'mysql:8' 48 | environment: 49 | MYSQL_DATABASE: ${DB_NAME:-qara} 50 | MYSQL_USER: ${DB_USER:-qara} 51 | MYSQL_PASSWORD: ${DB_PASS:-qarapass} 52 | MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS:-root} 53 | command: '--character-set-server=utf8 --collation-server=utf8_general_ci' 54 | restart: unless-stopped 55 | ports: 56 | - '${DB_PORT:-3306}:3306' 57 | volumes: 58 | - 'database-volume:/var/lib/mysql' 59 | healthcheck: 60 | test: mysqladmin ping -h 127.0.0.1 -u root --password=${DB_ROOT_PASS:-root} 61 | start_period: 5s 62 | interval: 5s 63 | timeout: 5s 64 | retries: 30 65 | container_name: ${DB_CONTAINER_NAME:-mysqldb} 66 | 67 | 68 | phpmyadmin: 69 | image: phpmyadmin/phpmyadmin 70 | ports: 71 | - '${PHP_MY_ADMIN_PORT:-8076}:80' 72 | restart: unless-stopped 73 | environment: 74 | PMA_HOST: ${DB_CONTAINER_NAME:-mysqldb} 75 | depends_on: 76 | - mysqldb 77 | container_name: 'phpmyadmin' 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /database/migrations/2024_07_02_124723_update_permissions_model_types.php: -------------------------------------------------------------------------------- 1 | where('model_type', 'App\User') 23 | ->update(['model_type' => 'App\Models\User']); 24 | DB::table($tableNames['model_has_roles']) 25 | ->where('model_type', 'App\User') 26 | ->update(['model_type' => 'App\Models\User']); 27 | 28 | app('cache') 29 | ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) 30 | ->forget(config('permission.cache.key')); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down(): void 39 | { 40 | $tableNames = config('permission.table_names'); 41 | 42 | if (empty($tableNames)) { 43 | throw new Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.'); 44 | } 45 | 46 | // Update the model_type from 'App\Models\User' to 'App\User' 47 | DB::table($tableNames['model_has_permissions']) 48 | ->where('model_type', 'App\Models\User') 49 | ->update(['model_type' => 'App\User']); 50 | DB::table($tableNames['model_has_roles']) 51 | ->where('model_type', 'App\Models\User') 52 | ->update(['model_type' => 'App\User']); 53 | 54 | app('cache') 55 | ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) 56 | ->forget(config('permission.cache.key')); 57 | } 58 | }; 59 | -------------------------------------------------------------------------------- /resources/views/users/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @php use App\Models\User; 2 | /** 3 | * @var User[] $users 4 | */ 5 | @endphp 6 | @extends('layout.base_layout') 7 | 8 | @section('content') 9 | 10 | @include('layout.sidebar_nav') 11 | 12 |
13 | 14 |
15 |

16 | Users 17 | 18 | @can('manage_users') 19 | 20 | 22 | 23 | @endcan 24 |

25 |
26 | 27 |
28 | @foreach($users as $user) 29 | 30 |
31 |
32 | {{$user->name}} - 33 | {{$user->email}} 34 |
35 | 36 | @can('manage_users') 37 |
38 | 39 | 40 | 41 | Edit 42 | 43 | 44 | 45 |
46 | @csrf 47 | 48 | 52 |
53 |
54 | @endcan 55 | 56 |
57 | 58 | @endforeach 59 |
60 | 61 |
62 | 63 | @endsection 64 | -------------------------------------------------------------------------------- /database/seeds/AdminSeeder.php: -------------------------------------------------------------------------------- 1 | 'Admin', 21 | 'email' => 'admin@admin.com', 22 | 'password' => Hash::make('password') 23 | ]); 24 | 25 | Permission::create(['name' => 'manage_users']); 26 | 27 | Permission::create(['name' => 'add_edit_projects']); 28 | Permission::create(['name' => 'delete_projects']); 29 | 30 | Permission::create(['name' => 'add_edit_repositories']); 31 | Permission::create(['name' => 'delete_repositories']); 32 | 33 | Permission::create(['name' => 'add_edit_test_suites']); 34 | Permission::create(['name' => 'delete_test_suites']); 35 | 36 | Permission::create(['name' => 'add_edit_test_cases']); 37 | Permission::create(['name' => 'delete_test_cases']); 38 | 39 | Permission::create(['name' => 'add_edit_test_plans']); 40 | Permission::create(['name' => 'delete_test_plans']); 41 | 42 | Permission::create(['name' => 'add_edit_test_runs']); 43 | Permission::create(['name' => 'delete_test_runs']); 44 | 45 | Permission::create(['name' => 'add_edit_documents']); 46 | Permission::create(['name' => 'delete_documents']); 47 | 48 | $adminUser->givePermissionTo([ 49 | 'manage_users', 50 | 51 | 'add_edit_projects', 52 | 'delete_projects', 53 | 54 | 'add_edit_repositories', 55 | 'delete_repositories', 56 | 57 | 'add_edit_test_suites', 58 | 'delete_test_suites', 59 | 60 | 'add_edit_test_cases', 61 | 'delete_test_cases', 62 | 63 | 'add_edit_test_plans', 64 | 'delete_test_plans', 65 | 66 | 'add_edit_test_runs', 67 | 'delete_test_runs', 68 | 69 | 'add_edit_documents', 70 | 'delete_documents' 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /database/seeds/TestSeeder.php: -------------------------------------------------------------------------------- 1 | 'Admin', 22 | 'email' => 'admin@admin.com', 23 | 'password' => Hash::make('password') 24 | ]); 25 | 26 | Permission::create(['name' => 'manage_users']); 27 | 28 | Permission::create(['name' => 'add_edit_projects']); 29 | Permission::create(['name' => 'delete_projects']); 30 | 31 | Permission::create(['name' => 'add_edit_repositories']); 32 | Permission::create(['name' => 'delete_repositories']); 33 | 34 | Permission::create(['name' => 'add_edit_test_suites']); 35 | Permission::create(['name' => 'delete_test_suites']); 36 | 37 | Permission::create(['name' => 'add_edit_test_cases']); 38 | Permission::create(['name' => 'delete_test_cases']); 39 | 40 | Permission::create(['name' => 'add_edit_test_plans']); 41 | Permission::create(['name' => 'delete_test_plans']); 42 | 43 | Permission::create(['name' => 'add_edit_test_runs']); 44 | Permission::create(['name' => 'delete_test_runs']); 45 | 46 | Permission::create(['name' => 'add_edit_documents']); 47 | Permission::create(['name' => 'delete_documents']); 48 | 49 | $adminUser->givePermissionTo([ 50 | 'manage_users', 51 | 52 | 'add_edit_projects', 53 | 'delete_projects', 54 | 55 | 'add_edit_repositories', 56 | 'delete_repositories', 57 | 58 | 'add_edit_test_suites', 59 | 'delete_test_suites', 60 | 61 | 'add_edit_test_cases', 62 | 'delete_test_cases', 63 | 64 | 'add_edit_test_plans', 65 | 'delete_test_plans', 66 | 67 | 'add_edit_test_runs', 68 | 'delete_test_runs', 69 | 70 | 'add_edit_documents', 71 | 'delete_documents' 72 | ]); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /app/Models/Project.php: -------------------------------------------------------------------------------- 1 | hasMany(Repository::class, 'project_id', 'id'); 15 | } 16 | 17 | public function testPlans() 18 | { 19 | return $this->hasMany(TestPlan::class, 'project_id', 'id'); 20 | } 21 | 22 | public function documents() 23 | { 24 | return $this->hasMany(Document::class, 'project_id', 'id'); 25 | } 26 | 27 | 28 | // Count Methods 29 | 30 | public function repositoriesCount() 31 | { 32 | return $this->repositories->count(); 33 | } 34 | 35 | public function suitesCount() 36 | { 37 | $repositoryIds = Repository::where('project_id', $this->id)->pluck('id')->toArray(); 38 | return Suite::whereIn('repository_id', $repositoryIds)->count(); 39 | } 40 | 41 | public function casesCount() 42 | { 43 | $repositoryIds = Repository::where('project_id', $this->id)->pluck('id')->toArray(); 44 | $suiteIds = Suite::whereIn('repository_id', $repositoryIds)->pluck('id')->toArray(); 45 | return TestCase::whereIn('suite_id', $suiteIds)->count(); 46 | } 47 | 48 | public function automatedCasesCount() 49 | { 50 | $repositoryIds = Repository::where('project_id', $this->id)->pluck('id')->toArray(); 51 | $suiteIds = Suite::whereIn('repository_id', $repositoryIds)->pluck('id')->toArray(); 52 | return TestCase::whereIn('suite_id', $suiteIds)->where('automated', true)->count(); 53 | } 54 | 55 | public function testPlansCount() 56 | { 57 | return TestPlan::where('project_id', $this->id)->count(); 58 | } 59 | 60 | public function testRunsCount() 61 | { 62 | return TestRun::where('project_id', $this->id)->count(); 63 | } 64 | 65 | public function documentsCount() 66 | { 67 | return Document::where('project_id', $this->id)->count(); 68 | } 69 | 70 | public function getAutomationPercent() 71 | { 72 | 73 | $totalCases = $this->casesCount(); 74 | $automatedCases = $this->automatedCasesCount(); 75 | 76 | if ($totalCases <= 0 || $automatedCases <= 0) { 77 | return 0; 78 | } 79 | 80 | $result = ($automatedCases * 100) / $totalCases; 81 | return round($result, 1); 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /resources/views/repository/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @php use App\Models\Project;use App\Models\Repository; 2 | /** 3 | * @var Repository[] $repositories 4 | * @var Project $project 5 | */ 6 | @endphp 7 | @extends('layout.base_layout') 8 | 9 | @section('content') 10 | 11 | @include('layout.sidebar_nav') 12 | 13 | 14 |
15 | 16 |
17 |

18 | Repositories 19 | 20 | @can('add_edit_repositories') 21 | id)}}"> 22 | 24 | 25 | @endcan 26 |

27 |
28 | 29 | 30 |
31 | @foreach($repositories as $repository) 32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 | {{$repository->title}} 41 |
42 | 43 | @if($repository->description) 44 |
45 | {{$repository->description}} 46 |
47 | @endif 48 |
49 | 50 |
51 | 52 | {{ $repository->suitesCount() }} Test Suites 53 | | {{ $repository->casesCount() }} Test Cases 54 | | {{ $repository->automatedCasesCount() }} Automated 55 | 56 |
57 | 58 |
59 |
60 | 61 | @endforeach 62 |
63 | 64 |
65 | 66 | @endsection 67 | 68 | 69 | -------------------------------------------------------------------------------- /resources/views/docs/edit_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('head') 4 | 5 | 6 | @endsection 7 | 8 | @section('content') 9 | 10 | @include('layout.sidebar_nav') 11 | 12 |
13 | 14 |
15 |

16 | Edit Document 17 |

18 |
19 | 20 |
21 |
22 | @csrf 23 | 24 | 25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 53 | 54 | 55 | Cancel 56 | 57 | 58 | 59 |
60 |
61 | 62 |
63 | 64 | @endsection 65 | 66 | 67 | @section('footer') 68 | 77 | @endsection 78 | -------------------------------------------------------------------------------- /resources/views/repository/create_page.blade.php: -------------------------------------------------------------------------------- 1 | @php use App\Models\Project;use Illuminate\Support\MessageBag; 2 | /** 3 | * @var Project $project 4 | * @var MessageBag $errors 5 | */ 6 | @endphp 7 | @extends('layout.base_layout') 8 | 9 | @section('content') 10 | 11 | @include('layout.sidebar_nav') 12 | 13 |
14 | 15 |
16 |

17 | Add Test Repository 18 |

19 |
20 | 21 | @if ($errors->any()) 22 |
23 | Whoops! There were some problems with your input.

24 |
    25 | @foreach ($errors->all() as $error) 26 |
  • {{ $error }}
  • 27 | @endforeach 28 |
29 |
30 | @endif 31 | 32 |
33 |
34 | @csrf 35 | 36 | 37 | 38 |
39 | 40 | 41 |
42 | 43 |
44 | 46 | 50 |
51 | 52 |
53 | 54 | 55 |
56 | 57 | 60 | 61 | 62 | Cancel 63 | 64 |
65 |
66 | 67 |
68 | 69 | @endsection 70 | 71 | -------------------------------------------------------------------------------- /resources/views/test_run/edit_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 |
8 | 9 |
10 | 11 |

12 | Edit Test Run 13 | 14 | {{$testRun->title}} 15 |

16 | 17 |
18 | @can('delete_test_runs') 19 |
20 | @csrf 21 | 22 | 23 | 24 | 28 |
29 | @endcan 30 |
31 | 32 |
33 | 34 | @if ($errors->any()) 35 |
36 | Whoops! There were some problems with your input.

37 |
    38 | @foreach ($errors->all() as $error) 39 |
  • {{ $error }}
  • 40 | @endforeach 41 |
42 |
43 | @endif 44 | 45 |
46 |
47 | @csrf 48 | 49 | 50 | 51 | 52 |
53 | 54 | 56 |
57 | 58 | 59 | 62 | 63 | 64 | Cancel 65 | 66 |
67 |
68 | 69 | 70 |
71 | 72 | @endsection 73 | 74 | -------------------------------------------------------------------------------- /resources/views/repository/test_cases_list.blade.php: -------------------------------------------------------------------------------- 1 | @php use App\Enums\CasePriority;use App\Models\Repository;use App\Models\TestCase; 2 | /** 3 | * @var TestCase[] $testCases 4 | * @var Repository $repository 5 | */ 6 | @endphp 7 | @foreach($testCases as $testCase) 8 | 9 |
11 | 12 |
14 |
15 | 16 | @if($testCase->priority == CasePriority::MEDIUM) 17 | 18 | @elseif($testCase->priority == CasePriority::HIGH) 19 | 20 | @else 21 | 22 | @endif 23 | 24 | 25 | @if($testCase->automated) 26 | 27 | @else 28 | 29 | @endif 30 | 31 | 32 | 33 | {{$repository->prefix}} 34 | -{{$testCase->id}} 35 | 36 | 37 | {{-- --}} 40 | 41 |
42 | 43 |
44 | {{$testCase->title}} 45 |
46 |
47 | 48 |
49 | @can('add_edit_test_cases') 50 | 54 | @endcan 55 | 56 | @can('delete_test_cases') 57 | 60 | @endcan 61 |
62 | 63 |
64 | 65 | @endforeach 66 | -------------------------------------------------------------------------------- /resources/views/test_run/tree_item.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 | {{$testSuite->title}} 7 |
8 |
9 | 10 |
11 | @foreach($testSuite->testCases->sortBy('order') as $testCase) 12 | 13 | @if( in_array($testCase->id, $testCasesIds) ) 14 | 15 |
17 | 18 |
19 | 20 |
21 | @if($testCase->automated) 22 | 23 | @else 24 | 25 | @endif 26 | {{$repository->prefix}}-{{$testCase->id}} 27 | {{$testCase->title}} 28 |
29 | 30 |
31 | 32 | @if(isset($results[$testCase->id])) 33 | @if($results[$testCase->id] == \App\Enums\TestRunCaseStatus::NOT_TESTED) 34 | Not Tested 35 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::PASSED) 36 | Passed 37 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::FAILED) 38 | Failed 39 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::BLOCKED) 40 | Blocked 41 | @endif 42 | 43 | @else 44 | Not Tested 45 | @endif 46 |
47 |
48 | 49 |
50 | 51 | @endif 52 | @endforeach 53 |
54 | 55 | @foreach($testSuite->children as $testSuite) 56 | @include('test_run.tree_item') 57 | @endforeach 58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /resources/views/project/edit_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 |
8 |
9 | 10 |

Edit Project 11 | 12 | {{$project->title}} 13 |

14 | 15 |
16 | @can('delete_projects') 17 |
18 | @csrf 19 | 20 | 21 | 25 |
26 | @endcan 27 |
28 | 29 |
30 | 31 | 32 | @if ($errors->any()) 33 |
34 | Whoops! There were some problems with your input.

35 |
    36 | @foreach ($errors->all() as $error) 37 |
  • {{ $error }}
  • 38 | @endforeach 39 |
40 |
41 | @endif 42 | 43 |
44 |
45 | 46 | @csrf 47 | 48 | 49 |
50 | 51 | 53 |
54 | 55 |
56 | 57 | 59 |
60 | 61 |
62 | 65 | 66 | 67 | Cancel 68 | 69 |
70 | 71 |
72 |
73 |
74 | 75 | @endsection 76 | 77 | -------------------------------------------------------------------------------- /resources/views/layout/header_nav.blade.php: -------------------------------------------------------------------------------- 1 | 48 | -------------------------------------------------------------------------------- /app/Models/TestRun.php: -------------------------------------------------------------------------------- 1 | status] 18 | */ 19 | public function getResults() 20 | { 21 | return (array) json_decode($this->data); 22 | } 23 | 24 | /* 25 | * $results is array [case_id => status] 26 | */ 27 | public function saveResults($results) 28 | { 29 | $this->data = json_encode($results); 30 | $this->save(); 31 | } 32 | 33 | public function getInitialData() 34 | { 35 | $testPlan = TestPlan::findOrFail($this->test_plan_id); 36 | $testCasesIds = explode(',', $testPlan->data); 37 | 38 | $testRunData = []; 39 | 40 | foreach ($testCasesIds as $testCaseId) { 41 | $testRunData[$testCaseId] = TestRunCaseStatus::NOT_TESTED; 42 | } 43 | return json_encode($testRunData); 44 | } 45 | 46 | public function getChartData() 47 | { 48 | $results = $this->getResults(); 49 | 50 | $totalTestCases = count($results) != 0 ? count($results) : 1; 51 | $passed = 0; 52 | $failed = 0; 53 | $blocked = 0; 54 | $notTested = 0; 55 | 56 | foreach ($results as $testCaseId => $status) { 57 | 58 | if ($status == TestRunCaseStatus::PASSED) { 59 | $passed++; 60 | } elseif ($status == TestRunCaseStatus::FAILED) { 61 | $failed++; 62 | } elseif ($status == TestRunCaseStatus::BLOCKED) { 63 | $blocked++; 64 | } elseif ($status == TestRunCaseStatus::NOT_TESTED) { 65 | $notTested++; 66 | } 67 | 68 | } 69 | 70 | // [number, percent] 71 | $chartData = [ 72 | 'passed' => [$passed, (100 / $totalTestCases) * $passed], 73 | 'failed' => [$failed, (100 / $totalTestCases) * $failed], 74 | 'blocked' => [$blocked, (100 / $totalTestCases) * $blocked], 75 | 'not_tested' => [$notTested, (100 / $totalTestCases) * $notTested], 76 | ]; 77 | 78 | return $chartData; 79 | } 80 | 81 | 82 | public function removeDeletedCasesFromResults() 83 | { 84 | $currentResults = $this->getResults(); 85 | $planTestCasesIds = array_keys($this->getResults()); 86 | 87 | $existingCasesIds = TestCase::whereIn('id', $planTestCasesIds)->get()->pluck('id')->toArray(); 88 | 89 | foreach ($planTestCasesIds as $planTestCaseId) { 90 | 91 | if (false == in_array($planTestCaseId, $existingCasesIds)) { 92 | unset($currentResults[$planTestCaseId]); 93 | } 94 | } 95 | 96 | $this->saveResults($currentResults); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | 'endpoint' => env('AWS_ENDPOINT'), 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Symbolic Links 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Here you may configure the symbolic links that will be created when the 76 | | `storage:link` Artisan command is executed. The array keys should be 77 | | the locations of the links and the values should be their targets. 78 | | 79 | */ 80 | 81 | 'links' => [ 82 | public_path('storage') => storage_path('app/public'), 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 54 | EncryptCookies::class, 55 | AddQueuedCookiesToResponse::class, 56 | StartSession::class, 57 | ShareErrorsFromSession::class, 58 | VerifyCsrfToken::class, 59 | SubstituteBindings::class, 60 | ], 61 | 62 | 'api' => [ 63 | 'throttle:60,1', 64 | SubstituteBindings::class, 65 | ], 66 | ]; 67 | 68 | /** 69 | * The application's route middleware. 70 | * 71 | * These middleware may be assigned to groups or used individually. 72 | * 73 | * @var array 74 | */ 75 | protected $routeMiddleware = [ 76 | 'auth' => Authenticate::class, 77 | 'auth.basic' => AuthenticateWithBasicAuth::class, 78 | 'bindings' => SubstituteBindings::class, 79 | 'cache.headers' => SetCacheHeaders::class, 80 | 'can' => Authorize::class, 81 | 'guest' => RedirectIfAuthenticated::class, 82 | 'password.confirm' => RequirePassword::class, 83 | 'signed' => ValidateSignature::class, 84 | 'throttle' => ThrottleRequests::class, 85 | 'verified' => EnsureEmailIsVerified::class, 86 | ]; 87 | 88 | } 89 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /public/js/repo/repository.js: -------------------------------------------------------------------------------- 1 | /************************************************** 2 | * LOAD SCRIPTS 3 | *************************************************/ 4 | 5 | $.getScript("/js/repo/tree.js", function () { 6 | $.getScript("/js/repo/suites_tree_and_crud.js", function () { 7 | $.getScript("/js/repo/case_crud.js", function () { 8 | /************************************************** 9 | * RENDER SUITES TREE 10 | * and select first available suite 11 | * when all scripts are loaded 12 | *************************************************/ 13 | 14 | $.getScript("/js/repo/case_editor.js", function () { 15 | try { 16 | loadSuitesTree(); 17 | } catch (e) { 18 | setTimeout(function () { 19 | loadSuitesTree(); 20 | }, 1000); 21 | } 22 | }); 23 | }); 24 | }); 25 | }); 26 | 27 | /************************************************** 28 | * Click on test suite - load suite test cases 29 | *************************************************/ 30 | 31 | function loadCasesList(id) { 32 | activeTreeSuiteItem.setId(id); 33 | 34 | Cookies.set('lastSelectedSuite', id); 35 | 36 | // Add selected class 37 | $('#tree .branch-wrapper').removeClass("selected"); 38 | activeTreeSuiteItem.addSelectedClass(); 39 | 40 | $('#test_cases_list_site_title').text(activeTreeSuiteItem.getTitle()); // set title in test cases list area 41 | $('#test_cases_list').load(`/tscl/${activeTreeSuiteItem.getId()}`, function () { 42 | }); // load test cases 43 | } 44 | 45 | /************************************************** 46 | * Collapse / expand test cases list 47 | **************************************************/ 48 | function expandCasesList() { 49 | $('#test_cases_list_col').addClass('col-9').removeClass('col') 50 | } 51 | 52 | function collapseCasesList() { 53 | $('#test_cases_list_col').addClass('col').removeClass('col-9') 54 | } 55 | 56 | /************************************************** 57 | * BLOCK ANY BUTTON AFTER CLICK 58 | * to prevent ajax errors, double input 59 | **************************************************/ 60 | 61 | $("body").on('click', 'button', function () { 62 | let button = $(this).prop('disabled', true); 63 | setTimeout(function () { 64 | button.prop('disabled', false); 65 | }, 250); 66 | }); 67 | 68 | /************************************************** 69 | * Collapse / expand children 70 | **************************************************/ 71 | 72 | $('body').on("click", "#toogle_collaple_expand", function (e) { 73 | let suite_id = $(this).parent().parent().parent().parent().data('mid'); 74 | 75 | rec(suite_id) 76 | }); 77 | 78 | function rec(suite_id) { 79 | let child_li = $(`li[data-pid='${suite_id}']`); 80 | 81 | if (child_li.is(":visible")) { 82 | child_li.hide(); 83 | } else { 84 | child_li.show(); 85 | } 86 | 87 | if ($(`li[data-pid='${child_li.attr('data-mid')}']`).length > 0) { 88 | rec(child_li.attr('data-mid')) 89 | } 90 | } 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /resources/views/test_run/test_cases_list.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | @foreach($suites as $testSuite) 4 | 5 | {{-- SHOW CHILD SUITE TITLE WITH FULL PATH --}} 6 |
7 | 8 | 9 | 10 | @foreach($testSuite->ancestors()->get()->reverse() as $parent) 11 | {{$parent->title}} 12 | 13 | @endforeach 14 | 15 | {{$testSuite->title}} 16 |
17 | 18 | 19 |
20 | @foreach($testSuite->testCases->sortBy('order') as $testCase) 21 | 22 | @if( in_array($testCase->id, $testCasesIds) ) 23 | 24 |
26 | 27 |
28 | 29 |
30 | @if($testCase->automated) 31 | 32 | @else 33 | 34 | @endif 35 | {{$repository->prefix}}-{{$testCase->id}} 36 | {{$testCase->title}} 37 |
38 | 39 |
40 | 41 | @if(isset($results[$testCase->id])) 42 | @if($results[$testCase->id] == \App\Enums\TestRunCaseStatus::NOT_TESTED) 43 | Not Tested 44 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::PASSED) 45 | Passed 46 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::FAILED) 47 | Failed 48 | @elseif($results[$testCase->id] == \App\Enums\TestRunCaseStatus::BLOCKED) 49 | Blocked 50 | @endif 51 | 52 | @else 53 | Not Tested 54 | @endif 55 |
56 |
57 | 58 |
59 | 60 | @endif 61 | @endforeach 62 |
63 | 64 | @endforeach 65 | 66 |
67 | -------------------------------------------------------------------------------- /resources/views/docs/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 | 8 |
9 | 10 |
11 |

12 | Documents 13 | 14 | @can('add_edit_documents') 15 | id)}}"> 16 | 18 | 19 | @endcan 20 |

21 |
22 | 23 |
24 | 25 |
29 | 30 |
31 | Table of Contents 32 |
33 | 34 | 35 |
36 | @foreach($documents as $document) 37 | @include('docs.tree_item') 38 | @endforeach 39 |
40 | 41 |
42 | 43 | 44 | @if(isset($selectedDocument)) 45 |
46 | 47 |
48 |
49 | {{$selectedDocument->title}} 50 |
51 | 52 |
53 | @can('add_edit_documents') 54 | 56 | 57 | 58 | @endcan 59 | 60 | 61 | @can('delete_documents') 62 |
63 | @csrf 64 | 65 | 66 | 69 |
70 | @endcan 71 |
72 | 73 | 74 |
75 | 76 |
77 | {!! $selectedDocument->content !!} 78 |
79 |
80 | @endif 81 | 82 |
83 | 84 |
85 | 86 | @endsection 87 | 88 | 89 | -------------------------------------------------------------------------------- /resources/views/auth/login_page.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | QaraTMS - Login 8 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 | 18 |
19 | logo 20 |
21 | 22 |
23 |
24 |

Login

25 | 26 | @if ($errors->any()) 27 |
28 |
29 | @foreach ($errors->all() as $error) 30 | {{ $error }} 31 | @endforeach 32 |
33 |
34 | @endif 35 | 36 |
37 | @csrf 38 | 39 |
40 | 43 |
44 | 45 |
46 | 48 |
49 | 50 |
51 |
52 | 55 |
56 | 59 |
60 |
61 |
62 | 63 | 64 |
65 | 66 |
67 | Copyright © 2022 - {{ now()->year }} — QaraTMS 68 |
69 |
70 |
71 |
72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => 'debug', 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => 'debug', 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => 'critical', 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => 'debug', 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => 'debug', 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => 'debug', 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /public/js/test_plan_page.js: -------------------------------------------------------------------------------- 1 | function renderPlanTree(select) { 2 | $("#tree").load(`/tpt/${select.value}`, function () { 3 | 4 | }); 5 | } 6 | 7 | function selectAllTestPlanCases() { 8 | const selectedTestCases = []; 9 | $(".test_suite_cbx, .test_case_cbx").each(function (index) { 10 | $(this).prop('checked', true) 11 | const testCaseId = $(this).attr('data-test_case_id'); 12 | // add test case ids to selectedTestCases 13 | if (testCaseId !== undefined) { 14 | selectedTestCases.push(testCaseId); 15 | } 16 | }); 17 | $('#test_plan_data').val(selectedTestCases); 18 | } 19 | 20 | function deselectAllTestPlanCases() { 21 | $(".test_suite_cbx, .test_case_cbx").each(function () { 22 | $(this).prop('checked', false); 23 | }); 24 | $('#test_plan_data').val(''); 25 | } 26 | 27 | /**************************************************************************** 28 | CHECKBOXES 29 | ****************************************************************************/ 30 | 31 | $(document).ready(function () { 32 | $("body").on("change", ".test_suite_cbx, .test_case_cbx", function () { 33 | if ($(this).hasClass("test_suite_cbx")) { 34 | // go up to the tree_suite element and update all children to the new value 35 | $(this) 36 | .closest(".tree_suite") 37 | .find(".test_suite_cbx, .test_case_cbx") 38 | .prop("checked", $(this).prop("checked")); 39 | } 40 | // update the parent suite(s) state 41 | updateParentSuites($(this)); 42 | 43 | updateFormDataField(); 44 | }); 45 | 46 | /** 47 | * Recursive function that updates all parent suites of a test suite or test case. 48 | * 49 | * @param $element - jQuery Element of test suite or test case checkbox 50 | */ 51 | function updateParentSuites($element) { 52 | // check, if we are on a test suite checkbox and get parent 53 | const parentTestSuiteId = $element.hasClass("test_suite_cbx") ? 54 | $element.attr("data-parent_id") : 55 | $element.attr("data-test_suite_id"); 56 | if (parentTestSuiteId) { 57 | const $parentTestSuite = $(`.test_suite_cbx[data-test_suite_id=${parentTestSuiteId}]`) 58 | const childTestSuiteSelector = `.test_suite_cbx[data-parent_id=${parentTestSuiteId}]`; 59 | const childTestCaseSelector = `.test_case_cbx[data-test_suite_id=${parentTestSuiteId}]`; 60 | // check if all children are selected 61 | const allChildrenChecked = $parentTestSuite 62 | .closest(".tree_suite") 63 | .find([childTestSuiteSelector, childTestCaseSelector].join()) 64 | .toArray() 65 | .every(function (childElement) { 66 | // normal DOM element, not jQuery element 67 | return childElement.checked; 68 | }); 69 | $parentTestSuite.prop("checked", allChildrenChecked); 70 | // continue with parent 71 | updateParentSuites($parentTestSuite); 72 | } 73 | } 74 | 75 | function updateFormDataField() { 76 | const selected = []; 77 | $('input.test_case_cbx:checked').each(function () { 78 | selected.push($(this).attr('data-test_case_id')); 79 | }); 80 | $('#test_plan_data').val(selected); 81 | } 82 | }); 83 | -------------------------------------------------------------------------------- /resources/views/test_plan/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('content') 4 | 5 | @include('layout.sidebar_nav') 6 | 7 | 8 |
9 | 10 |
11 |

12 | Test Plans 13 | 14 | @can('add_edit_test_plans') 15 | id)}}"> 16 | 18 | 19 | @endcan 20 |

21 |
22 | 23 |
24 | @foreach($testPlans as $testPlan) 25 | 26 |
27 |
28 | 29 |
30 |
31 |

{{$testPlan->title}}

32 |
33 | 34 |
35 | 36 | @if($testPlan->data) 37 | {{count(explode("," , $testPlan->data))}} 38 | @else 39 | 0 40 | @endif test cases 41 | | 42 | {{$testPlan->created_at->format('d-m-Y')}} 44 |
45 |
46 | 47 | @if($testPlan->description) 48 |
49 | {{$testPlan->description}} 50 |
51 | @endif 52 | 53 | 54 |
55 |
56 | 57 | @can('add_edit_test_runs') 58 | 60 | 61 | Start new test run 62 | 63 | @endcan 64 | 65 | @can('add_edit_test_plans') 66 | id, $testPlan->id]) }}" 67 | class="btn btn-sm btn-outline-dark mx-3"> 68 | 69 | Edit 70 | 71 | @endcan 72 |
73 |
74 | 75 |
76 |
77 | @endforeach 78 |
79 | 80 |
81 | 82 | @endsection 83 | 84 | -------------------------------------------------------------------------------- /app/Http/Controllers/ProjectController.php: -------------------------------------------------------------------------------- 1 | with('projects', $projects); 20 | } 21 | 22 | public function create() 23 | { 24 | if (!auth()->user()->can('add_edit_projects')) { 25 | abort(403); 26 | } 27 | 28 | return view('project.create_page'); 29 | } 30 | 31 | public function show($id) 32 | { 33 | $project = Project::findOrFail($id); 34 | $testRuns = TestRun::where('project_id', $project->id)->orderBy('created_at', 'DESC')->get(); 35 | $repositories = $project->repositories; 36 | 37 | return view('project.show_page') 38 | ->with('project', $project) 39 | ->with('testRuns', $testRuns) 40 | ->with('repositories', $repositories); 41 | } 42 | 43 | public function edit($id) 44 | { 45 | if (!auth()->user()->can('add_edit_projects')) { 46 | abort(403); 47 | } 48 | 49 | $project = Project::findOrFail($id); 50 | return view('project.edit_page') 51 | ->with('project', $project); 52 | } 53 | 54 | /***************************************** 55 | * CRUD 56 | *****************************************/ 57 | 58 | public function store(Request $request) 59 | { 60 | if (!auth()->user()->can('add_edit_projects')) { 61 | abort(403); 62 | } 63 | 64 | $request->validate([ 65 | 'title' => 'required', 66 | ]); 67 | 68 | $project = new Project(); 69 | 70 | $project->title = $request->title; 71 | $project->description = $request->description; 72 | 73 | $project->save(); 74 | 75 | // create default test repository 76 | $repository = new Repository(); 77 | $repository->project_id = $project->id; 78 | $repository->title = "Default"; 79 | $repository->prefix = "D"; 80 | $repository->description = "Default Test Repository. Test suites and test cases are located here"; 81 | $repository->save(); 82 | 83 | 84 | return redirect()->route('project_show_page', $project->id); 85 | } 86 | 87 | public function update(Request $request) 88 | { 89 | if (!auth()->user()->can('add_edit_projects')) { 90 | abort(403); 91 | } 92 | 93 | $project = Project::findOrFail($request->id); 94 | 95 | $project->title = $request->title; 96 | $project->description = $request->description; 97 | 98 | $project->save(); 99 | 100 | return redirect()->route('project_show_page', $project->id); 101 | } 102 | 103 | public function destroy(Request $request) 104 | { 105 | if (!auth()->user()->can('delete_projects')) { 106 | abort(403); 107 | } 108 | 109 | $project = Project::findOrFail($request->id); 110 | $project->delete(); 111 | return redirect()->route('project_list_page'); 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | ], 50 | 51 | 'file' => [ 52 | 'driver' => 'file', 53 | 'path' => storage_path('framework/cache/data'), 54 | ], 55 | 56 | 'memcached' => [ 57 | 'driver' => 'memcached', 58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 59 | 'sasl' => [ 60 | env('MEMCACHED_USERNAME'), 61 | env('MEMCACHED_PASSWORD'), 62 | ], 63 | 'options' => [ 64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 65 | ], 66 | 'servers' => [ 67 | [ 68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 69 | 'port' => env('MEMCACHED_PORT', 11211), 70 | 'weight' => 100, 71 | ], 72 | ], 73 | ], 74 | 75 | 'redis' => [ 76 | 'driver' => 'redis', 77 | 'connection' => 'cache', 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Cache Key Prefix 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When utilizing a RAM based store such as APC or Memcached, there might 97 | | be other applications utilizing the same cache. So, we'll specify a 98 | | value to get prefixed to all our keys so we can avoid collisions. 99 | | 100 | */ 101 | 102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /resources/views/docs/create_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | 3 | @section('head') 4 | 5 | 6 | @endsection 7 | 8 | @section('content') 9 | 10 | @include('layout.sidebar_nav') 11 | 12 |
13 | 14 |
15 |

16 | Add Document 17 |

18 |
19 | 20 | 21 |
22 |
23 | @csrf 24 | 25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | Cancel 55 | 56 |
57 |
58 | 59 | 60 |
61 | 62 | @endsection 63 | 64 | 65 | @section('footer') 66 | 102 | 103 | @endsection 104 | -------------------------------------------------------------------------------- /resources/views/repository/edit_page.blade.php: -------------------------------------------------------------------------------- 1 | @php use App\Models\Repository;use Illuminate\Support\MessageBag; 2 | /** 3 | * @var Repository $repository 4 | * @var MessageBag $errors 5 | */ 6 | @endphp 7 | @extends('layout.base_layout') 8 | 9 | @section('content') 10 | 11 | @include('layout.sidebar_nav') 12 | 13 |
14 | 15 |
16 | 17 |

18 | {{$repository->title}} 19 | 20 | Edit Repository 21 |

22 | 23 |
24 | @can('delete_repositories') 25 |
26 | @csrf 27 | 28 | 29 | 30 | 34 |
35 | @endcan 36 |
37 | 38 |
39 | 40 | @if ($errors->any()) 41 |
42 | Whoops! There were some problems with your input.

43 |
    44 | @foreach ($errors->all() as $error) 45 |
  • {{ $error }}
  • 46 | @endforeach 47 |
48 |
49 | @endif 50 | 51 |
52 |
53 | @csrf 54 | 55 | 56 | 57 | 58 |
59 | 60 | 62 |
63 | 64 |
65 | 67 | 72 |
73 | 74 |
75 | 76 | 78 |
79 | 80 | 81 | 84 | 85 | 86 | Cancel 87 | 88 |
89 |
90 | 91 | 92 |
93 | 94 | @endsection 95 | 96 | -------------------------------------------------------------------------------- /public/js/test_run.js: -------------------------------------------------------------------------------- 1 | let currentCase; 2 | testCaseAreaLocator = '#test_case_col' 3 | chartAreaLocator = '#chart' 4 | 5 | function loadTestCase(test_run_id, test_case_id) { 6 | $(testCaseAreaLocator).load(`/trc/${test_run_id}/${test_case_id}`, function () { 7 | 8 | }); 9 | } 10 | 11 | function loadChart(test_run_id) { 12 | $(chartAreaLocator).load(`/trchart/${test_run_id}`, function () { 13 | 14 | }); 15 | } 16 | 17 | /* 18 | const PASSED = 1; 19 | const FAILED = 2; 20 | const BLOCKED = 3; 21 | const NOT_TESTED = 4; 22 | */ 23 | function updateCaseStatus(test_run_id, test_case_id, status) { 24 | 25 | $.ajax({ 26 | type: "POST", 27 | url: "/trcs", 28 | data: { 29 | 'test_run_id': test_run_id, 30 | 'test_case_id': test_case_id, 31 | 'status': status 32 | }, 33 | 34 | success: function (data) { // response is case html and json 35 | 36 | if (status == 1) { 37 | $(`.result_badge[data-test_case_id='${test_case_id}']`).html('Passed'); 38 | } else if (status == 2) { 39 | $(`.result_badge[data-test_case_id='${test_case_id}']`).html('Failed'); 40 | } else if (status == 3) { 41 | $(`.result_badge[data-test_case_id='${test_case_id}']`).html('Blocked'); 42 | } else if (status == 4) { 43 | $(`.result_badge[data-test_case_id='${test_case_id}']`).html('Not Tested'); 44 | } 45 | 46 | loadChart(test_run_id); // reload chart 47 | 48 | $(".badge.bg-secondary").first().click(); // select next untested case 49 | } 50 | }); 51 | } 52 | 53 | /* 54 | const PASSED = 1; 55 | const FAILED = 2; 56 | const BLOCKED = 3; 57 | const NOT_TESTED = 4; 58 | */ 59 | 60 | $('body').on('click', '.test_run_case_btn', function () { 61 | 62 | let status = $(this).attr('data-status'); 63 | let test_run_id = $(this).attr('data-test_run_id'); 64 | 65 | console.log(status) 66 | 67 | $('.test_run_case_btn').each(function () { 68 | 69 | let status = $(this).attr('data-status'); 70 | 71 | if (status == 1) { 72 | $(this).removeClass("btn-success"); 73 | $(this).addClass("btn-outline-success"); 74 | } else if (status == 2) { 75 | $(this).removeClass("btn-danger"); 76 | $(this).addClass("btn-outline-danger"); 77 | } else if (status == 3) { 78 | $(this).removeClass("btn-warning"); 79 | $(this).addClass("btn-outline-warning"); 80 | } else if (status == 4) { 81 | $(this).removeClass("btn-secondary"); 82 | $(this).addClass("btn-outline-secondary"); 83 | } 84 | 85 | }); 86 | 87 | if (status == 1) { 88 | $(this).removeClass("btn-outline-success"); 89 | $(this).addClass("btn-success"); 90 | } else if (status == 2) { 91 | $(this).removeClass("btn-outline-danger"); 92 | $(this).addClass("btn-danger"); 93 | } else if (status == 3) { 94 | $(this).removeClass("btn-outline-warning"); 95 | $(this).addClass("btn-warning"); 96 | } else if (status == 4) { 97 | $(this).removeClass("btn-outline-secondary"); 98 | $(this).addClass("btn-secondary"); 99 | } 100 | 101 | }); 102 | 103 | 104 | $('body').on('click', '.tree_test_case', function () { 105 | 106 | $('.tree_test_case.selected_case').removeClass("selected_case"); 107 | 108 | $(this).addClass('selected_case'); 109 | }) 110 | -------------------------------------------------------------------------------- /resources/views/test_case/show_overlay.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 7 |
8 | 9 | @if($testCase->priority == \App\Enums\CasePriority::LOW) 10 | 11 | @elseif($testCase->priority == \App\Enums\CasePriority::MEDIUM) 12 | 13 | @elseif($testCase->priority == \App\Enums\CasePriority::HIGH) 14 | 15 | @endif 16 | 17 | 18 | @if($testCase->automated) 19 | 20 | @else 21 | 22 | @endif 23 | 24 | 25 | 26 | 27 | {{$repository->prefix}}-{{$testCase->id}} 28 | 29 | 30 | 31 |
32 | 33 | 34 | 35 |
36 |
{{$testCase->title}}
37 |
38 | 39 | 42 | 43 | 44 |
45 | 46 |
47 |
48 | 49 | @if(isset( $data->preconditions) && !empty($data->preconditions) ) 50 | Preconditions 51 | 52 |
53 |
54 | {!! $data->preconditions !!} 55 |
56 |
57 | @endif 58 | 59 | @if(isset($data->steps) && !empty($data->steps)) 60 | Steps 61 | 62 |
63 | 64 |
65 |
66 | Action 67 |
68 |
69 | Expected result 70 |
71 |
72 | 73 | @foreach($data->steps as $id => $step) 74 |
75 | 76 |
77 |
78 | @if(isset($step->action)) 79 | {!! $step->action !!} 80 | @endif 81 |
82 |
83 | 84 |
85 |
86 | @if(isset($step->result)) 87 | {!! $step->result !!} 88 | @endif 89 |
90 |
91 |
92 | @endforeach 93 |
94 | 95 | @else 96 |

No additional details available.

97 | @endif 98 | 99 |
100 |
101 | 102 |
103 | 104 | 105 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | ], 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Global "From" Address 78 | |-------------------------------------------------------------------------- 79 | | 80 | | You may wish for all e-mails sent by your application to be sent from 81 | | the same address. Here, you may specify a name and address that is 82 | | used globally for all e-mails that are sent by your application. 83 | | 84 | */ 85 | 86 | 'from' => [ 87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 88 | 'name' => env('MAIL_FROM_NAME', 'Example'), 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Markdown Mail Settings 94 | |-------------------------------------------------------------------------- 95 | | 96 | | If you are using Markdown based email rendering, you may configure your 97 | | theme and component paths here, allowing you to customize the design 98 | | of the emails. Or, you may simply stick with the Laravel defaults! 99 | | 100 | */ 101 | 102 | 'markdown' => [ 103 | 'theme' => 'default', 104 | 105 | 'paths' => [ 106 | resource_path('views/vendor/mail'), 107 | ], 108 | ], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /resources/views/project/list_page.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.base_layout') 2 | @section('content') 3 | @include('layout.sidebar_nav') 4 |
5 |
6 |

7 | {{ __('Projects') }} 8 | @can('add_edit_projects') 9 | 10 | 13 | 14 | @endcan 15 |

16 |
17 |
18 | @foreach($projects as $project) 19 |
20 |
21 |
22 |
23 | id)}}">{{$project->title}} 25 |
26 |

{{$project->description}}

27 |
28 | 67 |
68 |
69 | @endforeach 70 |
71 |
72 | @endsection 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/TestSuiteController.php: -------------------------------------------------------------------------------- 1 | user()->can('add_edit_test_suites')) { 19 | abort(403); 20 | } 21 | 22 | $testSuite = Suite::findOrFail($request->id); 23 | $testSuite->parent_id = $request->parent_id; 24 | $testSuite->save(); 25 | } 26 | 27 | public function updateOrder(Request $request) 28 | { 29 | if (!auth()->user()->can('add_edit_test_suites')) { 30 | abort(403); 31 | } 32 | 33 | foreach ($request->order as $data) { 34 | $testSuite = Suite::findOrFail($data['id']); 35 | $testSuite->order = $data['order']; 36 | $testSuite->save(); 37 | } 38 | } 39 | 40 | public function loadEditor($operation, $repository_id, $test_suite_id = null) 41 | { 42 | $repository = Repository::findOrFail($repository_id); 43 | $editableSuite = isset($test_suite_id) ? Suite::findOrFail($test_suite_id) : null; 44 | 45 | $suitesTree = Suite::where('repository_id', $repository_id)->tree()->get()->toTree(); 46 | 47 | return view('test_suite.editor') 48 | ->with('operation', $operation) 49 | ->with('repository', $repository) 50 | ->with('editableSuite', $editableSuite) 51 | ->with('suitesTree', $suitesTree); 52 | } 53 | 54 | public function loadCasesList($test_suite_id) 55 | { 56 | $suite = Suite::findOrFail($test_suite_id); 57 | $repository = Repository::findOrFail($suite->repository_id); 58 | $testCases = TestCase::select('id', 'suite_id', 'title', 'automated', 'priority', 'order')->where('suite_id', 59 | $test_suite_id)->orderBy('order')->get(); 60 | 61 | return view('repository.test_cases_list') 62 | ->with('testCases', $testCases) 63 | ->with('repository', $repository); 64 | } 65 | 66 | /****************************************** 67 | * CRUD 68 | *****************************************/ 69 | 70 | public function store(Request $request) 71 | { 72 | if (!auth()->user()->can('add_edit_test_suites')) { 73 | abort(403); 74 | } 75 | 76 | $suite = new Suite(); 77 | 78 | $suite->repository_id = $request->repository_id; 79 | $suite->parent_id = $request->parent_id; 80 | $suite->title = $request->title; 81 | $suite->save(); 82 | 83 | return [ 84 | 'html' => '', 85 | 'json' => $suite->toJson() 86 | ]; 87 | } 88 | 89 | public function update(Request $request) 90 | { 91 | if (!auth()->user()->can('add_edit_test_suites')) { 92 | abort(403); 93 | } 94 | 95 | $testSuite = Suite::findOrFail($request->id); 96 | 97 | $testSuite->title = $request->title; 98 | $testSuite->save(); 99 | 100 | // TODO - add move to other repository functionality 101 | // if($request->parent_id) { 102 | // $testSuite->parent_id = $request->parent_id; 103 | // $testSuite->save(); 104 | // return redirect()->route('repository_show_page', [$request->project_id, $testSuite->repository_id]); 105 | // } 106 | } 107 | 108 | public function destroy(Request $request) 109 | { 110 | if (!auth()->user()->can('delete_test_suites')) { 111 | abort(403); 112 | } 113 | 114 | $testSuite = Suite::findOrFail($request->id); 115 | $testSuite->delete(); 116 | } 117 | 118 | 119 | } 120 | -------------------------------------------------------------------------------- /app/Http/Controllers/DocumentsController.php: -------------------------------------------------------------------------------- 1 | id)->tree()->get()->toTree(); 19 | $selectedDocument = Document::first(); 20 | 21 | return view('docs.list_page') 22 | ->with('project', $project) 23 | ->with('documents', $documents) 24 | ->with('selectedDocument', $selectedDocument); 25 | } 26 | 27 | public function create($project_id) // create page 28 | { 29 | if (!auth()->user()->can('add_edit_documents')) { 30 | abort(403); 31 | } 32 | 33 | $project = Project::findOrFail($project_id); 34 | $documents = Document::where('project_id', $project->id)->tree()->get()->toTree(); 35 | 36 | return view('docs.create_page') 37 | ->with('project', $project) 38 | ->with('documents', $documents); 39 | } 40 | 41 | public function show($project_id, $document_id) 42 | { 43 | $project = Project::findOrFail($project_id); 44 | $documents = Document::where('project_id', $project->id)->tree()->get()->toTree(); 45 | $selectedDocument = Document::findOrFail($document_id); 46 | 47 | return view('docs.list_page') 48 | ->with('project', $project) 49 | ->with('documents', $documents) 50 | ->with('selectedDocument', $selectedDocument); 51 | } 52 | 53 | public function edit($project_id, $document_id) 54 | { 55 | if (!auth()->user()->can('add_edit_documents')) { 56 | abort(403); 57 | } 58 | 59 | $project = Project::findOrFail($project_id); 60 | $documents = Document::where('project_id', $project->id)->tree()->get()->toTree(); 61 | $selectedDocument = Document::findOrFail($document_id); 62 | 63 | return view('docs.edit_page') 64 | ->with('project', $project) 65 | ->with('documents', $documents) 66 | ->with('selectedDocument', $selectedDocument); 67 | } 68 | 69 | /***************************************** 70 | * CRUD 71 | *****************************************/ 72 | 73 | public function store(Request $request) 74 | { 75 | if (!auth()->user()->can('add_edit_documents')) { 76 | abort(403); 77 | } 78 | 79 | $request->validate([ 80 | 'title' => 'required', 81 | ]); 82 | 83 | $document = new Document(); 84 | 85 | $document->title = $request->title; 86 | $document->project_id = $request->project_id; 87 | $document->parent_id = $request->parent_id; 88 | $document->content = $request->get('content'); 89 | 90 | $document->save(); 91 | 92 | return redirect()->route('project_documents_list_page', $document->project_id); 93 | } 94 | 95 | public function update(Request $request) 96 | { 97 | if (!auth()->user()->can('add_edit_documents')) { 98 | abort(403); 99 | } 100 | 101 | $document = Document::findOrFail($request->id); 102 | 103 | $document->title = $request->title; 104 | $document->parent_id = $request->parent_id; 105 | $document->content = $request->post('content'); 106 | 107 | $document->save(); 108 | 109 | return redirect()->route('document_show_page', [$document->project_id, $document->id]); 110 | } 111 | 112 | public function destroy(Request $request) 113 | { 114 | if (!auth()->user()->can('delete_documents')) { 115 | abort(403); 116 | } 117 | 118 | $document = Document::findOrFail($request->id); 119 | $project_id = $document->project_id; 120 | 121 | $document->delete(); 122 | return redirect()->route('project_documents_list_page', $project_id); 123 | } 124 | } 125 | --------------------------------------------------------------------------------