Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.9.0 #341

Merged
merged 51 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
997891b
Added Vue full calendar
NuwanJ Nov 13, 2022
000e979
Full Calendar updates
NuwanJ Nov 13, 2022
abef7c1
Merge pull request #47 from cepdnaclk/milestone_3b
NuwanJ Nov 13, 2022
a9c92e8
Merge branch 'milestone_3b' of https://github.com/NuwanJ/smart-invent…
NuwanJ Nov 13, 2022
d88354d
Merge fixes
NuwanJ Nov 13, 2022
10f1c7b
A few merge issues were fixed
NuwanJ Nov 13, 2022
3a00ffc
Merge pull request #49 from NuwanJ/vue-full-calendar
NuwanJ Nov 13, 2022
6666fcc
Location checkbox updates
NuwanJ Nov 19, 2022
a167db1
Merge branch 'dev' of https://github.com/NuwanJ/smart-inventory-manag…
NuwanJ Nov 19, 2022
fdf541e
Announcements Basic Setup
NuwanJ Dec 6, 2022
e2dfa47
Discord Log Channel implementation
NuwanJ Dec 7, 2022
53f68a3
Merge pull request #52 from NuwanJ/331-discord-logs
NuwanJ Dec 7, 2022
5f398fa
Calendar Updates
NuwanJ Apr 8, 2023
bf8f3f5
Milestone 3B Merge fixes
NuwanJ Apr 8, 2023
3ffb0a8
Merge fix updates
NuwanJ Apr 8, 2023
60f4b48
Merge pull request #53 from NuwanJ/milestone_3b
NuwanJ Apr 8, 2023
07607b7
Merge pull request #314 from NuwanJ/dev
NuwanJ Apr 8, 2023
49819a1
Frontend view updates
NuwanJ Apr 29, 2023
8185cf9
Fix
NuwanJ Apr 29, 2023
330e2f4
Added Git pre-push unit testing
NuwanJ Apr 29, 2023
97190fc
Readme update
NuwanJ Apr 29, 2023
985ecde
Git CI pipeline updates
NuwanJ Apr 29, 2023
1e00e7a
Removed unused GUI test
NuwanJ Apr 29, 2023
23ab4eb
Dummy image
NuwanJ May 1, 2023
5259297
Backend UI updates
NuwanJ May 1, 2023
f17cd70
Merge pull request #54 from NuwanJ/308-frontend-UI-updates
NuwanJ May 1, 2023
7883923
Bug fix
NuwanJ May 1, 2023
6acd3cd
item_thumbnail.jpg update
NuwanJ May 1, 2023
3af2dcb
Merge pull request #315 from NuwanJ/dev
NuwanJ May 1, 2023
f22fbbc
Merge pull request #316 from cepdnaclk/308-frontend-UI-updates
NuwanJ May 1, 2023
cf0353d
Basic changes
NuwanJ May 1, 2023
1bd6cb0
Updating unit tests
NuwanJ May 1, 2023
883091b
Merge pull request #318 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 2, 2023
157790e
Merge branch 'cepdnaclk:main' into annoucements
NuwanJ May 3, 2023
7b84187
Merge pull request #57 from NuwanJ/dev
NuwanJ May 3, 2023
b505d06
Basic implementations
NuwanJ-RhinoPartners May 3, 2023
23fa866
Merge pull request #55 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 3, 2023
ee61291
Merge pull request #58 from NuwanJ/dev
NuwanJ May 3, 2023
7af1c43
Updated unit testings
NuwanJ-RhinoPartners May 3, 2023
baef827
Announcement display order updated
NuwanJ-RhinoPartners May 3, 2023
00ac2cf
Merge pull request #56 from NuwanJ/annoucements
NuwanJ May 3, 2023
e12202f
Merge pull request #320 from NuwanJ/dev
NuwanJ May 3, 2023
b0b87d5
Remove thumbURL delete logic
NuwanJ-RhinoPartners May 5, 2023
74ae3ea
Submit only the thumb parameter to deleteThumb()
NuwanJ-RhinoPartners May 5, 2023
e103742
Avaoid deleting the parent thumbnail when updating
NuwanJ May 5, 2023
ba1ba45
Fix
NuwanJ Jun 24, 2023
b310f92
Merge pull request #335 from cepdnaclk/334-bug-remove-location-from-t…
NuwanJ Jun 24, 2023
cde93ed
336 limit self registration only for the department students (#338)
NuwanJ Jun 29, 2023
677bb17
UI updates for alerts (#340)
NuwanJ Jun 29, 2023
954d2fe
Server changes
NuwanJ Apr 17, 2024
a41d8bd
Typo correction on Announcements
NuwanJ Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating unit tests
NuwanJ committed May 1, 2023
commit 1bd6cb04d0ae263197d93614b4e6c03a80c7f4ad
26 changes: 13 additions & 13 deletions tests/Feature/Backend/Component/ComponentItemTest.php
Original file line number Diff line number Diff line change
@@ -20,37 +20,37 @@ class ComponentItemTest extends TestCase
public function an_admin_can_access_the_list_component_page()
{
$this->loginAsAdmin();
$this->get('/admin/components/items/')->assertOk();
$this->get('/dashboard/components/items/')->assertOk();
}

/** @test */
public function an_admin_can_access_the_create_component_page()
{
$this->loginAsAdmin();
$this->get('/admin/components/items/create')->assertOk();
$this->get('/dashboard/components/items/create')->assertOk();
}

/** @test */
public function an_admin_can_access_the_show_component_page()
{
$this->loginAsAdmin();
$component = ComponentItem::factory()->create();
$this->get('/admin/components/items/' . $component->id)->assertOk();
$this->get('/dashboard/components/items/' . $component->id)->assertOk();
}

/** @test */
public function an_admin_can_access_the_delete_component_page()
{
$this->loginAsAdmin();
$component = ComponentItem::factory()->create();
$this->get('/admin/components/items/delete/' . $component->id)->assertOk();
$this->get('/dashboard/components/items/delete/' . $component->id)->assertOk();
}

/** @test */
public function create_component_requires_validation()
{
$this->loginAsAdmin();
$response = $this->post('/admin/components/items/');
$response = $this->post('/dashboard/components/items/');
$response->assertSessionHasErrors(['title', 'component_type_id']);
}

@@ -60,15 +60,15 @@ public function update_component_requires_validation()
$this->loginAsAdmin();
$component = ComponentItem::factory()->create();

$response = $this->put("/admin/components/items/{$component->id}", []);
$response = $this->put("/dashboard/components/items/{$component->id}", []);
$response->assertSessionHasErrors(['title', 'component_type_id']);
}

/** @test */
public function an_component_can_be_created()
{
$this->loginAsAdmin();
$response = $this->post('/admin/components/items', [
$response = $this->post('/dashboard/components/items', [

'title' => 'Sample Component',
'brand' => NULL,
@@ -104,7 +104,7 @@ public function an_component_can_be_updated()
$component->title = 'New Component Title';
$component_array = $component->toArray();
$component_array['location'] = 2;
$response = $this->put("/admin/components/items/{$component->id}", $component_array);
$response = $this->put("/dashboard/components/items/{$component->id}", $component_array);
$response->assertStatus(302);
$this->assertDatabaseHas('component_items', [
'title' => 'New Component Title',
@@ -116,15 +116,15 @@ public function delete_component_item()
{
$this->actingAs(User::factory()->admin()->create());
$component = ComponentItem::factory()->create();
$this->delete('/admin/components/items/' . $component->id);
$this->delete('/dashboard/components/items/' . $component->id);
$this->assertDatabaseMissing('component_items', ['id' => $component->id]);
}

/** @test */
public function unauthorized_user_cannot_delete_component_item()
{
$component = ComponentItem::factory()->create();
$response = $this->delete('/admin/components/items/' . $component->id);
$response = $this->delete('/dashboard/components/items/' . $component->id);
$response->assertStatus(302);
}

@@ -141,7 +141,7 @@ public function single_location_shows_up()
);

$locationName = Locations::where('id', 1)->first()->location;
$response = $this->get('/admin/components/items/' . $component->id);
$response = $this->get('/dashboard/components/items/' . $component->id);
$response->assertSee($locationName);
}

@@ -165,8 +165,8 @@ public function multiple_locations_show_up()

$locationName1 = Locations::where('id', 1)->first()->location;
$locationName2 = Locations::where('id', 2)->first()->location;
$response = $this->get('/admin/components/items/' . $component->id);
$response = $this->get('/dashboard/components/items/' . $component->id);
$response->assertSee($locationName1);
$response->assertSee($locationName2);
}
}
}
21 changes: 10 additions & 11 deletions tests/Feature/Backend/Component/ComponentTypeTest.php
Original file line number Diff line number Diff line change
@@ -18,37 +18,37 @@ class ComponentTypeTest extends TestCase
public function an_admin_can_access_the_list_component_type_page()
{
$this->loginAsAdmin();
$this->get('/admin/components/types/')->assertOk();
$this->get('/dashboard/components/types/')->assertOk();
}

/** @test */
public function an_admin_can_access_the_create_component_type_page()
{
$this->loginAsAdmin();
$this->get('/admin/components/types/create')->assertOk();
$this->get('/dashboard/components/types/create')->assertOk();
}

/** @test */
public function an_admin_can_access_the_show_component_type_page()
{
$this->loginAsAdmin();
$componentType = ComponentType::factory()->create();
$this->get('/admin/components/types/' . $componentType->id)->assertOk();
$this->get('/dashboard/components/types/' . $componentType->id)->assertOk();
}

/** @test */
public function an_admin_can_access_the_delete_component_type_page()
{
$this->loginAsAdmin();
$componentType = ComponentType::factory()->create();
$this->get('/admin/components/types/delete/' . $componentType->id)->assertOk();
$this->get('/dashboard/components/types/delete/' . $componentType->id)->assertOk();
}

/** @test */
public function create_component_type_requires_validation()
{
$this->loginAsAdmin();
$response = $this->post('/admin/components/types/');
$response = $this->post('/dashboard/components/types/');
$response->assertSessionHasErrors(['title']);
}

@@ -57,7 +57,7 @@ public function update_component_type_requires_validation()
{
$this->loginAsAdmin();
$componentType = ComponentType::factory()->create();
$response = $this->put("/admin/components/types/{$componentType->id}", []);
$response = $this->put("/dashboard/components/types/{$componentType->id}", []);
$response->assertSessionHasErrors(['title']);
}

@@ -66,7 +66,7 @@ public function an_component_type_can_be_created()
{
$this->loginAsAdmin();

$response = $this->post('/admin/components/types', [
$response = $this->post('/dashboard/components/types', [
'title' => 'Sample Component Type',
'parent_id' => NULL,
'subtitle' => '',
@@ -88,7 +88,7 @@ public function an_component_type_can_be_updated()
$componentType = ComponentType::factory()->create();

$componentType->title = 'New Component Type Title';
$response = $this->put("/admin/components/types/{$componentType->id}", $componentType->toArray());
$response = $this->put("/dashboard/components/types/{$componentType->id}", $componentType->toArray());

$this->assertDatabaseHas('component_types', [
'title' => 'New Component Type Title',
@@ -100,16 +100,15 @@ public function delete_component_type_item()
{
$this->actingAs(User::factory()->admin()->create());
$componentType = ComponentType::factory()->create();
$this->delete('/admin/components/types/' . $componentType->id);
$this->delete('/dashboard/components/types/' . $componentType->id);
$this->assertDatabaseMissing('component_types', ['id' => $componentType->id]);
}

/** @test */
public function unauthorized_user_cannot_delete_component_type_item()
{
$componentType = ComponentType::factory()->create();
$response = $this->delete('/admin/components/types/' . $componentType->id);
$response = $this->delete('/dashboard/components/types/' . $componentType->id);
$response->assertStatus(302);
}

}
29 changes: 14 additions & 15 deletions tests/Feature/Backend/Consumable/ConsumableItemTest.php
Original file line number Diff line number Diff line change
@@ -20,37 +20,37 @@ class ConsumableItemTest extends TestCase
public function an_admin_can_access_the_list_consumable_page()
{
$this->loginAsAdmin();
$this->get('/admin/consumables/items/')->assertOk();
$this->get('/dashboard/consumables/items/')->assertOk();
}

/** @test */
public function an_admin_can_access_the_create_consumable_page()
{
$this->loginAsAdmin();
$this->get('/admin/consumables/items/create')->assertOk();
$this->get('/dashboard/consumables/items/create')->assertOk();
}

/** @test */
public function an_admin_can_access_the_show_consumable_page()
{
$this->loginAsAdmin();
$consumable = ConsumableItem::factory()->create();
$this->get('/admin/consumables/items/' . $consumable->id)->assertOk();
$this->get('/dashboard/consumables/items/' . $consumable->id)->assertOk();
}

/** @test */
public function an_admin_can_access_the_delete_consumable_page()
{
$this->loginAsAdmin();
$consumable = ConsumableItem::factory()->create();
$this->get('/admin/consumables/items/delete/' . $consumable->id)->assertOk();
$this->get('/dashboard/consumables/items/delete/' . $consumable->id)->assertOk();
}

/** @test */
public function create_consumable_requires_validation()
{
$this->loginAsAdmin();
$response = $this->post('/admin/consumables/items/');
$response = $this->post('/dashboard/consumables/items/');
$response->assertSessionHasErrors(['title', 'consumable_type_id']);
}

@@ -60,15 +60,15 @@ public function update_consumable_requires_validation()
$this->loginAsAdmin();
$consumable = ConsumableItem::factory()->create();

$response = $this->put("/admin/consumables/items/{$consumable->id}", []);
$response = $this->put("/dashboard/consumables/items/{$consumable->id}", []);
$response->assertSessionHasErrors(['title', 'consumable_type_id']);
}

/** @test */
public function an_consumable_can_be_created()
{
$this->loginAsAdmin();
$response = $this->post('/admin/consumables/items', [
$response = $this->post('/dashboard/consumables/items', [

'title' => 'Sample consumable',
'specifications' => 'UA741CP OpAmp 1MHz',
@@ -105,7 +105,7 @@ public function an_consumable_can_be_updated()
$consumable->title = 'New consumable Title';
$consumable_array = $consumable->toArray();
$consumable_array['location'] = 2;
$response = $this->put("/admin/consumables/items/{$consumable->id}", $consumable_array);
$response = $this->put("/dashboard/consumables/items/{$consumable->id}", $consumable_array);
$response->assertStatus(302);

$this->assertDatabaseHas('consumable_items', [
@@ -118,24 +118,24 @@ public function delete_consumable_item()
{
$this->actingAs(User::factory()->admin()->create());
$consumable = ConsumableItem::factory()->create();
// create item locations for this item
// create item locations for this item
ItemLocations::factory()->create(
[
'item_id' => $consumable->inventoryCode(),
'location_id' => 1,
]
);

$response = $this->delete('/admin/consumables/items/' . $consumable->id);
// dd($response->getContent());
$response = $this->delete('/dashboard/consumables/items/' . $consumable->id);
// dd($response->getContent());
$this->assertDatabaseMissing('consumable_items', ['id' => $consumable->id]);
}

/** @test */
public function unauthorized_user_cannot_delete_consumable_item()
{
$consumable = ConsumableItem::factory()->create();
$response = $this->delete('/admin/consumables/items/' . $consumable->id);
$response = $this->delete('/dashboard/consumables/items/' . $consumable->id);
$response->assertStatus(302);
}

@@ -152,7 +152,7 @@ public function shows_single_location()
);

$locationName = Locations::where('id', 1)->first()->location;
$response = $this->get('/admin/consumables/items/' . $consumable->id);
$response = $this->get('/dashboard/consumables/items/' . $consumable->id);
$response->assertSee($locationName);
}

@@ -175,10 +175,9 @@ public function shows_multiple_locations()
);

$locationName = Locations::where('id', 1)->first()->location;
$response = $this->get('/admin/consumables/items/' . $consumable->id);
$response = $this->get('/dashboard/consumables/items/' . $consumable->id);
$response->assertSee($locationName);
$locationName = Locations::where('id', 2)->first()->location;
$response->assertSee($locationName);
}

}
Loading