merge with master

This commit is contained in:
rahul shukla 2019-04-16 15:35:54 +05:30
commit d568ea4bbe
42 changed files with 324 additions and 73 deletions

View File

@ -36,6 +36,7 @@
"barryvdh/laravel-debugbar": "^3.1",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"laravel/dusk": "^4.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"

View File

@ -8,5 +8,15 @@ return [
* VendorB\ModuleY\Providers\ModuleServiceProvider::class
*
*/
\Webkul\Attribute\Providers\ModuleServiceProvider::class,
\Webkul\Category\Providers\ModuleServiceProvider::class,
\Webkul\Checkout\Providers\ModuleServiceProvider::class,
\Webkul\Core\Providers\ModuleServiceProvider::class,
\Webkul\Customer\Providers\ModuleServiceProvider::class,
\Webkul\Inventory\Providers\ModuleServiceProvider::class,
\Webkul\Product\Providers\ModuleServiceProvider::class,\Webkul\Sales\Providers\ModuleServiceProvider::class,
\Webkul\Tax\Providers\ModuleServiceProvider::class,
\Webkul\User\Providers\ModuleServiceProvider::class
]
];

View File

@ -9,14 +9,14 @@ return [
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
|
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
//
'telescope*'
],
/*
@ -79,7 +79,7 @@ return [
|
*/
'error_handler' => false,
/*
|--------------------------------------------------------------------------
| Clockwork integration
@ -143,7 +143,7 @@ return [
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
@ -198,4 +198,4 @@ return [
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
];
];

View File

@ -3,6 +3,7 @@
use Maatwebsite\Excel\Excel;
return [
'exports' => [
/*
@ -16,17 +17,6 @@ return [
*/
'chunk_size' => 1000,
/*
|--------------------------------------------------------------------------
| Temporary path
|--------------------------------------------------------------------------
|
| When exporting files, we use a temporary file, before storing
| or downloading. Here you can customize that path.
|
*/
'temp_path' => sys_get_temp_dir(),
/*
|--------------------------------------------------------------------------
| Pre-calculate formulas during export
@ -69,6 +59,23 @@ return [
*/
'formatter' => 'slug',
],
/*
|--------------------------------------------------------------------------
| CSV Settings
|--------------------------------------------------------------------------
|
| Configure e.g. delimiter, enclosure and line ending for CSV imports.
|
*/
'csv' => [
'delimiter' => ',',
'enclosure' => '"',
'line_ending' => PHP_EOL,
'use_bom' => false,
'include_separator_line' => false,
'excel_compatibility' => false,
],
],
/*
@ -109,4 +116,71 @@ return [
*/
'pdf' => Excel::DOMPDF,
],
];
'value_binder' => [
/*
|--------------------------------------------------------------------------
| Default Value Binder
|--------------------------------------------------------------------------
|
| PhpSpreadsheet offers a way to hook into the process of a value being
| written to a cell. In there some assumptions are made on how the
| value should be formatted. If you want to change those defaults,
| you can implement your own default value binder.
|
*/
'default' => Maatwebsite\Excel\DefaultValueBinder::class,
],
'transactions' => [
/*
|--------------------------------------------------------------------------
| Transaction Handler
|--------------------------------------------------------------------------
|
| By default the import is wrapped in a transaction. This is useful
| for when an import may fail and you want to retry it. With the
| transactions, the previous import gets rolled-back.
|
| You can disable the transaction handler by setting this to null.
| Or you can choose a custom made transaction handler here.
|
| Supported handlers: null|db
|
*/
'handler' => 'db',
],
'temporary_files' => [
/*
|--------------------------------------------------------------------------
| Local Temporary Path
|--------------------------------------------------------------------------
|
| When exporting and importing files, we use a temporary file, before
| storing reading or downloading. Here you can customize that path.
|
*/
'local_path' => sys_get_temp_dir(),
/*
|--------------------------------------------------------------------------
| Remote Temporary Disk
|--------------------------------------------------------------------------
|
| When dealing with a multi server setup with queues in which you
| cannot rely on having a shared local temporary path, you might
| want to store the temporary file on a shared disk. During the
| queue executing, we'll retrieve the temporary file from that
| location instead. When left to null, it will always use
| the local path. This setting only has effect when using
| in conjunction with queued imports and exports.
|
*/
'remote_disk' => null,
],
];

View File

@ -2,6 +2,21 @@
return [
/*
|--------------------------------------------------------------------------
| Console Commands
|--------------------------------------------------------------------------
|
| This option allows you to add additional Artisan commands that should
| be available within the Tinker environment. Once the command is in
| this array you may execute the command in Tinker using its name.
|
*/
'commands' => [
// App\Console\Commands\ExampleCommand::class,
],
/*
|--------------------------------------------------------------------------
| Alias Blacklist
@ -13,6 +28,8 @@ return [
|
*/
'dont_alias' => [],
'dont_alias' => [
'App\Nova',
],
];
];

