Commit graph

543 commits

Author SHA1 Message Date
Marcus Moore f708b8b299
Implement test 2024-02-13 14:30:26 -08:00
Marcus Moore 391b832613
Implement test 2024-02-13 13:34:55 -08:00
Marcus Moore b653d19579
Implement test 2024-02-13 13:29:54 -08:00
Marcus Moore 31a75bd252
Add some assertions 2024-02-13 13:17:02 -08:00
Marcus Moore 0506f3bef9
Scaffold additional tests 2024-02-13 12:35:31 -08:00
Marcus Moore 852b0b3f11
Scaffold additional tests 2024-02-13 12:15:59 -08:00
Marcus Moore 307b39bd38
Implement tests around asset check in 2024-02-13 12:03:27 -08:00
snipe 60ba898167
Merge pull request #14255 from marcusmoore/chore/sc-24805
Added LDAP group tag to LDAP tests
2024-02-13 13:42:51 +00:00
Marcus Moore c81bc1d2ee
Scaffold tests around asset check in 2024-02-12 17:54:22 -08:00
Marcus Moore 7154d23759
Pass the correct variable to the route helper 2024-02-12 16:45:18 -08:00
Marcus Moore df23fd0dee
Remove usused import 2024-02-12 16:35:54 -08:00
Marcus Moore adfb8895df
Improve factory state name 2024-02-12 16:31:32 -08:00
Marcus Moore 728aaaab20
Ensure accessory check in emails are not sent when the setting is disabled 2024-02-12 16:22:59 -08:00
Marcus Moore 095a7d9b34
Scaffold tests around accessory check in 2024-02-12 12:54:48 -08:00
Marcus Moore cf53f2778f
Add LDAP test cases to group 2024-02-12 12:28:27 -08:00
Marcus Moore 76cc5995d9
Write tests around getIdForCurrentUser method [sc-24748] 2024-02-05 12:38:33 -08:00
Marcus Moore 2e0e39ccc8
Ensure notification is sent when consumable is checked out via api 2024-01-30 13:19:20 -08:00
Marcus Moore 13c37e708f
Implement tests around consumable checkout 2024-01-30 12:43:20 -08:00
Marcus Moore 3f76d65b95
Improve test method name 2024-01-30 12:43:07 -08:00
Marcus Moore 6d41c8cf67
Merge branch 'develop' into bug/sc-24685 2024-01-30 11:44:36 -08:00
Marcus Moore de2aa903c5
Scaffold tests 2024-01-29 17:56:55 -08:00
Marcus Moore a2cba67f4e
Improve assertion 2024-01-29 16:59:57 -08:00
Marcus Moore f1ab8253f0
Implement tests included two currently failing tests 2024-01-29 16:48:40 -08:00
Marcus Moore e5d3df7d24
Scaffold accessory checkout tests for api 2024-01-29 15:59:23 -08:00
Marcus Moore 987676df08
Implement additional tests 2024-01-29 15:56:18 -08:00
Marcus Moore f16f62f76c
Scaffold and implement some tests around accessory checkout 2024-01-29 14:21:30 -08:00
Brady Wetherington 8a2f3405d5 Merge branch 'develop' into snipeit_v7_laravel10
A lot of changes here, but hopefully this works?
2024-01-29 22:12:58 +00:00
snipe d6c61e1429 Removed attribute assigning blank EOL as 0
Signed-off-by: snipe <snipe@snipe.net>
2024-01-25 21:34:20 +00:00
Marcus Moore 423b636db9
Guard against non-integers being passed for company_id 2024-01-09 10:57:43 -08:00
Brady Wetherington f734e196e5 Merge branch 'develop' into snipeit_v7_laravel10 2024-01-08 18:57:55 +00:00
spencerrlongg 9e84521098 fix auto-increment settings for test settings 2024-01-02 18:10:59 -06:00
Spencer Long 8546407083
Merge branch 'develop' into refactor/store_asset_form_request 2024-01-02 18:05:15 -06:00
spencerrlongg e028145ad9 Add new asset tests for archive, depreciate, and physical fields 2023-12-13 09:16:08 -06:00
snipe f9697887e8 Removed extraneous test
Signed-off-by: snipe <snipe@snipe.net>
2023-12-12 13:41:35 +00:00
snipe 0089ea2321
Merge pull request #13882 from marcusmoore/fixes/jquery-validation
Fix client side validation in the v7 branch
2023-12-05 17:26:48 +00:00
spencerrlongg cef1c5d4d2 cleanup test 2023-12-04 12:47:46 -06:00
spencerrlongg ca8765e1d7 cleaned up 2023-11-30 16:18:50 -06:00
spencerrlongg 6e5f296a13 gets rid of depreciate 2023-11-30 16:08:49 -06:00
spencerrlongg 68d85385a2 get rid of physical 2023-11-30 16:03:30 -06:00
spencerrlongg 88b6a541ee removed references to archived 2023-11-30 15:59:03 -06:00
spencerrlongg 135b7bde7d added some more check out assertions 2023-11-30 11:53:26 -06:00
Brady Wetherington 5a60df55d1 Add more LDAP tests - including pagination(!) 2023-11-30 16:09:37 +00:00
Brady Wetherington 16da994e28 Add LDAP as 'recommended' requirement; flesh out LDAP tests 2023-11-30 14:00:20 +00:00
spencerrlongg 151ceb5fbe get rid of firsts and find by responses id 2023-11-29 17:14:46 -06:00
spencerrlongg c3492f1699 fixed eol, add calculated eol/eol explicit tests 2023-11-29 14:57:31 -06:00
spencerrlongg 9d8433bd6d a couple quick things 2023-11-29 13:15:41 -06:00
spencerrlongg 65ca24f6ae asset assigned to asset works now 2023-11-29 11:37:52 -06:00
spencerrlongg b17078fffd a couple notes 2023-11-28 22:15:13 -06:00
spencerrlongg c886fb555b checkout on store tests almost done 2023-11-28 22:11:20 -06:00
spencerrlongg 15d11f7f4e test checkout to user on store 2023-11-28 21:46:03 -06:00
spencerrlongg cba5f869c0 standardize some of the validation rules, fix int/string issue 2023-11-28 21:19:19 -06:00
spencerrlongg 5b77e66d28 get rid of deleted_at as it doesn't do anything 2023-11-28 17:16:17 -06:00
spencerrlongg 75ac7f80b9 some refactor + tests 2023-11-28 15:17:46 -06:00
Brady Wetherington 8e8b1068ff Beginnings of LDAP test suite 2023-11-27 14:50:43 +00:00
Marcus Moore 714fce7e59
Add site name validation test 2023-11-14 12:23:58 -08:00
snipe 000a28d648
Merge pull request #13830 from spencerrlongg/bug/sc-23921
Resolves Exceptions When An Array is Submitted and Exception Occurs Before Validation
2023-11-13 20:19:44 +00:00
snipe 9e1cfac995
Merge pull request #13857 from akemidx/bug/sc-20532
Bug Fix:  Undefined array key 266
2023-11-09 09:39:04 +00:00
Marcus Moore 49136a4d67 Add tests for color helper 2023-11-08 12:35:42 -08:00
akemidx 4382adce85 typo in error log message 2023-11-08 15:29:29 -05:00
akemidx 495521b70e adjusting for less than 0 possibility 2023-11-08 12:51:51 -05:00
Marcus Moore 4fb349e326 Remove extra assertions 2023-11-06 14:04:52 -08:00
Marcus Moore 4d2790c3f4 Add tests for license checkout notes 2023-11-06 13:54:36 -08:00
spencerrlongg 75532d9662 adds permission test 2023-11-01 16:49:59 -05:00
Marcus Moore 417f9c21e4 Fix the storing of group permissions when creating via API 2023-10-10 17:51:29 -07:00
snipe d916e20c10
Merge pull request #13415 from marcusmoore/feature/department-scoping
Added `CompanyableTrait` to `Department` model
2023-09-14 12:52:53 +01:00
Marcus Moore 093bf57448 Update assertion and add failure messages 2023-09-07 16:42:49 -07:00
snipe 06836663c8
Merge pull request #13575 from marcusmoore/fixes/improve-api-messaging
Added validation around department_id in API patch request
2023-09-07 21:36:20 +01:00
Marcus Moore c6c1c64c1e Remove todo 2023-09-07 13:30:05 -07:00
Marcus Moore a7a70f6981 Test permissions update 2023-09-07 13:21:27 -07:00
Marcus Moore 39ff575ac1 Remove unused test cases 2023-09-07 13:16:08 -07:00
Marcus Moore 56e6205667 Formatting 2023-09-07 12:45:03 -07:00
Marcus Moore 899c2eb19b Implement test case 2023-09-07 12:34:50 -07:00
Marcus Moore 1c3c36f2a0 Begin to implement patch test 2023-09-06 16:14:14 -07:00
snipe a62e2f092b
Merge pull request #13498 from marcusmoore/feature/add-checkin-date-range-filter-to-custom-asset-report
Added last check in column and filter to custom asset report
2023-09-05 13:22:15 +01:00
snipe e192cbbbe1
Merge pull request #13550 from marcusmoore/remove-dusk
Removed Dusk
2023-08-31 18:06:04 +01:00
Marcus Moore a799659610 Scaffold tests and add context 2023-08-30 17:33:23 -07:00
Marcus Moore 999605f832 Add failing test 2023-08-30 17:10:50 -07:00
Marcus Moore 5828d29952 Remove Dusk 2023-08-30 16:43:18 -07:00
snipe fb455be406 Added tests
Signed-off-by: snipe <snipe@snipe.net>
2023-08-30 19:13:38 +01:00
Marcus Moore 07c3fe1fce Update assertions to account for type change 2023-08-30 09:42:53 -07:00
Marcus Moore aafa1ab70e Add failing test 2023-08-29 16:15:13 -07:00
Marcus Moore c332b98456 Add last checkin options to report front end 2023-08-21 13:44:49 -07:00
Marcus Moore 6fc06f2ee1 Add simple tests around asset check in 2023-08-21 12:31:51 -07:00
snipe 6adaa32286
Merge pull request #13431 from marcusmoore/feature/custom-report-scoping
Removed unneeded `Company::scopeCompanyables` from `ReportsController`
2023-08-10 09:57:53 +01:00
snipe a599f0c923
Merge pull request #13434 from marcusmoore/chore/improve-test-stability
Improved test stability and messaging
2023-08-10 09:57:26 +01:00
Marcus Moore 04661d5441
Add help text to response assertion helpers 2023-08-09 17:09:31 -07:00
Marcus Moore 3a5ed031bf
Escape values in response assertion helpers 2023-08-09 17:08:49 -07:00
Marcus Moore 60baaae192
Remove unused test bootstrap file 2023-08-09 16:22:58 -07:00
Marcus Moore 8508594a2f
Remove old and unused Codeception test code 2023-08-09 13:32:15 -07:00
Marcus Moore e0b464dcec
Merge branch 'develop' into feature/custom-report-scoping 2023-08-09 13:03:05 -07:00
snipe a6a742d8d8
Merge pull request #13407 from marcusmoore/feature/sc-23465
Added messaging to category edit page to improve clarity around when users will be emailed
2023-08-09 10:36:19 +01:00
Marcus Moore 2e632a3d2d
Improve test readability 2023-08-08 17:40:02 -07:00
Marcus Moore c752e1670c
Add test around company scoping in custom report 2023-08-08 17:21:39 -07:00
Marcus Moore 1405e17251
Add simple test around custom asset report response 2023-08-08 17:10:36 -07:00
Marcus Moore 42055bb69d
Add authentication and authorization tests for department index method 2023-08-07 17:42:28 -07:00
Marcus Moore cdfe8e459d
Add simple test cases for api department index 2023-08-07 16:36:01 -07:00
Marcus Moore 3fd0853fd0
Ensure eula field enabled when not using default eula 2023-08-02 18:02:56 -07:00
Marcus Moore 896f038054
Set send email back to original value when eulas cleared 2023-08-02 17:03:56 -07:00
Marcus Moore 48979ce177
Disable send email when it should not be modified 2023-08-02 16:52:56 -07:00
Marcus Moore e12935f7fa
Disable eula textarea when using global eula 2023-08-02 16:18:57 -07:00
Marcus Moore 6400034435
Improve variable name 2023-08-02 16:06:59 -07:00
Marcus Moore 269414e4f2
Automatically check the send email to user checkbox in certain conditions 2023-08-02 16:04:01 -07:00
Marcus Moore dee6ebf8e0
Scaffold component test 2023-08-02 12:58:07 -07:00
snipe c1949ffb0d
Merge pull request #13319 from marcusmoore/chore/user-search-test-cases
Added test cases around user search
2023-07-18 13:27:22 +01:00
snipe 18e2ec4dad
Merge pull request #13310 from marcusmoore/bug/sc-23478
Fixed the inability to load location select when editing profile
2023-07-18 13:26:30 +01:00
Marcus Moore fa0a88289a
Add tests around user search
Follow up to #13311
2023-07-17 11:29:22 -07:00
Marcus Moore 346ace9444
Allow users that have permission to edit their own location to see locations in select list 2023-07-13 17:37:46 -07:00
snipe 981c3a430d
Merge pull request #13301 from uberbrady/better_auto_increment_tags
Better auto increment asset-tags [FD-32892]
2023-07-13 09:49:44 +01:00
Brady Wetherington e648da9dc5 Also do a sanity-check that the normal asset autoincrementing works 2023-07-12 16:51:23 +01:00
Brady Wetherington 76191a09ed Improvements to asset_tag auto-incrementing, with auto-fixups for gaps 2023-07-12 16:39:45 +01:00
Marcus Moore 48e4ec8cf5
Guard against wiping database when running tests and test specific envs are not created 2023-07-11 12:16:37 -07:00
Marcus Moore 2abdb8a5fd
Revert unneeded changes 2023-06-26 14:01:09 -07:00
Marcus Moore 7cb22d3d49
Remove incomplete tests 2023-06-26 14:00:53 -07:00
Marcus Moore acd06927ac
Add helper method for authenticating with passport 2023-06-22 17:37:30 -07:00
Marcus Moore a35d83d14a
Migrate to response macros for readability 2023-06-22 14:41:56 -07:00
Marcus Moore a333d7b72f
Add context to incomplete tests 2023-06-22 12:48:09 -07:00
Marcus Moore ab5fed09db
Remove scopeCompanyables call from AssetsController@requestable 2023-06-22 12:36:43 -07:00
Marcus Moore 74b072f1b5
Improve messaging in testing helper 2023-06-22 12:36:30 -07:00
Marcus Moore 0a5e1e3190
Remove scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:21:36 -07:00
Marcus Moore effd969284
Scaffold test before removing scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:15:02 -07:00
Marcus Moore af77fefc61
Scaffold test before removing scopeCompanyables call from AssetsController 2023-06-21 16:19:56 -07:00
Marcus Moore 65e8e4e163
Guard against attempting to use invalid property 2023-06-21 16:18:09 -07:00
Marcus Moore 7672861b96
Scaffold test before removing scopeCompanyables call from DashboardController 2023-06-07 17:38:23 -07:00
Marcus Moore 6f5252449e
Scaffold test before removing scopeCompanyables call from UsersController 2023-06-07 16:25:18 -07:00
Marcus Moore 0f6051bbe5
Inline method call 2023-06-07 16:18:02 -07:00
Marcus Moore abaf59c990
Extract and use helper methods 2023-06-07 16:16:30 -07:00
Marcus Moore 27d4d107bb
Scaffold test before removing scopeCompanyables call from DepartmentsController 2023-06-07 16:10:29 -07:00
Marcus Moore 8e6e525b47
Remove scopeCompanyables call from LicensesController 2023-06-07 16:09:45 -07:00
Marcus Moore a18f5e7fc0
Remove scopeCompanyables call from ConsumablesController 2023-06-07 14:22:22 -07:00
Marcus Moore 48850f3597
Remove scopeCompanyables call from ComponentsController 2023-06-06 18:02:18 -07:00
Marcus Moore 6585aa0cf0
Add unit tests for company scoping 2023-06-06 16:31:14 -07:00
Marcus Moore 6300909fee
Add test for searching for user's first and last name 2023-05-23 13:39:01 -07:00
Marcus Moore 9cb0decf35
Adapt multiple column search based on database driver 2023-05-18 12:54:00 -07:00
snipe d70e14de61
Merge pull request #12972 from marcusmoore/bug/sc-23177
Fixes user name missing in accessory acceptance notifications
2023-05-08 13:04:37 -07:00
Marcus Moore 4a0b3efd1f
Include user's name in Acceptance result notifications for accessories 2023-05-03 14:22:05 -07:00
snipe b716f9f55e
Merge pull request #12916 from snipe/features/auto_add_to_fieldset
Added ability to auto-add fields to new fieldsets
2023-05-03 11:04:33 -07:00
Marcus Moore f7d2b62d87
Improve method name 2023-05-01 16:06:28 -07:00
Marcus Moore da08f6ef8c
Add InteractsWithSettings trait to required tests 2023-05-01 16:05:26 -07:00
Marcus Moore 6d594faae7
Clear the settings cache on app destruction 2023-05-01 16:04:43 -07:00
snipe 970b5e556c
Merge pull request #12903 from marcusmoore/bug/sc-15034
Fixes sending webhook notifications for checkout and checkin
2023-04-25 22:22:58 -07:00
snipe 27477085fe Merge branch 'develop' into features/auto_add_to_fieldset 2023-04-25 21:31:50 -07:00
snipe 4a063d23b9 We don’t actually use this test?
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 19:36:52 -07:00
Marcus Moore a528ebeab0
Use superuser instead of admin state 2023-04-25 11:53:47 -07:00
Marcus Moore 2aba8252f3
Ensure users editing themselves do not deactivate their account 2023-04-20 21:59:55 -07:00
Marcus Moore c357d9f01e
Update data provider name 2023-04-19 18:10:23 -07:00
Marcus Moore bad2eead4c
Remove test method 2023-04-18 13:13:57 -07:00
Marcus Moore 508660b1df
Skip notifications for component checkouts and checkins 2023-04-18 13:07:55 -07:00
Marcus Moore f6cff90829
Migrate to new test settings interface 2023-04-17 17:31:12 -07:00
Marcus Moore 2d56675ade
Merge branch 'develop' into bug/sc-15034
# Conflicts:
#	database/factories/SettingFactory.php
2023-04-17 17:22:55 -07:00
Marcus Moore 473241edca
Move initialization of settings to trait 2023-04-13 16:52:20 -07:00
Marcus Moore 7c95e45178
Introduce trait to conditionally interact with settings 2023-04-12 17:28:47 -07:00
Marcus Moore cd0796ddda
Allow Settings to be chainable 2023-04-06 18:46:29 -07:00
Marcus Moore 9561b66613
Add return types and docblock 2023-04-06 17:58:53 -07:00
Marcus Moore 95f195046d
Move cache flush to testing helper 2023-04-06 17:50:24 -07:00
Marcus Moore 52c733b31d
Add ability to set provided settings 2023-04-06 17:48:23 -07:00
Marcus Moore 8ac4d3aeea
Move to a static constructor 2023-04-06 17:42:15 -07:00
Marcus Moore bbfb6c338a
Remove unused method 2023-04-06 17:28:16 -07:00
Marcus Moore f767cc082f
Introduce improved way to interact with settings in tests 2023-04-06 17:27:18 -07:00
Marcus Moore 5b4d5cadf4
Add tests for sending webhooks on asset and license seat checkin 2023-04-05 12:57:53 -07:00
Marcus Moore 3cc3662992
Send webhook notifications for accessory checkins when enabled 2023-04-05 12:36:24 -07:00
Marcus Moore 2187310abb
Simplify test case names 2023-04-05 12:27:18 -07:00
Marcus Moore b41902976b
Improve test class names 2023-04-05 12:23:11 -07:00
Marcus Moore 524249d4d7
Implement tests for webhook notifications on accessory checkout 2023-03-30 16:58:16 -07:00
Marcus Moore b2292db3c8
Implement tests for webhook notifications on consumable checkout 2023-03-30 16:40:53 -07:00
Marcus Moore aefc53cfcf
Explicitly disable webhook settings in tests 2023-03-30 16:40:21 -07:00
Marcus Moore 134ab631d4
Add test to ensure notification is not sent for license checkouts if not enabled 2023-03-30 15:38:22 -07:00
Marcus Moore 158e1544cd
Test the event instead of the checkout 2023-03-30 15:38:00 -07:00
Marcus Moore 2cbc6276f7
Implement test for license checkout notification 2023-03-27 14:09:31 -07:00
Marcus Moore fa69a580ab
Start to scaffold license checkout notification test 2023-03-23 17:18:33 -07:00
Marcus Moore 25e859c866
Simplify test case 2023-03-23 16:42:21 -07:00
Marcus Moore 2dcf4e3d16
Standardize on sending anonymous notifications for asset checkouts 2023-03-23 16:31:40 -07:00
Marcus Moore b396f2bed3
Update test case names 2023-03-22 12:41:30 -07:00
Marcus Moore 28ced46b9d
Clean up test code 2023-03-22 12:38:14 -07:00
Marcus Moore 66224765ea
Use factory state for webhook settings 2023-03-22 12:31:47 -07:00
Marcus Moore 9c4a3ce56a
Update slack_endpoint to webhook_endpoint in test and notification 2023-03-22 12:27:36 -07:00
Marcus Moore f6d0dd0f93
Merge branch 'develop' into bug/sc-15034 2023-03-22 11:58:47 -07:00
Marcus Moore e303aeadd1
Fix test name 2023-03-22 11:56:54 -07:00
Marcus Moore 315f5231cd
Send slack notification for check outs to assets and locations 2023-03-21 17:03:51 -07:00
Marcus Moore 918239961a
Add simple test case for assets 2023-03-20 15:47:57 -07:00
Marcus Moore 272cc1adac
Skip creating user when creating a setting since it isn't needed 2023-03-20 15:33:40 -07:00
Marcus Moore 16e3416225
Update test case 2023-03-20 14:27:45 -07:00
Marcus Moore 099ec3f550
Remove creation of category within category factory state 2023-03-13 16:45:43 -07:00
Marcus Moore 2813b7ea58
Scaffold tests for slack notification on checkout 2023-03-13 15:47:50 -07:00
Marcus Moore dd9c00195b
Remove old $tester variable and usused imports 2023-03-07 17:04:46 -08:00
Marcus Moore 43ff7261b2
Remove redundant base test case 2023-03-07 16:57:55 -08:00
Marcus Moore 8c13a4c5c9
Use LazilyRefreshDatabase instead of RefreshDatabase 2023-03-07 16:43:18 -08:00
Marcus Moore 8fad377114
Remove helper methods by inlining where needed 2023-03-07 10:28:33 -08:00
Marcus Moore a3c8c3757a
Remove unused method 2023-03-06 17:50:44 -08:00
Marcus Moore bc54144284
Fix test by passing proper user 2023-03-06 12:40:47 -08:00
Marcus Moore e8da6d8bac
Set purchase date in correct format 2023-03-02 13:47:58 -08:00
Marcus Moore 45d7e9b134
Switch to using LazilyRefreshDatabase in unit test suite 2023-03-02 13:13:30 -08:00
Marcus Moore 75fc624ec6
Globally disable SecurityHeaders in tests 2023-03-02 13:12:25 -08:00
Marcus Moore 589a5d0d8b
Merge branch 'develop' into fix/test-suite 2023-02-28 09:48:48 -08:00
snipe eb6357636a
Merge pull request #12467 from marcusmoore/fix/scope-people-with-full-multiple-companies
Fix full company scoping in user selects
2023-02-23 10:36:33 -08:00
Marcus Moore 4f9ebf6cde
Fix array key 2023-02-07 16:40:27 -08:00
Marcus Moore 787f619a6b
Standardize test method syntax 2023-02-07 16:28:40 -08:00
Marcus Moore 505ca48da2
Remove test method without assertions 2023-02-07 16:17:36 -08:00
Marcus Moore 6b8c0f9e88
Make BaseTest abstract 2023-02-07 16:17:16 -08:00
Marcus Moore 6dbcec2310
Exclude Dusk tests from phpunit test suite 2023-02-07 16:16:39 -08:00
Marcus Moore c03079944a
Be more explicit in test case 2023-02-06 16:06:13 -08:00