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

[BE] Check features test #97 #101

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a1e61fd
Adding lang package
levifvy Jul 22, 2023
10d0d27
Adding static translations functions
levifvy Jul 22, 2023
c58f01f
Adding Traits directory and configure mutators.
levifvy Jul 23, 2023
ed0207b
setting functionalities tanslatable
levifvy Jul 23, 2023
aacc548
Adding trait to switcher
levifvy Jul 24, 2023
84c5bad
addig accept_language variable to localization
levifvy Jul 25, 2023
8f8b075
making a link to data bases
levifvy Jul 26, 2023
d922bc8
setting TranslatableDatabasesvalue
levifvy Jul 26, 2023
e2eb1cc
Merge branch 'develop' of https://github.com/IT-Academy-BCN/ita-landi…
Edvenan Oct 1, 2023
55deca9
Clean up of files not required to meet the feature requirements
Edvenan Oct 4, 2023
4108dcc
Installed Laravel-Translatable pkg and Localization lang files
Edvenan Oct 4, 2023
e580809
Updated SetLocale Middleware
Edvenan Oct 4, 2023
db635aa
Configured Default and Supported locales
Edvenan Oct 4, 2023
de48ca8
Refactored Models and Migrations to implement Multilanguage
Edvenan Oct 4, 2023
d188871
Refactored Controllers to implement Localization and Multilanguage
Edvenan Oct 4, 2023
3c5bf05
Feature Test Suite added
Edvenan Oct 4, 2023
222af56
Merge branch 'develop' of https://github.com/IT-Academy-BCN/ita-landi…
Edvenan Oct 4, 2023
39941ef
Deleted file no longer needed that was causing a bug in SonarCloud
Edvenan Oct 5, 2023
6beff41
multilanguage annotation added to AnnotationsInfo.php
androsrivas Oct 24, 2023
ca9868e
AnnotationsInfo.php updated
androsrivas Oct 30, 2023
004d456
add github field in AnnotationsApp.php
androsrivas Oct 30, 2023
083a4a6
add translatable fields annotations for app and faq controllers
androsrivas Oct 31, 2023
8acbba7
new doc generated
androsrivas Oct 31, 2023
a9d233a
refactored swagger annotations to document new translatable package
androsrivas Nov 6, 2023
1527763
format MultilanguageTest to follow per specifications
androsrivas Nov 6, 2023
b52cbee
AppTest working
androsrivas Nov 9, 2023
a1d4fdc
Add annotations to exclude from massive testing
androsrivas Nov 21, 2023
da8e2ad
update Login, register and reset password test. Update User and Auth …
androsrivas Nov 21, 2023
8c31128
update App controller and multilanguage test. add name routes to faq …
androsrivas Nov 21, 2023
c252610
create Faq resource
androsrivas Nov 21, 2023
28a714b
some test solved
androsrivas Nov 21, 2023
cd44535
Add annotations for excluding CollaboratorTest from massive testing.
androsrivas Nov 21, 2023
00810bd
Implement language-based HTTP status messages and improve exception h…
androsrivas Nov 21, 2023
13e3d30
FaqsTest modified and working
androsrivas Nov 22, 2023
be90650
add pint.yml action
androsrivas Nov 22, 2023
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
23 changes: 23 additions & 0 deletions .github/workflow/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PHP Linting (Pint)
on:
workflow_dispatch:
pull_request:
jobs:
phplint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Pinting
uses: aglipanci/[email protected]
with:
configPath: "pint.json"
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: PHP Linting (Pint)
skip_fetch: true
13 changes: 7 additions & 6 deletions app/Annotations/OpenApi/AnnotationsInfo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

namespace App\Annotations\OpenApi;

Expand All @@ -8,12 +8,13 @@
* version="1.0.0",
* description="Documentation needed for the API Rest for the landing page to IT Academy. Some useful links below:
* [ITA Landing Backend](https://github.com/IT-Academy-BCN/ita-landing-backend)
* [ITA Landing Frontend](https://github.com/IT-Academy-BCN/ita-landing-frontend)"
* [ITA Landing Frontend](https://github.com/IT-Academy-BCN/ita-landing-frontend)
* This API supports both Catalan and Spanish languages using the 'Accept-Language' header.
* The default language is Catalan.",
* )
* @OA\Server(
* url="http://127.0.0.1:8000/api"
* )
* @OA\Server(
* url="http://127.0.0.1:8000/api"
* )
*/

class AnnotationsInfo {}
class AnnotationsInfo {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

namespace App\Annotations\OpenApi\controllersAnnotations\appAnnotations;

Expand Down Expand Up @@ -30,14 +30,32 @@ public function index() {}
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="title",
* type="string",
* example="My application"
* property="ca",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Títol de la meva aplicació"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Descripció de la meva aplicació"
* ),
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Description of my application"
* property="es",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Título de mi aplicación"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Descripción de mi aplicación"
* ),
* ),
* @OA\Property(
* property="url",
Expand Down Expand Up @@ -65,7 +83,7 @@ public function index() {}
* )
* )
*/
public function store() {}
public function store() {}

