A free open source IT asset/license management system
Functional Tests Improvements (#5095)
Daniel Meltzerd54dda40d38b
diff --git a/.travis.yml b/.travis.ymlindex de5c044794..6bb7ca309f 100644--- a/.travis.yml+++ b/.travis.yml@@ -51,8 +51,8 @@ before_script:script:- ./vendor/bin/codecept run unit# - ./vendor/bin/codecept run acceptance --env=testing-ci- - ./vendor/bin/codecept run functional --env=functional-travis-#script: ./vendor/bin/codecept run+ - ./vendor/bin/codecept run functional --env=functional-travis -g func1+ - ./vendor/bin/codecept run functional --env=functional-travis -g func2- ./vendor/bin/codecept run api --env=functional-travisafter_script:diff --git a/tests/_envs/functional-travis.yml b/tests/_envs/functional-travis.ymlindex 937a3cb7b1..209a222a43 100644--- a/tests/_envs/functional-travis.yml+++ b/tests/_envs/functional-travis.yml@@ -8,4 +8,5 @@ modules:Db:dsn: 'mysql:host=localhost;dbname=snipeit_unit'user: 'travis'- password: ''\ No newline at end of file+ password: ''+ populator: 'mysql -u travis snipeit_unit < tests/_data/dump.sql'diff --git a/tests/functional.suite.yml b/tests/functional.suite.ymlindex fbbb9d42e9..82387f50b9 100644--- a/tests/functional.suite.yml+++ b/tests/functional.suite.yml@@ -18,6 +18,10 @@ modules:password: ''dump: tests/_data/dump.sqlpopulate: true- cleanup: true+ populator: 'mysql -u snipeit_laravel snipeittests < tests/_data/dump.sql'+ cleanup: false- REST:depends: Laravel5+groups:+ func1: tests/functional/func-part-1.txt+ func2: tests/functional/func-part-2.txtdiff --git a/tests/functional/CategoriesCest.php b/tests/functional/CategoriesCest.phpindex 002fea21d6..6f054b5dd9 100644--- a/tests/functional/CategoriesCest.php+++ b/tests/functional/CategoriesCest.php@@ -58,7 +58,7 @@ class CategoriesCest{$I->wantTo('Ensure I can delete a category');$category = factory(App\Models\Category::class)->states('asset-laptop-category')->create([- 'name'=>"Test Category"+ 'name'=>"Deletable Test Category"]);$I->sendDelete(route('categories.destroy', $category->id), ['_token' => csrf_token()]);$I->seeResponseCodeIs(200);diff --git a/tests/functional/ManufacturersCest.php b/tests/functional/ManufacturersCest.phpindex 322dc93f58..8c34badd1a 100644--- a/tests/functional/ManufacturersCest.php+++ b/tests/functional/ManufacturersCest.php@@ -59,7 +59,7 @@ class ManufacturersCestpublic function allowsDelete(FunctionalTester $I){$I->wantTo('Ensure I can delete a manufacturer');- $manufacturerId = factory(App\Models\Manufacturer::class)->states('microsoft')->create(['name' => "Test Manufacturer"])->id;+ $manufacturerId = factory(App\Models\Manufacturer::class)->states('microsoft')->create(['name' => "Deletable Test Manufacturer"])->id;$I->sendDelete(route('manufacturers.destroy', $manufacturerId), ['_token' => csrf_token()]);$I->seeResponseCodeIs(200);}diff --git a/tests/functional/func-part-1.txt b/tests/functional/func-part-1.txtnew file mode 100644index 0000000000..7409642049--- /dev/null+++ b/tests/functional/func-part-1.txt@@ -0,0 +1,8 @@+tests/functional/AccessoriesCest.php+tests/functional/AssetModelsCest.php+tests/functional/AssetsCest.php+tests/functional/CategoriesCest.php+tests/functional/CompaniesCest.php+tests/functional/ComponentsCest.php+tests/functional/ConsumablesCest.php+tests/functional/DepreciationsCest.phpdiff --git a/tests/functional/func-part-2.txt b/tests/functional/func-part-2.txtnew file mode 100644index 0000000000..3aa2d054c8--- /dev/null+++ b/tests/functional/func-part-2.txt@@ -0,0 +1,7 @@+tests/functional/GroupsCest.php+tests/functional/LicensesCest.php+tests/functional/LocationsCest.php+tests/functional/ManufacturersCest.php+tests/functional/StatusLabelsCest.php+tests/functional/SuppliersCest.php+tests/functional/UsersCest.php