PageCases
A service's pages as data, and the checks every page needs, for any test style: all at once, by checkStandards and checkTranslation, or one by one, by checksOf. PageCatalogue is the same for AnyWordSpec, with a test written for each check.
Nothing is rendered until a check runs, so each state renders in the language being checked. A check runs every state in every language, and its failure reports each that went wrong, by state and language.
Attributes
- Source
- PageCatalogue.scala
- Graph
-
- Supertypes
-
trait I18nCheckstrait TwirlSpectrait SuiteLifecycletrait SuiteMixintrait TwirlSpecDsltrait TwirlMatcherstrait ContentExpectationstrait FormExpectationstrait FramingExpectationsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait PageCatalogue
- Self type
-
Suite & Alerting
Members list
Value members
Concrete methods
Each of this page's states meets the standards in every language.
Each of this page's states meets the standards in every language.
Attributes
- Source
- PageCatalogue.scala
Each of this page's states says the same thing in every language. A state that does not render in one of them has nothing to compare.
Each of this page's states says the same thing in every language. A state that does not render in one of them has nothing to compare.
Attributes
- Source
- PageCatalogue.scala
Each of this page's checks on its own, for a test of its own, named for the language it ran in: in each language the application is configured for, that each state renders and that the page meets each standards rule, and then, for each other language, that it translates consistently with the first, English, by each comparison rule. A rule's check runs it over every state, so together they check what checkStandards and checkTranslation check, and a failure names the rule and the language.
Each of this page's checks on its own, for a test of its own, named for the language it ran in: in each language the application is configured for, that each state renders and that the page meets each standards rule, and then, for each other language, that it translates consistently with the first, English, by each comparison rule. A rule's check runs it over every state, so together they check what checkStandards and checkTranslation check, and a failure names the rule and the language.
Each state renders once in each language, when a check first reads it, and again in each run of the suite. Where it does not render, its own check fails, and a rule's check that found nothing in the states that did is cancelled, as it could not check them all. The check of a standards rule the page is excused from runs the rule silently, as meetStandardsExcept does, for unusedExclusions, and fails where the spec runs no rule of that id.
The checks are named after standardsRules and languages when this is called, so the rules and applicationConfig must be defined by then: by a def, a lazy val, or a val declared above the call. As they run, the checks build the rules again in each language: a state's check fails where the spec runs a rule no check was named after, and a rule's check where the spec does not run it. A page's states need names of their own, as their checks are named after them.
Attributes
- Source
- PageCatalogue.scala
A page with a form: blank, with the errors of an empty submission, and with those of each submission named here. The empty submission is the blank form sent untouched, as a browser sends it: each control with the value it renders with, so a field left empty arrives empty rather than missing and meets the form's own message rather than Play's generic error.required, and an unchecked or disabled control is left out. Where it cannot tell which of several forms holds the fields, as when more than one could send them or none is named after them, it sends nothing. A submission that gives no errors fails its check, because that state would show nothing the blank form does not.
A page with a form: blank, with the errors of an empty submission, and with those of each submission named here. The empty submission is the blank form sent untouched, as a browser sends it: each control with the value it renders with, so a field left empty arrives empty rather than missing and meets the form's own message rather than Play's generic error.required, and an unchecked or disabled control is left out. Where it cannot tell which of several forms holds the fields, as when more than one could send them or none is named after them, it sends nothing. A submission that gives no errors fails its check, because that state would show nothing the blank form does not.
Attributes
- Source
- PageCatalogue.scala
A page with one state.
Inherited methods
Where a passing check's warnings go. Standard output here, because a spec base on this trait may have no ScalaTest reporter to hand, and a warning nobody sees is no warning. TwirlSpec routes them to ScalaTest's alert, and a spec base with Alerting can do the same in one line:
Where a passing check's warnings go. Standard output here, because a spec base on this trait may have no ScalaTest reporter to hand, and a warning nobody sees is no warning. TwirlSpec routes them to ScalaTest's alert, and a spec base with Alerting can do the same in one line:
override protected def alertHook(message: String): Unit = alert(message)
Attributes
- Definition Classes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
One selector's first match comes before another's in document order.
One selector's first match comes before another's in document order.
Reading order is not a detail: an error summary announced after the form it describes is announced too late to be useful.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Extra configuration for this suite's application.
Extra configuration for this suite's application.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
Measure the other languages against this one rather than against the first page given.
Measure the other languages against this one rather than against the first page given.
Attributes
- Inherited from:
- I18nChecks
- Source
- I18nChecks.scala
The bullet list contains exactly these items, in order.
The bullet list contains exactly these items, in order.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The button with this id says this.
The button with this id says this.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The caption against any expected value.
The caption against any expected value.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The caption rendered above (or inside) the h1.
The caption rendered above (or inside) the h1.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The caption, given as the exact words rather than a message key.
The caption, given as the exact words rather than a message key.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
Assert against a page directly, outside a matcher.
Assert against a page directly, outside a matcher.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
The checkboxes sharing this name, value by default.
The checkboxes sharing this name, value by default.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The column headers of the one table on the page, or in within, in order: what tableHeaders reads, less the header each row has of its own.
The column headers of the one table on the page, or in within, in order: what tableHeaders reads, less the header each row has of its own.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The resolved message appears somewhere in the page's visible text.
The resolved message appears somewhere in the page's visible text.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Somewhere in the page body, given as the exact words rather than a message key.
Somewhere in the page body, given as the exact words rather than a message key.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
At least one element matches this selector. The plural form, where several matches are legitimate.
At least one element matches this selector. The plural form, where several matches are legitimate.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The language the current block runs in: English unless inside inLanguage, and always the configured form of it, so the page, its messages and the request's language cookie agree.
The language the current block runs in: English unless inside inLanguage, and always the configured form of it, so the page, its messages and the request's language cookie agree.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
A GOV.UK date input, three fields under one legend, named value by default.
A GOV.UK date input, three fields under one legend, named value by default.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
What an assistive technology reads after the control's name.
What an assistive technology reads after the control's name.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The visible summary of a collapsed details block.
The visible summary of a collapsed details block.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The control is disabled, on itself or through an enclosing fieldset.
The control is disabled, on itself or through an enclosing fieldset.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The page shows all of this, and holds to every rule standardsRules resolves to: none in the core, and each check trait's own once mixed in.
The page shows all of this, and holds to every rule standardsRules resolves to: none in the core, and each check trait's own once mixed in.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
As display, but without the standards — for the rare page that has to break a rule, or while a legacy view is being brought up to standard.
As display, but without the standards — for the rare page that has to break a rule, or while a legacy view is being brought up to standard.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
A `` found by name or id, with builders for its label and options.
A `` found by name or id, with builders for its label and options.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
An element with this id exists.
An element with this id exists.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Exactly this many elements match.
Exactly this many elements match.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The element with this id carries this class.
The element with this id carries this class.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The element with this id says this.
The element with this id says this.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
This control is not disabled.
This control is not disabled.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The error summary lists exactly these field -> message key entries, in order, and every entry links to an element that exists on the page.
The error summary lists exactly these field -> message key entries, in order, and every entry links to an element that exists on the page.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The error summary mentions this field, whatever else it lists.
The error summary mentions this field, whatever else it lists.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The heading above the error summary.
The heading above the error summary.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The browser title in full, including service name and " - GOV.UK".
The browser title in full, including service name and " - GOV.UK".
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
Bundle expectations so a service can name its own house rules once.
Bundle expectations so a service can name its own house rules once.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Whether warnings fail the test.
The inline error message rendered against a specific field.
The inline error message rendered against a specific field.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
A file input with this name or id is present.
A file input with this name or id is present.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The form is a GET to this action.
The form is a GET to this action.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The form posts (or gets) to a specific URL.
The form posts (or gets) to a specific URL.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
Each name submits this value, as a browser would submit the form. For a name submitted more than once, such as a group of checkboxes, the value has to be among the ones it submits.
Each name submits this value, as a browser would submit the form. For a name submitted more than once, such as a group of checkboxes, the value has to be among the ones it submits.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The single = against any expected value, ignoring a caption rendered inside it.
The single = against any expected value, ignoring a caption rendered inside it.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The single =.
A heading at a given level says this.
A heading at a given level says this.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The =, given as the exact words rather than a message key.
The =, given as the exact words rather than a message key.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
A hidden input with this name carries this value.
A hidden input with this name carries this value.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
Run the same block once per configured language.
Run the same block once per configured language.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
Run a block in English, whatever language the enclosing block is in.
Run a block in English, whatever language the enclosing block is in.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
Render this block with messages and a request for the given language in scope.
Render this block with messages and a request for the given language in scope.
The language must be one the application is configured for. Play would otherwise render the first configured language in its place, and a Welsh spec would pass on English text, so an unconfigured language fails the test instead. The block runs in the configured form of the language: a request for cy runs in cy-GB where that is what is configured, and a request for en-GB runs in en where only en is, which is how Play itself narrows a region.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
An instance from the application's injector: inject[MyView] is how a spec gets the view it tests, and inject[MyView](form, index) applies it.
An instance from the application's injector: inject[MyView] is how a spec gets the view it tests, and inject[MyView](form, index) applies it.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
The text of an inset text block.
The text of an inset text block.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The control is marked invalid for an assistive technology.
The control is marked invalid for an assistive technology.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
Every language the application is configured for, English first — en or a regional English such as en-GB.
Every language the application is configured for, English first — en or a regional English such as en-GB.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
A link with the given text pointing at the given URL.
A link with the given text pointing at the given URL.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
A link, given as the exact words rather than a message key.
A link, given as the exact words rather than a message key.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
A link found by id, whatever it says.
A link found by id, whatever it says.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Text expectations take message keys by default; wrap a string in literal when you really do mean the exact words.
Text expectations take message keys by default; wrap a string in literal when you really do mean the exact words.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
The page's outline, as page.outline prints it, is the one saved in this file:
The page's outline, as page.outline prints it, is the one saved in this file:
render(view(form)) must matchOutlineSnapshot(Path.of("test/resources/outlines/name.txt"))
A file that is missing, or holds another outline, fails, with the page's outline or the lines that differ, and updateOutlineSnapshots writes it instead. Line endings and spaces at the ends of lines do not count. The outline's format changes only in a minor version, whose changelog says so. A snapshot asserts nothing for coverage: assertEverything still asks for what the page shows to be asserted.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
Match text against a regular expression rather than an exact string.
Match text against a regular expression rather than an exact string.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Whatever standardsRules resolves to, for a spec that has its own assertions already.
Whatever standardsRules resolves to, for a spec that has its own assertions already.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
As meetStandardsExcept, with the reason for the exclusion, which a failure then reports alongside the ids:
As meetStandardsExcept, with the reason for the exclusion, which a failure then reports alongside the ids:
page must meetStandardsExcept(Seq("one-h1"), because = "legacy page, see JIRA-123")
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
The standards, minus the named rules. Prefer fixing the page: an exclusion here hides the rule on every page it is applied to.
The standards, minus the named rules. Prefer fixing the page: an exclusion here hides the rule on every page it is applied to.
Every id must name an active rule. A misspelt id, or one for a rule this spec does not run, would exclude nothing, so it fails the match instead. The excluded rules still run, silently, so unusedExclusions can tell an exclusion that is still needed from one that has outlived its reason.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
A message key with its arguments, where an expectation takes any expected value: summaryList(messageKey("x.dob", name) -> "27 March 1993").
A message key with its arguments, where an expectation takes any expected value: summaryList(messageKey("x.dob", name) -> "27 March 1993").
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
A message, resolved and normalised, ready to compare against page text.
A message, resolved and normalised, ready to compare against page text.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
The resolved message appears nowhere in the page's visible text.
The resolved message appears nowhere in the page's visible text.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Nothing matches this selector.
Nothing matches this selector.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
No element with this id exists.
No element with this id exists.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Page text has its quotes, spaces and soft hyphens normalised before comparison, and a raw messages(...) value has not — so page.text must include(messages("x")) fails on a curly apostrophe that looks identical. Normalise the expected side the same way.
Page text has its quotes, spaces and soft hyphens normalised before comparison, and a raw messages(...) value has not — so page.text must include(messages("x")) fails on a curly apostrophe that looks identical. Normalise the expected side the same way.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
The text of a notification banner.
The text of a notification banner.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The numbered list contains exactly these items, in order.
The numbered list contains exactly these items, in order.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The body of a confirmation panel.
The body of a confirmation panel.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The title of a confirmation panel.
The title of a confirmation panel.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The message appears inside a paragraph.
The message appears inside a paragraph.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The radio buttons sharing this name, value by default as Play's form helpers name them.
The radio buttons sharing this name, value by default as Play's form helpers name them.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
Parse rendered HTML into a page for an explicit language and its messages, rather than the implicit ones.
Parse rendered HTML into a page for an explicit language and its messages, rather than the implicit ones.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Parse rendered HTML into a page that can be asked questions.
Parse rendered HTML into a page that can be asked questions.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Render the same view in a given language, which must be one the application is configured for.
Render the same view in a given language, which must be one the application is configured for.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Render the same view in every configured language.
Render the same view in every configured language.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
Render a view in the current language: render, with the language made explicit.
Render a view in the current language: render, with the language made explicit.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
Whether passing tests still surface their warnings in the test output.
Whether passing tests still surface their warnings in the test output.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
This control is marked required.
This control is marked required.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
Find an element the way an assistive technology does: by role, then by the name it announces. Prefer this over an id or a class — if a control cannot be found by role and name, it cannot be found by a screen reader either.
Find an element the way an assistive technology does: by role, then by the name it announces. Prefer this over an id or a class — if a control cannot be found by role and name, it cannot be found by a screen reader either.
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
Runs this suite of tests.
Runs this suite of tests.
Value parameters
- args
-
the
Argsfor this run - testName
-
an optional name of one test to execute. If
None, all relevant tests should be executed. I.e.,Noneacts like a wildcard that means execute all relevant tests in thisSuite.
Attributes
- Returns
-
a
Statusobject that indicates when all tests and nested suites started by this method have completed, and whether or not a failure occurred. - Throws
-
NullArgumentException
if any passed parameter is
null. - Inherited from:
- SuiteLifecycle
- Source
- SuiteLifecycle.scala
The service or site name in the header.
The service or site name in the header.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The active rule set as one expectation, for asserting on the result.
The active rule set as one expectation, for asserting on the result.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
Which rules run alongside every display(...). Empty here; rule modules add theirs via super.standardsRules.
Which rules run alongside every display(...). Empty here; rule modules add theirs via super.standardsRules.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
An h2 with the given message key.
An h2 with the given message key.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The submit control says this, site.continue by default.
The submit control says this, site.continue by default.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The submit control says exactly these words.
The submit control says exactly these words.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The summary list holds exactly these key -> value rows, in order. A key is a message key, or any expected value: messageKey("x.dob", name) for one that takes arguments, literal, matching or anyText.
The summary list holds exactly these key -> value rows, in order. A key is a message key, or any expected value: messageKey("x.dob", name) for one that takes arguments, literal, matching or anyText.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
A row of a govukSummaryList, by its key.
A row of a govukSummaryList, by its key.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
The table header cells, in order.
The table header cells, in order.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
A row whose cells read exactly like this.
A row whose cells read exactly like this.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
An instance of a template's class, for a check going through a directory of templates. There is no application here to ask for one. TwirlSpec asks its own, and a spec base with an application can do the same in one line:
An instance of a template's class, for a check going through a directory of templates. There is no application here to ask for one. TwirlSpec asks its own, and a spec base with an application can do the same in one line:
override protected def templateInstance(template: Class[_]): AnyRef =
app.injector.instanceOf(template).asInstanceOf[AnyRef]
Attributes
- Definition Classes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
A textarea found by name or id, with the same builders as textInput.
A textarea found by name or id, with the same builders as textInput.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
A text input found by name or id; chain the builders for its label, hint, value, autocomplete and type.
A text input found by name or id; chain the builders for its label, hint, value, autocomplete and type.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The browser title against any expected value, ignoring the layout's suffix and an error prefix.
The browser title against any expected value, ignoring the layout's suffix and an error prefix.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The browser title, ignoring the " - Service name - GOV.UK" suffix the layout appends and the translated "Error:" prefix an error state adds.
The browser title, ignoring the " - Service name - GOV.UK" suffix the layout appends and the translated "Error:" prefix an error state adds.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The browser title, given as the exact words rather than a message key.
The browser title, given as the exact words rather than a message key.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
Every language renders the same page as the base language, differing only in words.
Every language renders the same page as the base language, differing only in words.
Attributes
- Inherited from:
- I18nChecks
- Source
- I18nChecks.scala
As translateConsistently, without the named rules.
As translateConsistently, without the named rules.
Attributes
- Inherited from:
- I18nChecks
- Source
- I18nChecks.scala
What a page may legitimately keep the same between languages.
What a page may legitimately keep the same between languages.
Attributes
- Inherited from:
- I18nChecks
- Source
- I18nChecks.scala
The differences, for a spec that would rather report than fail.
The differences, for a spec that would rather report than fail.
Attributes
- Inherited from:
- I18nChecks
- Source
- I18nChecks.scala
The rules this spec has excluded with meetStandardsExcept that found nothing on any page they were excluded from, and so exclude nothing.
The rules this spec has excluded with meetStandardsExcept that found nothing on any page they were excluded from, and so exclude nothing.
Ask it in the spec's last test, once every exclusion has run:
"need every exclusion it makes" in { unusedExclusions mustBe empty }
It knows only the tests that have run, so a run of one test can report an exclusion that another test needs.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
Whether matchOutlineSnapshot writes the file it is given, where the file is missing or holds another outline, rather than failing. On where the environment sets TWIRLSPEC_UPDATE_SNAPSHOTS=true, to write snapshots again locally after a page was changed on purpose. Never in CI, where it would pass whatever a page had become.
Whether matchOutlineSnapshot writes the file it is given, where the file is missing or holds another outline, rather than failing. On where the environment sets TWIRLSPEC_UPDATE_SNAPSHOTS=true, to write snapshots again locally after a page was changed on purpose. Never in CI, where it would pass whatever a page had become.
Attributes
- Inherited from:
- TwirlMatchers
- Source
- TwirlMatchers.scala
The text of a GOV.UK warning callout.
The text of a GOV.UK warning callout.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
These expectations, asked of one part of the page: the one element this selector matches, for a page with two tables, or a search form before the form under test.
These expectations, asked of one part of the page: the one element this selector matches, for a page with two tables, or a search form before the form under test.
within("#results")(columnHeaders("x.name", "x.born"), tableRow("Ada", "1815"))
within("form[action='/save']")(formPostsTo("/save"), submitButton())
What it matches has to be one element, or the expectation fails, as it does for anything naming one element. What an element says of another by id, such as for or aria-describedby, still reaches the whole page. So do the standards, and the page's title and language. What is asserted here counts for the page's coverage.
Attributes
- Inherited from:
- ContentExpectations
- Source
- ContentExpectations.scala
Inherited and Abstract methods
The total number of tests that are expected to run when this Suite's run method is invoked.
The total number of tests that are expected to run when this Suite's run method is invoked.
Value parameters
- filter
-
a
Filterwith which to filter tests to count based on their tags
Attributes
- Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
An immutable IndexedSeq of this SuiteMixin object's nested Suites. If this SuiteMixin contains no nested Suites, this method returns an empty IndexedSeq.
An immutable IndexedSeq of this SuiteMixin object's nested Suites. If this SuiteMixin contains no nested Suites, this method returns an empty IndexedSeq.
Attributes
- Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
The fully qualified name of the class that can be used to rerun this suite.
The fully qualified name of the class that can be used to rerun this suite.
Attributes
- Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Runs zero to many of this suite's nested suites.
Runs zero to many of this suite's nested suites.
Value parameters
- args
-
the
Argsfor this run
Attributes
- Returns
-
a
Statusobject that indicates when all nested suites started by this method have completed, and whether or not a failure occurred. - Throws
-
NullArgumentException
if
argsisnull. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Runs a test.
Runs a test.
Value parameters
- args
-
the
Argsfor this run - testName
-
the name of one test to execute.
Attributes
- Returns
-
a
Statusobject that indicates when the test started by this method has completed, and whether or not it failed . - Throws
-
NullArgumentException
if any of
testNameorargsisnull. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Runs zero to many of this suite's tests.
Runs zero to many of this suite's tests.
Value parameters
- args
-
the
Argsfor this run - testName
-
an optional name of one test to run. If
None, all relevant tests should be run. I.e.,Noneacts like a wildcard that means run all relevant tests in thisSuite.
Attributes
- Returns
-
a
Statusobject that indicates when all tests started by this method have completed, and whether or not a failure occurred. - Throws
-
NullArgumentException
if either
testNameorargsisnull. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
A string ID for this Suite that is intended to be unique among all suites reported during a run.
A string ID for this Suite that is intended to be unique among all suites reported during a run.
The suite ID is intended to be unique, because ScalaTest does not enforce that it is unique. If it is not unique, then you may not be able to uniquely identify a particular test of a particular suite. This ability is used, for example, to dynamically tag tests as having failed in the previous run when rerunning only failed tests.
Attributes
- Returns
-
this
Suiteobject's ID. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
A user-friendly suite name for this Suite.
A user-friendly suite name for this Suite.
This trait's implementation of this method returns the simple name of this object's class. This trait's implementation of runNestedSuites calls this method to obtain a name for Reports to pass to the suiteStarting, suiteCompleted, and suiteAborted methods of the Reporter.
Attributes
- Returns
-
this
Suiteobject's suite name. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
A Map whose keys are String names of tagged tests and whose associated values are the Set of tag names for the test. If a test has no associated tags, its name does not appear as a key in the returned Map. If this Suite contains no tests with tags, this method returns an empty Map.
A Map whose keys are String names of tagged tests and whose associated values are the Set of tag names for the test. If a test has no associated tags, its name does not appear as a key in the returned Map. If this Suite contains no tests with tags, this method returns an empty Map.
Subclasses may override this method to define and/or discover tags in a custom manner, but overriding method implementations should never return an empty Set as a value. If a test has no tags, its name should not appear as a key in the returned Map.
Attributes
- Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Provides a TestData instance for the passed test name, given the passed config map.
Provides a TestData instance for the passed test name, given the passed config map.
This method is used to obtain a TestData instance to pass to withFixture(NoArgTest) and withFixture(OneArgTest) and the beforeEach and afterEach methods of trait BeforeAndAfterEach.
Value parameters
- testName
-
the name of the test for which to return a
TestDatainstance - theConfigMap
-
the config map to include in the returned
TestData
Attributes
- Returns
-
a
TestDatainstance for the specified test, which includes the specified config map - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
A Set of test names. If this Suite contains no tests, this method returns an empty Set.
A Set of test names. If this Suite contains no tests, this method returns an empty Set.
Although subclass and subtrait implementations of this method may return a Set whose iterator produces String test names in a well-defined order, the contract of this method does not required a defined order. Subclasses are free to implement this method and return test names in either a defined or undefined order.
Attributes
- Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Inherited fields
For "there is a heading, its wording is asserted elsewhere".
For "there is a heading, its wording is asserted elsewhere".
Attributes
- Inherited from:
- TwirlSpecDsl
- Source
- TwirlSpecDsl.scala
The application this suite renders with, shared across the JVM with every suite that uses the same applicationConfig.
The application this suite renders with, shared across the JVM with every suite that uses the same applicationConfig.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
A GOV.UK back link is present.
A GOV.UK back link is present.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The English Lang, the base language for everything here.
The English Lang, the base language for everything here.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
GOV.UK requires the browser title of a page in an error state to be prefixed, so screen reader users hear that something went wrong before the page name.
GOV.UK requires the browser title of a page in an error state to be prefixed, so screen reader users hear that something went wrong before the page name.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
A submit control is present, whatever it says.
A submit control is present, whatever it says.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
A language switcher, however it is rendered.
A language switcher, however it is rendered.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The application's MessagesApi, held as a stable value for the implicits below.
The application's MessagesApi, held as a stable value for the implicits below.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
There is no back link, for a page a citizen must not reverse out of.
There is no back link, for a page a citizen must not reverse out of.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
No error summary and no inline error messages anywhere on the page.
No error summary and no inline error messages anywhere on the page.
Attributes
- Inherited from:
- FormExpectations
- Source
- FormExpectations.scala
The alpha or beta phase banner is present.
The alpha or beta phase banner is present.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
A sign out link is present.
A sign out link is present.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
The session-timeout dialog is wired up.
The session-timeout dialog is wired up.
Attributes
- Inherited from:
- FramingExpectations
- Source
- FramingExpectations.scala
Deprecated and Inherited fields
The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest.
The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest.
This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0 will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for styleName.
Attributes
- Deprecated
-
[Since version 3.1.0]The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement. - Inherited from:
- SuiteMixin
- Source
- SuiteMixin.scala
Implicits
Inherited implicits
Messages for the current language, implicitly, so a view can be applied directly.
Messages for the current language, implicitly, so a view can be applied directly.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
The application's MessagesApi, implicitly, for renderIn and the message-file matchers.
The application's MessagesApi, implicitly, for renderIn and the message-file matchers.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala
A GET request carrying the language cookie for the current language, implicitly, for a view that takes one.
A GET request carrying the language cookie for the current language, implicitly, for a view that takes one.
Where play-filters-helpers is on the classpath, as it is in a Play application built with the Play sbt plugin, it also carries a signed CSRF token, so a form renders its token field as it does in production: Play's @helper.CSRF.formField throws without one, and formWithCSRF leaves the field out. Without that library the request carries no token.
Attributes
- Inherited from:
- TwirlSpec
- Source
- TwirlSpec.scala