/**
* @OA\Get(
Expand All @@ -89,10 +107,10 @@ public function store() {}
* description="Details of the application."
* )
* )
*/
public function show() {}
*/
public function show() {}

/**
/**
* @OA\Put(
* path="/apps/{id}",
* tags={"Apps"},
Expand All @@ -115,21 +133,39 @@ public function show() {}
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="title",
* type="string",
* example="New title of my application"
* property="ca",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Nou títol"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Nova descripció"
* ),
* ),
* @OA\Property(
* property="description",
* type="string",
* example="New description of my application"
* property="es",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Nuevo título"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Nueva descripción"
* ),
* ),
* @OA\Property(
* property="url",
* type="string",
* example="https://myapp.com/new-version"
* ),
* @OA\Property(
* @OA\Property(
* property="github",
* type="string",
* example="https://github.com/IT-Academy-BCN/project-1"
Expand All @@ -149,9 +185,9 @@ public function show() {}
* )
* )
*/
public function update() {}
public function update() {}

/**
/**
* @OA\Delete(
* path="/apps/{id}",
* tags={"Apps"},
Expand All @@ -174,5 +210,5 @@ public function update() {}
* )
* )
*/
public function destroy() {}
}
public function destroy() {}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php

namespace App\Annotations\OpenApi\controllersAnnotations\authAnnotations;

class AnnotationsAuth {

/**
/**
* @OA\Post(
* path="/login",
* tags={"User"},
Expand All @@ -30,10 +30,9 @@ class AnnotationsAuth {
* ),
* @OA\Response(
* response="200",
* description="Access token for the user."
* description="Access token for the user. The response message may vary based on user's language settings."
* )
* )
*/

public function loginUser() {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ class AnnotationsCode {
* )
* )
*/

public function sendCodeByEmail() {}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php

namespace App\Annotations\OpenApi\controllersAnnotations\collaboratorsAnnotations;

class AnnotationsCollaborators {

/**
/**
* @OA\Get(
* path="/collaborators/{area}",
* tags={"Collaborators"},
Expand Down Expand Up @@ -50,6 +50,5 @@ class AnnotationsCollaborators {
* )
* )
*/

public function index() {}
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php
<?php

namespace App\Annotations\OpenApi\controllersAnnotations\faqsAnnotations;

class AnnotationsFaqs {

/**
/**
* @OA\Get(
* path="/faqs",
* tags={"Faqs"},
* summary="Get list of frequently asked questions (FAQs)",
* description="This endpoint is used to get a list of all frequently asked questions.",
* description="This endpoint is used to get a list of all frequently asked questions.",
* @OA\Response(
* response="200",
* description="Frequently asked questions list."
* )
* )
*/
public function index() {}
public function index() {}

/**
/**
* @OA\Get(
* path="/faqs/{id}",
* tags={"Faqs"},
Expand All @@ -41,9 +41,9 @@ public function index() {}
* )
* )
*/
public function show() {}
public function show() {}

/**
/**
* @OA\Post(
* path="/faqs",
* tags={"Faqs"},
Expand All @@ -55,14 +55,32 @@ public function show() {}
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="title",
* type="string",
* example="My frequently asked question"
* property="ca",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Títol de la meva pregunta freqüent"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Descripció de la meva pregunta freqüent"
* ),
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Description of my FAQ"
* property="es",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Título de mi pregunta frecuente"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Descripción de mi pregunta frecuente"
* ),
* )
* )
* )
Expand All @@ -74,9 +92,9 @@ public function show() {}
* )
* )
*/
public function store() {}
public function store() {}

/**
/**
* @OA\Put(
* path="/faqs/{id}",
* tags={"Faqs"},
Expand All @@ -98,14 +116,32 @@ public function store() {}
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="title",
* type="string",
* example="New title of my FAQ"
* property="ca",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Nou títol de FAQ"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Nova descripció de FAQ"
* ),
* ),
* @OA\Property(
* property="description",
* type="string",
* example="New description of my FAQ"
* property="es",
* type="object",
* @OA\Property(
* property="title",
* type="string",
* example="Nueva descripción de FAQ"
* ),
* @OA\Property(
* property="description",
* type="string",
* example="Nueva descripción de GAQ"
* ),
* )
* )
* )
Expand All @@ -117,9 +153,9 @@ public function store() {}
* )
* )
*/
public function update() {}
public function update() {}

/**
/**
* @OA\Delete(
* path="/faqs/{id}",
* tags={"Faqs"},
Expand All @@ -142,6 +178,5 @@ public function update() {}
* )
* )
*/

public function delete() {}
}
public function delete() {}
}
Loading