diff --git a/resources/views/payments/pdf.blade.php b/resources/views/payments/pdf.blade.php index 4265e38..35b71ef 100755 --- a/resources/views/payments/pdf.blade.php +++ b/resources/views/payments/pdf.blade.php @@ -10,7 +10,7 @@ table.receipt-table { /*border: 1px solid #aaa;*/ border-collapse: collapse; - font-size:14px; + font-size:16px; max-width: 750px; } table.receipt-table td { @@ -22,10 +22,10 @@
| - {{ Html::image(url('assets/imgs/logo.png'), '', ['style' => 'width:100%']) }} + | + {{ Html::image(url('assets/imgs/logo.png'), '', ['style' => 'width: 100px;']) }} | -+ |
JasaWebsiteBanjarmasin.comJasa Pembuatan Website dan Aplikasi Berbasis Web
diff --git a/tests/Feature/ManageFeaturesTest.php b/tests/Feature/ManageFeaturesTest.php
index 4c73041..f291a26 100644
--- a/tests/Feature/ManageFeaturesTest.php
+++ b/tests/Feature/ManageFeaturesTest.php
@@ -47,20 +47,20 @@ class ManageFeaturesTest extends TestCase
/** @test */
public function admin_can_edit_feature_data()
{
- $user = factory(User::class, 3)->create();
- $this->actingAs($user[0]);
+ $users = factory(User::class, 3)->create();
+ $this->actingAs($users[0]);
$customer = factory(Customer::class)->create();
$project = factory(Project::class)->create(['customer_id' => $customer->id]);
- $feature = factory(Feature::class)->create(['worker_id' => $user[1]->id, 'project_id' => $project->id]);
+ $feature = factory(Feature::class)->create(['worker_id' => $users[1]->id, 'project_id' => $project->id]);
$this->visit(route('features.edit', $feature->id));
$this->submitForm(trans('feature.update'), [
'name' => 'Nama Fitur Edit',
'price' => 33333,
- 'worker_id' => $user[2]->id,
+ 'worker_id' => $users[2]->id,
'type_id' => 2,
]);
@@ -71,7 +71,7 @@ class ManageFeaturesTest extends TestCase
$this->seeInDatabase('features', [
'name' => 'Nama Fitur Edit',
'price' => 33333,
- 'worker_id' => $user[2]->id,
+ 'worker_id' => $users[2]->id,
'project_id' => $project->id,
'type_id' => 2,
]);
diff --git a/tests/Feature/ManageProjectsTest.php b/tests/Feature/ManageProjectsTest.php
index feecc9a..7271ef2 100644
--- a/tests/Feature/ManageProjectsTest.php
+++ b/tests/Feature/ManageProjectsTest.php
@@ -17,20 +17,22 @@ class ManageProjectsTest extends TestCase
$user = $this->adminUserSigningIn();
$customer = factory(Customer::class)->create();
- $this->visit(route('projects.index'));
- $this->seePageIs(route('projects.index'));
- $this->click(trans('project.create'));
- $this->seePageIs(route('projects.create'));
- $this->type('Project Baru', 'name');
- $this->select($customer->id, 'customer_id');
- $this->type('2016-04-15', 'proposal_date');
- $this->type('2000000', 'proposal_value');
- $this->type('Deskripsi project baru', 'description');
- $this->press(trans('project.create'));
+ $this->visit(route('projects.create'));
+
+ $this->submitForm(trans('project.create'), [
+ 'name' => 'Project Baru',
+ 'customer_id' => $customer->id,
+ 'proposal_date' => '2016-04-15',
+ 'proposal_value' => '2000000',
+ 'description' => 'Deskripsi project baru',
+ ]);
$this->see(trans('project.created'));
$this->see('Project Baru');
- $this->seeInDatabase('projects', ['name' => 'Project Baru', 'proposal_value' => '2000000']);
+ $this->seeInDatabase('projects', [
+ 'name' => 'Project Baru',
+ 'proposal_value' => '2000000',
+ ]);
}
/** @test */
@@ -38,32 +40,37 @@ class ManageProjectsTest extends TestCase
{
$user = $this->adminUserSigningIn();
- $this->visit(route('projects.index'));
- $this->seePageIs(route('projects.index'));
- $this->click(trans('project.create'));
- $this->seePageIs(route('projects.create'));
+ $this->visit(route('projects.create'));
// Invalid entry
- $this->type('Project Baru', 'name');
- $this->select('', 'customer_id');
- $this->type('2016-04-15', 'proposal_date');
- $this->type('2000000', 'proposal_value');
- $this->type('Deskripsi project baru', 'description');
- $this->press(trans('project.create'));
+ $this->submitForm(trans('project.create'), [
+ 'name' => 'Project Baru',
+ 'customer_id' => '',
+ 'proposal_date' => '2016-04-15',
+ 'proposal_value' => '2000000',
+ 'description' => 'Deskripsi project baru',
+ ]);
+
$this->seePageIs(route('projects.create'));
- $this->notSeeInDatabase('projects', ['name' => 'Project Baru', 'proposal_value' => '2000000']);
+
+ $this->notSeeInDatabase('projects', [
+ 'name' => 'Project Baru',
+ 'proposal_value' => '2000000',
+ ]);
$this->type('Customer Baru', 'customer_name');
$this->type('email@customer.baru', 'customer_email');
$this->press(trans('project.create'));
$this->see(trans('project.created'));
- $this->see('Project Baru');
+
$this->seeInDatabase('customers', [
'name' => 'Customer Baru',
'email' => 'email@customer.baru',
]);
+
$newCustomer = Customer::whereName('Customer Baru')->whereEmail('email@customer.baru')->first();
+
$this->seeInDatabase('projects', [
'name' => 'Project Baru',
'proposal_value' => '2000000',
diff --git a/tests/Feature/ManageTasksTest.php b/tests/Feature/ManageTasksTest.php
index c189551..7d4920c 100644
--- a/tests/Feature/ManageTasksTest.php
+++ b/tests/Feature/ManageTasksTest.php
@@ -3,7 +3,6 @@
namespace Tests\Feature;
use App\Entities\Projects\Feature;
-use App\Entities\Projects\Project;
use App\Entities\Projects\Task;
use Tests\TestCase;
@@ -13,28 +12,29 @@ class ManageTasksTest extends TestCase
public function admin_can_entry_task()
{
$user = $this->adminUserSigningIn();
- $project = factory(Project::class)->create();
+ $feature = factory(Feature::class)->create(['worker_id' => $user->id]);
- $feature = factory(Feature::class)->create(['worker_id' => $user->id, 'project_id' => $project->id]);
- $this->visit('features/'.$feature->id);
- $this->seePageIs('features/'.$feature->id);
+ $this->visit(route('features.show', $feature->id));
+ $this->seePageIs(route('features.show', $feature->id));
$this->see(trans('feature.tasks'));
- $this->see(trans('task.create'));
// Fill Form
- $this->type('Nama Task Baru', 'name');
- $this->type('Ipsam magnam laboriosam distinctio officia facere sapiente eius corporis', 'description');
- $this->type(70, 'progress');
- $this->type('tasks/create', 'route_name');
- $this->press(trans('task.create'));
+ $this->submitForm(trans('task.create'), [
+ 'name' => 'Nama Task Baru',
+ 'description' => 'Deskripsi task yang dikerjakani.',
+ 'progress' => 70,
+ 'route_name' => 'tasks/create',
+ ]);
- $this->seePageIs('features/'.$feature->id);
+ $this->seePageIs(route('features.show', $feature->id));
$this->see(trans('task.created'));
+
$this->seeInDatabase('tasks', [
- 'name' => 'Nama Task Baru',
- 'progress' => 70,
- 'feature_id' => $feature->id,
- 'route_name' => 'tasks/create',
+ 'name' => 'Nama Task Baru',
+ 'description' => 'Deskripsi task yang dikerjakani.',
+ 'progress' => 70,
+ 'feature_id' => $feature->id,
+ 'route_name' => 'tasks/create',
]);
}
@@ -42,25 +42,23 @@ class ManageTasksTest extends TestCase
public function admin_can_edit_task_data()
{
$user = $this->adminUserSigningIn();
- $project = factory(Project::class)->create();
-
- $feature = factory(Feature::class)->create(['worker_id' => $user->id, 'project_id' => $project->id]);
-
- $task = factory(Task::class)->create(['feature_id' => $feature->id]);
+ $feature = factory(Feature::class)->create(['worker_id' => $user->id]);
+ $task = factory(Task::class)->create(['feature_id' => $feature->id]);
- $this->visit('features/'.$feature->id);
+ $this->visit(route('features.show', $feature->id));
$this->click($task->id.'-tasks-edit');
- $this->seePageIs('features/'.$feature->id.'?action=task_edit&task_id='.$task->id);
+ $this->seePageIs(route('features.show', [$feature->id, 'action' => 'task_edit', 'task_id' => $task->id]));
$this->see(trans('task.edit'));
- $this->see(trans('task.update'));
// Fill Form
- $this->type('Nama Task Edit', 'name');
- $this->type(77, 'progress');
- $this->press(trans('task.update'));
+ $this->submitForm(trans('task.update'), [
+ 'name' => 'Nama Task Edit',
+ 'progress' => 77,
+ ]);
- $this->seePageIs('features/'.$feature->id);
+ $this->seePageIs(route('features.show', $feature->id));
$this->see(trans('task.updated'));
+
$this->seeInDatabase('tasks', [
'name' => 'Nama Task Edit',
'progress' => 77,
@@ -72,17 +70,15 @@ class ManageTasksTest extends TestCase
public function admin_can_delete_a_task()
{
$user = $this->adminUserSigningIn();
- $project = factory(Project::class)->create();
-
- $feature = factory(Feature::class)->create(['worker_id' => $user->id, 'project_id' => $project->id]);
+ $feature = factory(Feature::class)->create(['worker_id' => $user->id]);
+ $task = factory(Task::class)->create(['feature_id' => $feature->id]);
- $task = factory(Task::class)->create(['feature_id' => $feature->id]);
-
- $this->visit('features/'.$feature->id);
+ $this->visit(route('features.show', $feature->id));
$this->click($task->id.'-tasks-delete');
$this->see(trans('app.delete_confirm_button'));
$this->press(trans('app.delete_confirm_button'));
- $this->seePageIs('features/'.$feature->id);
+
+ $this->seePageIs(route('features.show', $feature->id));
$this->see(trans('task.deleted'));
}
}
diff --git a/tests/Feature/ManageVendorsTest.php b/tests/Feature/Partners/ManageVendorsTest.php
similarity index 98%
rename from tests/Feature/ManageVendorsTest.php
rename to tests/Feature/Partners/ManageVendorsTest.php
index c565e58..0e3b2f0 100644
--- a/tests/Feature/ManageVendorsTest.php
+++ b/tests/Feature/Partners/ManageVendorsTest.php
@@ -1,6 +1,6 @@
|