Completed
Push — dev ( 39ba5f...0b8cdb )
by Tristan
04:57 queued 04:51
created

StaticPagesTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 24
dl 0
loc 41
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testStaticPages() 0 34 1
1
<?php
2
3
namespace Tests\Browser;
4
5
use Tests\DuskTestCase;
6
use Laravel\Dusk\Browser;
7
use Illuminate\Foundation\Testing\DatabaseMigrations;
8
9
class StaticPagesTest extends DuskTestCase
10
{
11
    /**
12
     * A basic browser test example.
13
     *
14
     * @return void
15
     */
16
    public function testStaticPages()
17
    {
18
        $this->browse(function (Browser $browser) {
19
20
            // Basic browser page tests, unauthenticated user
21
            $browser->visit('/')
22
                    ->assertSee('GC Talent Cloud')
23
                    ->assertDontSee('Oprah Winfrey Network');
24
25
            $browser->clickLink('Français')
26
                    ->assertSee('Nuage de talents du GC')
27
                    ->assertPathIs('/fr');
28
29
            $browser->clickLink('English')
30
                    ->assertSee('GC Talent Cloud')
31
                    ->assertDontSee('Job Mountain')
32
                    ->assertPathIs('/en');
33
34
            $browser->clickLink('FAQ')
35
                    ->assertSee('Talent Cloud User Guide')
36
                    ->assertPathIs('/en/faq');
37
38
            $browser->clickLink('Français')
39
                    ->assertSee('Nuage de talents : mode d\'emploi')
40
                    ->assertPathIs('/fr/faq');
41
42
            // TODO: Move to job application test
43
            $browser->clickLink('Parcourir les emplois')
44
                    ->assertSee('Parcourir les emplois')
45
                    ->assertPathIs('/fr/jobs');
46
47
            $browser->clickLink('English')
48
                    ->assertSee('Browse Jobs')
49
                    ->assertPathIs('/en/jobs');
50
51
        });
52
    }
53
}
54