Commit graph

383 commits

Author SHA1 Message Date
Marcus Moore 8978dff054
Consolidate helpers into trait 2024-02-27 18:01:08 -08:00
Marcus Moore d20844fefa
Improve readability by extracting additional helpers 2024-02-27 17:57:12 -08:00
Marcus Moore cd579a04dd
Improve readability by extracting fireCheckOutEvent method 2024-02-27 17:52:18 -08:00
Marcus Moore 15b8140bff
Fix test helper 2024-02-27 17:48:17 -08:00
Marcus Moore 9a93ad2e06
Remove unneeded factory state 2024-02-27 17:46:27 -08:00
Marcus Moore bd4d3aa52b
Improve readability by extracting additional helpers 2024-02-27 17:44:19 -08:00
Marcus Moore bf32ab177f
Improve readability by extracting fireCheckInEvent method 2024-02-27 17:37:07 -08:00
Marcus Moore 2ea883aa15
Move Notification::fake() to setUp method 2024-02-27 17:23:30 -08:00
Marcus Moore 43cc296582
Consolidate additional tests 2024-02-27 17:14:35 -08:00
Marcus Moore 4c1aadd74e
Improve naming and inline helper 2024-02-27 17:09:22 -08:00
Marcus Moore 7d3719bf70
Consolidate some slack notification tests 2024-02-27 17:07:40 -08:00
Marcus Moore c08164d864
Update test names 2024-02-27 16:48:17 -08:00
Marcus Moore b156aa74a5
Update helper name 2024-02-27 16:45:49 -08:00
Marcus Moore 5084e5d3ef
Improve variable type 2024-02-27 12:23:26 -08:00
Marcus Moore 69022bb8b6
Implement test 2024-02-27 11:12:35 -08:00
Marcus Moore 29d729171c
Align test with actual values passed from the web 2024-02-26 11:13:39 -08:00
Marcus Moore c401c88702
Scope event fake 2024-02-22 16:19:33 -08:00
Marcus Moore b55a19cebb
Add assertion event is dispatched with correct timestamp 2024-02-22 13:50:46 -08:00
Marcus Moore 4caadcfa19
Clear pending checkout acceptances when checking in asset via api 2024-02-22 13:33:16 -08:00
Marcus Moore 714fc63050
Have legacy locations updated upon api asset checkin 2024-02-22 13:14:30 -08:00
Marcus Moore 2df026bcb5
Allow updating asset default location when checking in asset via api 2024-02-22 12:40:14 -08:00
Marcus Moore 3ae8adfbf9
Remove incomplete flag on test case 2024-02-21 12:33:32 -08:00
Marcus Moore aa2632fe46
Merge branch 'develop' into chore/sc-24808 2024-02-21 12:33:06 -08:00
Brady Wetherington 8f2843bfcf Merge branch 'develop' into snipeit_v7_laravel10
Had to re-generate composer.lock, and re-do package.json and rebuild assets as well.
2024-02-21 20:22:28 +00:00
Marcus Moore bc0a7542ac
Change enableWebhook to enableSlackWebhook 2024-02-14 18:17:34 -08:00
Marcus Moore aec59f2da6
Update assertion to be more correct 2024-02-14 12:27:42 -08:00
Marcus Moore 905df5ec25
Consolidate test cases 2024-02-14 12:14:27 -08:00
Marcus Moore bacfdc5049
Scaffold additional tests 2024-02-14 11:33:03 -08:00
Marcus Moore 3cc72021b6
Move notification test to notifications test suite 2024-02-14 11:16:31 -08:00
Marcus Moore 4354e126b1
Scaffold tests 2024-02-14 11:11:08 -08:00
Marcus Moore 02f39472f9
Remove duplicate test 2024-02-14 11:10:59 -08:00
Marcus Moore af513946a2
Implement test 2024-02-14 10:48:49 -08:00
Marcus Moore ad1846fed6
Implement tests 2024-02-13 17:50:26 -08:00
Marcus Moore 9ab56fe9ca
Implement tests 2024-02-13 17:04:53 -08:00
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
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 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
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 e028145ad9 Add new asset tests for archive, depreciate, and physical fields 2023-12-13 09:16:08 -06: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
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 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
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
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
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
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
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
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 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 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 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
Marcus Moore 4a0b3efd1f
Include user's name in Acceptance result notifications for accessories 2023-05-03 14:22:05 -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
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 7c95e45178
Introduce trait to conditionally interact with settings 2023-04-12 17:28:47 -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 2813b7ea58
Scaffold tests for slack notification on checkout 2023-03-13 15:47:50 -07: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 c03079944a
Be more explicit in test case 2023-02-06 16:06:13 -08:00
Marcus Moore 9a0c66bd30
Clear some extra lines 2023-02-02 18:30:18 -08:00
Marcus Moore d8e92d29c0
Improve readability 2023-02-02 18:25:54 -08:00
Marcus Moore 93a62c87c2
Implement test for searching users 2023-02-02 17:57:24 -08:00
Marcus Moore 89eff23e44
Continue implementing tests 2023-02-02 17:41:32 -08:00
Marcus Moore a2e47d19fc
Scaffold tests for user select list api and begin to implemenet 2023-02-02 13:47:00 -08:00