AKaramanec

AKaramanec

Member Since 6 Months Ago

Experience Points
14,800
Total
Experience

200 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
148
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 3
14,800 XP
Nov
08
3 months ago
Activity icon

Replied to Laravel Dusk. Сan’t Transfer More Than One Browser Between Tests

I understood now how it work on dusk. What I don't understand - why it work exactly right that. I have 100 test where I need to be logged on three different sites with three different users. Every logging process takes from 50 sec to 1 min 10 sec.In the context of all tests, this takes approximately 1 hour. I solved this problem. But I had to get into the code of Dusk. I had to make copies of Laravel\Dusk\TestCase to MyTestCase and there use my copy of Concerns\ProvidesBrowser as MyProviderBrowser where a add this code:

public function browse(Closure $callback)
{
    $browsers = $this->createBrowsersFor($callback);

    try {
        $callback(...$browsers->all());
    } catch (Exception $e) {
        $this->captureFailuresFor($browsers);

        throw $e;
    } catch (Throwable $e) {
        $this->captureFailuresFor($browsers);

        throw $e;
    } finally {
        $this->storeConsoleLogsFor($browsers);

        static::$browsers = $this->closeAllButThreePrimary($browsers);
    }
}

this:

protected function createBrowsersFor(Closure $callback)
{
    $browsers_count = count(static::$browsers);

    if ($browsers_count === 0) {
        static::$browsers = collect([$this->newBrowser($this->createWebDriver())]);
    }

    if ($browsers_count >= $this->browsersNeededFor($callback)) {
        return static::$browsers;
    }

    $additional = $this->browsersNeededFor($callback) - 1;

    for ($i = 0; $i < $additional; $i++) {
        static::$browsers->push($this->newBrowser($this->createWebDriver()));
    }

    return static::$browsers;
}

and this:

protected function closeAllButThreePrimary($browsers)
{
    $browsers->slice(3)->each->quit();

    return $browsers->take(3);
}
Nov
07
3 months ago
Activity icon

Replied to Laravel Dusk. Сan’t Transfer More Than One Browser Between Tests

No, it not work... Only first browser continue old seshin, second reopen (((

Nov
02
3 months ago
Activity icon

Started a new Conversation Laravel Dusk. Сan’t Transfer More Than One Browser Between Tests

When I work with two browsers in several tests, when I call the next test, only the first one remains operational, the second one closes and reopens. Since I need both with logged in users, this makes it impossible to pass the test.

As an example:

public function setUp(): void
{
    parent::setUp();

    foreach (static::$browsers as $browser) {
        $browser->driver->manage()->deleteAllCookies();
    }

    $this->browse(function (Browser $browser, Browser $browser2) {
        $browser->visit("https://www.blablabla/")
            ->loginAs("User");
        $browser2->visit("https://www.blablabla/admin/")
            ->loginAs("Admin");

    });
}

/** @test
 */
public function testingPolygon()
{
    $this->browse(function (Browser $browser, Browser $browser2) {
        $browser->assertUrlIs("https://www.blablabla/");
        $browser2->assertUrlIs("https://www.blablabla/admin/");
    });
}

The first browser passes the test, the second no.

How to make sure that the second browser does not reopens too?

Sep
10
5 months ago
Activity icon

Started a new Conversation Laravel Dusk Testing Result Shows Without Colors

https://www.screencast.com/t/IDFcRcVz

How can you see for the link, result of dusk testing is not colors, but phpubit result is colors. How can I soulve this problem?

WIn10 Git Bash

phpunit.dusk.xml - https://www.screencast.com/t/504U1JFzmuxn

Programs versions: PHP 7.3.8 PHPUnit 7.5.15 Laravel Framework 5.8.34

Aug
24
6 months ago
Activity icon

Replied to Problems On The Laracast 5.7 Episode 8 Lesson Page

I usually use Google. I tried to run in Firefox - the same thing, they do not load. But in Explorer 11 they booted, but the frame with the video is very shifted to the left and did not see anything

Activity icon

Started a new Conversation Problems On The Laracast 5.7 Episode 8 Lesson Page

On the lesson page, blocks with videos, lessons learned and others are not loaded.