Lint PHP code psr-12, add GH action
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
use App\Service\Forms\FormLogicPropertyResolver;
|
||||
|
||||
it('can validate form logic property resolver', function ($property, $formData, $expectedResult) {
|
||||
@@ -7,103 +8,103 @@ it('can validate form logic property resolver', function ($property, $formData,
|
||||
})->with([
|
||||
[
|
||||
[
|
||||
'id' => "title",
|
||||
'name' => "Name",
|
||||
'id' => 'title',
|
||||
'name' => 'Name',
|
||||
'type' => 'text',
|
||||
'hidden' => false,
|
||||
'required' => true,
|
||||
'logic' => [
|
||||
"conditions" => [
|
||||
"operatorIdentifier"=> "and",
|
||||
"children"=> [
|
||||
'conditions' => [
|
||||
'operatorIdentifier' => 'and',
|
||||
'children' => [
|
||||
[
|
||||
"identifier"=> "user",
|
||||
"value"=> [
|
||||
"operator"=> "is_not_empty",
|
||||
"property_meta"=> [
|
||||
'id'=> "93ea3198-353f-440b-8dc9-2ac9a7bee124",
|
||||
"type"=> "select",
|
||||
'identifier' => 'user',
|
||||
'value' => [
|
||||
'operator' => 'is_not_empty',
|
||||
'property_meta' => [
|
||||
'id' => '93ea3198-353f-440b-8dc9-2ac9a7bee124',
|
||||
'type' => 'select',
|
||||
],
|
||||
"value"=> true
|
||||
]
|
||||
]
|
||||
]
|
||||
'value' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
"actions" => ['make-it-optional']
|
||||
]
|
||||
'actions' => ['make-it-optional'],
|
||||
],
|
||||
],
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124'=>["One"]],
|
||||
false
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124' => ['One']],
|
||||
false,
|
||||
],
|
||||
[
|
||||
[
|
||||
'id' => "title",
|
||||
'name' => "Name",
|
||||
'id' => 'title',
|
||||
'name' => 'Name',
|
||||
'type' => 'text',
|
||||
'hidden' => false,
|
||||
'required' => true,
|
||||
'logic' => [
|
||||
"conditions" => [
|
||||
"operatorIdentifier"=> "and",
|
||||
"children"=> [
|
||||
'conditions' => [
|
||||
'operatorIdentifier' => 'and',
|
||||
'children' => [
|
||||
[
|
||||
"identifier"=> "user",
|
||||
"value"=> [
|
||||
"operator"=> "is_not_empty",
|
||||
"property_meta"=> [
|
||||
'id'=> "93ea3198-353f-440b-8dc9-2ac9a7bee124",
|
||||
"type"=> "select",
|
||||
'identifier' => 'user',
|
||||
'value' => [
|
||||
'operator' => 'is_not_empty',
|
||||
'property_meta' => [
|
||||
'id' => '93ea3198-353f-440b-8dc9-2ac9a7bee124',
|
||||
'type' => 'select',
|
||||
],
|
||||
"value"=> true
|
||||
]
|
||||
]
|
||||
]
|
||||
'value' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
"actions" => ['make-it-optional']
|
||||
]
|
||||
'actions' => ['make-it-optional'],
|
||||
],
|
||||
],
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124'=>[]],
|
||||
true
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124' => []],
|
||||
true,
|
||||
],
|
||||
[
|
||||
[
|
||||
'id' => "title",
|
||||
'name' => "Name",
|
||||
'id' => 'title',
|
||||
'name' => 'Name',
|
||||
'type' => 'text',
|
||||
'hidden' => false,
|
||||
'required' => true,
|
||||
'logic' => [
|
||||
"conditions" => [
|
||||
"operatorIdentifier"=> "or",
|
||||
"children"=> [
|
||||
'conditions' => [
|
||||
'operatorIdentifier' => 'or',
|
||||
'children' => [
|
||||
[
|
||||
"identifier"=> "user",
|
||||
"value"=> [
|
||||
"operator"=> "is_not_empty",
|
||||
"property_meta"=> [
|
||||
'id'=> "93ea3198-353f-440b-8dc9-2ac9a7bee124",
|
||||
"type"=> "select",
|
||||
'identifier' => 'user',
|
||||
'value' => [
|
||||
'operator' => 'is_not_empty',
|
||||
'property_meta' => [
|
||||
'id' => '93ea3198-353f-440b-8dc9-2ac9a7bee124',
|
||||
'type' => 'select',
|
||||
],
|
||||
"value"=> true
|
||||
]
|
||||
'value' => true,
|
||||
],
|
||||
],
|
||||
[
|
||||
"identifier"=> "email",
|
||||
"value"=> [
|
||||
"operator"=> "contains",
|
||||
"property_meta"=> [
|
||||
'id'=> "93ea3198-353f-440b-8dc9-2ac9a7bee222",
|
||||
"type"=> "email",
|
||||
'identifier' => 'email',
|
||||
'value' => [
|
||||
'operator' => 'contains',
|
||||
'property_meta' => [
|
||||
'id' => '93ea3198-353f-440b-8dc9-2ac9a7bee222',
|
||||
'type' => 'email',
|
||||
],
|
||||
"value"=> "abc"
|
||||
]
|
||||
]
|
||||
]
|
||||
'value' => 'abc',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
"actions" => ['make-it-optional']
|
||||
]
|
||||
'actions' => ['make-it-optional'],
|
||||
],
|
||||
],
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124'=>[], '93ea3198-353f-440b-8dc9-2ac9a7bee222'=>['abc']],
|
||||
false
|
||||
]
|
||||
]);
|
||||
['93ea3198-353f-440b-8dc9-2ac9a7bee124' => [], '93ea3198-353f-440b-8dc9-2ac9a7bee222' => ['abc']],
|
||||
false,
|
||||
],
|
||||
]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
uses(\Tests\TestCase::class);
|
||||
|
||||
use \Illuminate\Support\Str;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
it('can parse filenames', function () {
|
||||
$fileName = 'Notion_app_logo_85e16d7b-58ed-43bc-8dce-7d3ff7d69f41.png';
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
uses(\Tests\TestCase::class);
|
||||
|
||||
use function Pest\Faker\faker;
|
||||
use Tests\Helpers\FormSubmissionDataFactory;
|
||||
|
||||
it('can create pro user who are subscribed', function () {
|
||||
$user = $this->actingAsProUser();
|
||||
expect($user->is_subscribed)->toBeTrue();
|
||||
@@ -19,7 +16,7 @@ it('can create test workspace', function () {
|
||||
it('can make a form for a database', function () {
|
||||
$user = $this->actingAsProUser();
|
||||
$workspace = $this->createUserWorkspace($user);
|
||||
$form = $this->makeForm($user,$workspace);
|
||||
$form = $this->makeForm($user, $workspace);
|
||||
expect($form->title)->not()->toBeNull();
|
||||
expect($form->description)->not()->toBeNull();
|
||||
expect(count($form->properties))->not()->toBe(0);
|
||||
|
||||
Reference in New Issue
Block a user