|
1 | 1 | <?php
|
2 | 2 |
|
3 | 3 | use Native\Laravel\Facades\Window;
|
| 4 | +use Native\Laravel\Windows\Window as WindowClass; |
4 | 5 |
|
5 | 6 | it('test window', function () {
|
| 7 | + Window::shouldReceive('open') |
| 8 | + ->andReturn(new WindowClass('main')); |
| 9 | + |
6 | 10 | $window = Window::open()
|
7 | 11 | ->id('main')
|
8 | 12 | ->title('milwad')
|
|
38 | 42 | expect($windowArray['minimizable'])->toBeTrue();
|
39 | 43 | expect($windowArray['maximizable'])->toBeTrue();
|
40 | 44 | expect($windowArray['closable'])->toBeTrue();
|
41 |
| - expect($windowArray['fullscreen'])->toBeFalse(); |
| 45 | + expect($windowArray['fullscreen'])->toBeTrue(); |
42 | 46 | expect($windowArray['kiosk'])->toBeFalse();
|
43 | 47 | expect($windowArray['autoHideMenuBar'])->toBeTrue();
|
44 | 48 | });
|
45 | 49 |
|
46 | 50 | it('test title bar for window', function () {
|
| 51 | + Window::shouldReceive('open') |
| 52 | + ->andReturn(new WindowClass('main')); |
| 53 | + |
47 | 54 | $window = Window::open()
|
48 | 55 | ->titleBarHidden();
|
49 | 56 |
|
|
59 | 66 | });
|
60 | 67 |
|
61 | 68 | it('test for trafficLightPosition in window', function () {
|
| 69 | + Window::shouldReceive('open') |
| 70 | + ->andReturn(new WindowClass('main')); |
| 71 | + |
62 | 72 | $window = Window::open()
|
63 | 73 | ->trafficLightPosition(10, 10);
|
64 | 74 |
|
|
78 | 88 | });
|
79 | 89 |
|
80 | 90 | it('test for invisibleFrameless in window', function () {
|
| 91 | + Window::shouldReceive('open') |
| 92 | + ->andReturn(new WindowClass('main')); |
| 93 | + |
81 | 94 | $window = Window::open()->invisibleFrameless();
|
82 | 95 | $windowArray = $window->toArray();
|
83 | 96 |
|
84 |
| - expect($windowArray['frame'])->toBeTrue(); |
| 97 | + expect($windowArray['frame'])->toBeFalse(); |
85 | 98 | expect($windowArray['transparent'])->toBeTrue();
|
86 | 99 | expect($windowArray['focusable'])->toBeFalse();
|
87 | 100 | expect($windowArray['hasShadow'])->toBeFalse();
|
|
0 commit comments