View File

@ -39,6 +39,8 @@ return [
| As a default locale, Translatable takes the locale of Laravel's
| translator. If for some reason you want to override this,
| you can specify what default should be used here.
| If you set a value here it will only use the current config value
| and never fallback to the translator one.
|
*/
'locale' => null,
@ -80,6 +82,18 @@ return [
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Translation Model Namespace
|--------------------------------------------------------------------------
|
| Defines the default 'Translation' class namespace. For example, if
| you want to use App\Translations\CountryTranslation instead of App\CountryTranslation
| set this to 'App\Translations'.
|
*/
'translation_model_namespace' => null,
/*
|--------------------------------------------------------------------------
| Translation Suffix

View File

@ -15,31 +15,36 @@ return [
* of your proxy (e.g. if using ELB or similar).
*
*/
'proxies' => null, // [<ip addresses>,], '*'
'proxies' => null, // [<ip addresses>,], '*', '<ip addresses>,'
/*
* To trust one or more specific proxies that connect
* directly to your server, use an array of IP addresses:
* directly to your server, use an array or a string separated by comma of IP addresses:
*/
# 'proxies' => ['192.168.1.1'],
// 'proxies' => ['192.168.1.1'],
// 'proxies' => '192.168.1.1, 192.168.1.2',
/*
* Or, to trust all proxies that connect
* directly to your server, use a "*"
*/
# 'proxies' => '*',
// 'proxies' => '*',
/*
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
*
*
* Options include:
*
*
* - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
* - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
*
* - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
* - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
* - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
*
* @link https://symfony.com/doc/current/deployment/proxies.html
*/
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
];
];

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=8924cabe48e17f2a3ba3",
"/js/admin.js": "/js/admin.js?id=4432c46ebc2216884b7a",
"/css/admin.css": "/css/admin.css?id=a71a72c31d6ac0fe375f"
}

View File

@ -302,7 +302,7 @@
</table>
</div>
<button type="button" class="btn btn-lg btn-primary" id="add-option-btn" style="margin-top: 20px" @click="addOptionRow()">
<button type="button" class="btn btn-lg btn-primary mt-20" id="add-option-btn" @click="addOptionRow()">
{{ __('admin::app.catalog.attributes.add-option-btn-title') }}
</button>
</div>

View File

@ -15,8 +15,6 @@ class AttributeServiceProvider extends ServiceProvider
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -16,8 +16,6 @@ class CategoryServiceProvider extends ServiceProvider
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -29,8 +29,6 @@ class CoreServiceProvider extends ServiceProvider
Validator::extend('code', 'Webkul\Core\Contracts\Validations\Code@passes');
Validator::extend('decimal', 'Webkul\Core\Contracts\Validations\Decimal@passes');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -17,7 +17,5 @@ class CustomerServiceProvider extends ServiceProvider
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer');
$this->app->register(ModuleServiceProvider::class);
}
}

View File

