Pular para o conteúdo

Page Objects

The suite uses the Page Object Model (POM) pattern to separate page-specific selectors from test logic.

BasePage

Shared by all pages:

MethodDescription
goto(path)Navigates, waits for domcontentloaded, asserts HTTP < 400
assertNavVisible()Checks for <nav> or <header> (lenient)
assertFooterVisible()Checks for <footer> (lenient)
assertHasContent()Body must have >100 characters

HomePage

MethodDescription
assertNavigationLinks()Links to scopes and /chat/ (accepts aliases)

ScopePage

MethodDescription
assertAllStateLinksPresent()All 27 states have matching links
getStateLinkCount()Raw count of scope-related links

StatePage

MethodDescription
assertStateNameInTitle(stateName)Title contains state name
assertCityLinksPresent()At least one city link exists
assertBreadcrumbOrHeading(scopeName, stateName)Body mentions scope or state

CityPage

MethodDescription
assertTitleContainsCityAndState(citySlug, stateSlug)Handles Portuguese accent normalization
assertHasContentBody()Content > 200 characters
assertSchemaOrgPresent()application/ld+json contains @context

TopicPage

MethodDescription
assertHeadingHierarchy()At least one h1 and one h2
assertArticleLikeStructure()Page has main, article, or valid body

SpecialPage

MethodDescription
assertChatWidgetLoads()Input/textarea/contenteditable visible
assertContactFormPresent()Form with ≥2 inputs and submit button
assertDirectoryListing()List/grid container visible