-
Notifications
You must be signed in to change notification settings - Fork 0
[55] fix admin name question option #75
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
Open
neellii
wants to merge
8
commits into
main
Choose a base branch
from
55-admin-name-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
793d3ed
fix: fix admin name option
d958860
Merge branch 'main' into 55-admin-name-fix
DenTray cc56666
Merge branch 'main' into 55-admin-name-fix
DenTray 02d8964
refactor: clean createAdminUser method, add tests
c7014a4
chore: merge with origin
e2ab430
test: fix tests
6c7eb99
chore: merge with main
6986207
test: fix tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/fixtures/InitCommandTest/admins_add_default_admin_default_credentials.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?php | ||
|
|
||
| use Illuminate\Database\Migrations\Migration; | ||
| use Illuminate\Support\Facades\App; | ||
| use Illuminate\Support\Facades\DB; | ||
| use Illuminate\Support\Facades\Hash; | ||
|
|
||
| return new class extends Migration | ||
| { | ||
| public function up(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins')->insert([ | ||
| 'email' => '[email protected]', | ||
| 'password' => Hash::make('123456'), | ||
| ]); | ||
| } | ||
| } | ||
|
|
||
| public function down(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins') | ||
| ->where('email', '[email protected]') | ||
| ->delete(); | ||
| } | ||
| } | ||
| }; |
28 changes: 28 additions & 0 deletions
28
tests/fixtures/InitCommandTest/admins_add_nova_admin_default_credentials.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?php | ||
|
|
||
| use Illuminate\Database\Migrations\Migration; | ||
| use Illuminate\Support\Facades\App; | ||
| use Illuminate\Support\Facades\DB; | ||
| use Illuminate\Support\Facades\Hash; | ||
|
|
||
| return new class extends Migration | ||
| { | ||
| public function up(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins')->insert([ | ||
| 'email' => '[email protected]', | ||
| 'password' => Hash::make('123456'), | ||
| ]); | ||
| } | ||
| } | ||
|
|
||
| public function down(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins') | ||
| ->where('email', '[email protected]') | ||
| ->delete(); | ||
| } | ||
| } | ||
| }; |
28 changes: 28 additions & 0 deletions
28
tests/fixtures/InitCommandTest/admins_add_telescope_admin_default_credentials.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?php | ||
|
|
||
| use Illuminate\Database\Migrations\Migration; | ||
| use Illuminate\Support\Facades\App; | ||
| use Illuminate\Support\Facades\DB; | ||
| use Illuminate\Support\Facades\Hash; | ||
|
|
||
| return new class extends Migration | ||
| { | ||
| public function up(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins')->insert([ | ||
| 'email' => '[email protected]', | ||
| 'password' => Hash::make('654321'), | ||
| ]); | ||
| } | ||
| } | ||
|
|
||
| public function down(): void | ||
| { | ||
| if (!App::environment('testing')) { | ||
| DB::table('admins') | ||
| ->where('email', '[email protected]') | ||
| ->delete(); | ||
| } | ||
| } | ||
| }; |
40 changes: 40 additions & 0 deletions
40
tests/fixtures/InitCommandTest/clerk_auth_default_admins_credentials_readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # My App | ||
|
|
||
| This project implements an API for the My App Web app. | ||
|
|
||
| ## Project Resources & Contacts | ||
|
|
||
| This section provides quick links to various resources and contacts associated | ||
| with this project. It's here to streamline your navigation and communication | ||
| process, so you can efficiently find what you need or reach out to who you need. | ||
|
|
||
| ### Resources | ||
|
|
||
| Below are links to tools and services used in this project: | ||
| - [Laravel Telescope](): This is debug assistant for the Laravel framework. (will be added later) | ||
| - [Laravel Nova](): This is admin panel for the Laravel framework. (will be added later) | ||
| - [API Documentation](https://mysite.com) | ||
|
|
||
| ### Contacts | ||
|
|
||
| Should you need assistance or have questions, feel free to connect with the following individuals: | ||
| - Manager: If you have any high-level project concerns, feel free to get in touch with our project manager. [Connect with Manager](mailto:[email protected]) | ||
| - Code Owner/Team Lead: For specific questions about the codebase or technical aspects, reach out to our team lead. [Connect with Team Lead](mailto:[email protected]) | ||
|
|
||
| Please be mindful of each individual's preferred contact method and office hours. | ||
|
|
||
| ## Credentials and Access | ||
|
|
||
| Default admin access: | ||
| - email `[email protected]` | ||
| - password `123456` | ||
|
|
||
| Laravel Telescope access: | ||
| - email `[email protected]` | ||
| - password `654321` | ||
|
|
||
| Laravel Nova access: | ||
| - email `[email protected]` | ||
| - password `123456` | ||
|
|
||
| Core auth solution is [Clerk](https://clerk.com) so in `development` environment use any test phones and emails from [this list](https://clerk.com/docs/testing/test-emails-and-phones) |
33 changes: 33 additions & 0 deletions
33
tests/fixtures/InitCommandTest/clerk_auth_type_admin_default_credentials_user_inputs.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| [ | ||
| "no", | ||
| "[email protected]", | ||
| "https://mysite.com", | ||
| "Web", | ||
| "clerk", | ||
| "yes", | ||
| null, | ||
| "123456", | ||
| "yes", | ||
| "yes", | ||
| "no", | ||
| "no", | ||
| "no", | ||
| "no", | ||
| "no", | ||
| "later", | ||
| "later", | ||
| "[email protected]", | ||
| "no", | ||
| "no", | ||
| "no", | ||
| "yes", | ||
| "no", | ||
| null, | ||
| "654321", | ||
| "no", | ||
| null, | ||
| "123456", | ||
| "no", | ||
| "no", | ||
| "no" | ||
| ] |
38 changes: 38 additions & 0 deletions
38
tests/fixtures/InitCommandTest/none_auth_default_admins_credentials_readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # My App | ||
|
|
||
| This project implements an API for the My App Web app. | ||
|
|
||
| ## Project Resources & Contacts | ||
|
|
||
| This section provides quick links to various resources and contacts associated | ||
| with this project. It's here to streamline your navigation and communication | ||
| process, so you can efficiently find what you need or reach out to who you need. | ||
|
|
||
| ### Resources | ||
|
|
||
| Below are links to tools and services used in this project: | ||
| - [Laravel Telescope](): This is debug assistant for the Laravel framework. (will be added later) | ||
| - [Laravel Nova](): This is admin panel for the Laravel framework. (will be added later) | ||
| - [API Documentation](https://mysite.com) | ||
|
|
||
| ### Contacts | ||
|
|
||
| Should you need assistance or have questions, feel free to connect with the following individuals: | ||
| - Manager: If you have any high-level project concerns, feel free to get in touch with our project manager. [Connect with Manager](mailto:[email protected]) | ||
| - Code Owner/Team Lead: For specific questions about the codebase or technical aspects, reach out to our team lead. [Connect with Team Lead](mailto:[email protected]) | ||
|
|
||
| Please be mindful of each individual's preferred contact method and office hours. | ||
|
|
||
| ## Credentials and Access | ||
|
|
||
| Default admin access: | ||
| - email `[email protected]` | ||
| - password `123456` | ||
|
|
||
| Laravel Telescope access: | ||
| - email `[email protected]` | ||
| - password `654321` | ||
|
|
||
| Laravel Nova access: | ||
| - email `[email protected]` | ||
| - password `123456` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.