@ -16,8 +16,6 @@ class InventoryServiceProvider extends ServiceProvider
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -20,8 +20,6 @@ class ProductServiceProvider extends ServiceProvider
$this->app->register(EventServiceProvider::class);
$this->app->register(ModuleServiceProvider::class);
$this->composeView();
$this->publishes([

View File

@ -11,8 +11,6 @@ class SalesServiceProvider extends ServiceProvider
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=412d129ed770afb5dee3",
"/css/shop.css": "/css/shop.css?id=2b9c1c727f62acb5aa22"
"/css/shop.css": "/css/shop.css?id=8991884e53441d770cee"
}

View File

@ -421,7 +421,7 @@ input {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
grid-auto-rows: auto;
grid-column-gap: 48px;
grid-column-gap: 30px;
grid-row-gap: 15px;
justify-items: end;
}
@ -827,7 +827,6 @@ section.slider-block {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
padding-left: 12px;
font-family: "Montserrat", sans-serif;
font-size: 14px;
}
@ -854,9 +853,8 @@ section.slider-block {
> li {
display: inline-block;
border-right: 2px solid $border-color;
cursor: pointer;
padding: 0 15px;
min-height: 26px;
min-height: 15px;
padding-top: 3px;
&:first-child {
@ -1362,14 +1360,6 @@ section.slider-block {
.control-group {
.subscribe-field {
width: 100%;
&::-webkit-input-placeholder {
font-family: "montserrat", sans-serif;
}
&::-moz-placeholder {
font-family: "montserrat", sans-serif;
}
}
.btn-primary {
@ -2483,8 +2473,11 @@ section.cart {
padding-top: 20px;
.form-header {
display: inline-flex;
align-items: center;
justify-content: space-between;
width: 100%;
display: inline-block;
height: 30px;
.checkout-step-heading {
font-size: 24px;

View File

@ -97,11 +97,11 @@
</div>
<div style="margin-top: 15px;">
<a class="btn btn-primary btn-sm" href="{{ route('customer.session.index') }}" style="color: #ffffff">
<a class="btn btn-primary btn-md" href="{{ route('customer.session.index') }}" style="color: #ffffff">
{{ __('shop::app.header.sign-in') }}
</a>
<a class="btn btn-primary btn-sm" href="{{ route('customer.register.index') }}" style="float: right; color: #ffffff">
<a class="btn btn-primary btn-md" href="{{ route('customer.register.index') }}" style="float: right; color: #ffffff">
{{ __('shop::app.header.sign-up') }}
</a>
</div>

View File

@ -15,8 +15,6 @@ class TaxServiceProvider extends ServiceProvider
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -16,7 +16,7 @@
"extra": {
"laravel": {
"providers": [
"Webkul\\Ui\\UiServiceProvider"
"Webkul\\Ui\\Providers\\UiServiceProvider"
],
"aliases": {}
}

View File

@ -19,6 +19,7 @@
"flatpickr": "^4.4.6"
},
"dependencies": {
"tooltip.js": "^1.3.1",
"vue-swatches": "^1.0.3"
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js?id=b85ae4fe9fe1f4e140fd",
"/css/ui.css": "/css/ui.css?id=ebd8e367e702a3376353"
"/js/ui.js": "/js/ui.js?id=ab3c0287e6da076fc413",
"/css/ui.css": "/css/ui.css?id=0a7cb18085cb895b431f"
}

View File

@ -1,5 +1,6 @@
$font-color: #3a3a3a;
$brand-color: #0041FF;
$selection-color: rgba(0, 64, 255, 0.6);
$info-color: #204d74;
$danger-color: #FC6868;
$success-color: #4CAF50;

View File

@ -15,6 +15,11 @@
outline: none;
}
body {
letter-spacing: -0.26px;
line-height: 19px;
}
a:link,
a:hover,
a:visited,
@ -24,6 +29,11 @@ a:active {
color: $brand-color;
}
::selection {
background-color: $selection-color;
color: $color-white;
}
textarea {
resize: none;
}
@ -145,6 +155,10 @@ h5 {
}
}
.dropdown-toggle {
cursor: pointer;
}
.dropdown-open {
position: relative;
}

View File

@ -23,8 +23,6 @@ class UserServiceProvider extends ServiceProvider
$router->aliasMiddleware('admin', BouncerMiddleware::class);
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->app->register(ModuleServiceProvider::class);
}
/**

View File

@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
&copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@ -21,7 +21,7 @@
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@ -56,7 +56,7 @@
'into your web browser: [:actionURL](:actionURL)',
[
'actionText' => $actionText,
'actionURL' => $actionUrl
'actionURL' => $actionUrl,
]
)
@endcomponent

View File

@ -0,0 +1,26 @@
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ExampleTest extends DuskTestCase
{
/**
* A basic browser test example.
*
* @return void
*/
public function testBasicExample()
{
$this->browse(function (Browser $browser) {
$browser->visit('/customer/login')
->type('email', 'prashant@webkul.com')
->type('password', '12345678')
->click('input[type="submit"]')
->screenshot('error');
});
}
}

View File

@ -0,0 +1,41 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
class HomePage extends Page
{
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
//
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@element' => '#selector',
];
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Page as BasePage;
abstract class Page extends BasePage
{
/**
* Get the global element shortcuts for the site.
*
* @return array
*/
public static function siteElements()
{
return [
'@element' => '#selector',
];
}
}

2
tests/Browser/console/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
tests/Browser/screenshots/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

48
tests/DuskTestCase.php Normal file
View File

@ -0,0 +1,48 @@
<?php
namespace Tests;
use Laravel\Dusk\TestCase as BaseTestCase;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
abstract class DuskTestCase extends BaseTestCase
{
use CreatesApplication;
/**
* Prepare for Dusk test execution.
*
* @beforeClass
* @return void
*/
public static function prepare()
{
static::startChromeDriver();
}
/**
* Create the RemoteWebDriver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
*/
protected function driver()
{
$options = (new ChromeOptions)->addArguments([
'--disable-gpu',
'--headless',
'--no-sandbox'
]);
return RemoteWebDriver::create(
'http://localhost:9515/', DesiredCapabilities::chrome()
);
// return RemoteWebDriver::create(
// 'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
// ChromeOptions::CAPABILITY, $options
// )
// );
}
}