test: CTA hero agora ancora #sobre conforme preview

This commit is contained in:
2026-08-11 17:24:57 -03:00
parent 887df37fae
commit 8311f89850
2 changed files with 10 additions and 6 deletions

View File

@@ -84,8 +84,10 @@ it('reaches the primary CTA by keyboard and activates it', function (): void {
$outlineStyle = $page->script('() => getComputedStyle(document.activeElement).outlineStyle'); $outlineStyle = $page->script('() => getComputedStyle(document.activeElement).outlineStyle');
expect($outlineStyle)->not->toBe('none'); expect($outlineStyle)->not->toBe('none');
$page->keys('[data-testid="home-primary-cta"]', 'Enter') $page->keys('[data-testid="home-primary-cta"]', 'Enter');
->assertPathIs('/briefing');
$hash = $page->script('() => window.location.hash');
expect($hash)->toBe('#sobre');
}); });
it('loads covered public routes without console errors', function (): void { it('loads covered public routes without console errors', function (): void {

View File

@@ -183,8 +183,9 @@ it('keeps content and navigation usable without javascript', function (): void {
]) ])
->assertVisible('#hero-heading') ->assertVisible('#hero-heading')
->assertVisible('[data-testid="home-primary-cta"]') ->assertVisible('[data-testid="home-primary-cta"]')
->click('[data-testid="home-primary-cta"]') ->click('[data-testid="home-primary-cta"]');
->assertPathIs('/briefing');
expect($this->script('() => window.location.hash'))->toBe('#sobre');
}); });
it('keeps targets final when intersection observer is unavailable', function (): void { it('keeps targets final when intersection observer is unavailable', function (): void {
@@ -226,8 +227,9 @@ it('allows cta activation while its opening is in progress', function (): void {
} }
JS); JS);
$page->click('[data-testid="home-primary-cta"]') $page->click('[data-testid="home-primary-cta"]');
->assertPathIs('/briefing');
expect($page->script('() => window.location.hash'))->toBe('#sobre');
}); });
it('avoids horizontal overflow on visual public routes at desktop and mobile', function (): void { it('avoids horizontal overflow on visual public routes at desktop and mobile', function (): void {