mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-08 07:50:24 -05:00
Add example for location.href - also should example (#4702)
This commit is contained in:
committed by
Zach Bloomquist
parent
fbd523615e
commit
5963b1eff8
Vendored
+5
@@ -846,6 +846,8 @@ declare namespace Cypress {
|
||||
* @example
|
||||
* cy.location('host') // Get the host of the location object
|
||||
* cy.location('port') // Get the port of the location object
|
||||
* // Assert on the href of the location
|
||||
* cy.location('href').should('contain', '/tag/tutorials')
|
||||
*/
|
||||
location(key: string, options?: Partial<Loggable & Timeoutable>): Chainable<Location>
|
||||
|
||||
@@ -1276,6 +1278,9 @@ declare namespace Cypress {
|
||||
* Create an assertion. Assertions are automatically retried until they pass or time out.
|
||||
*
|
||||
* @see https://on.cypress.io/should
|
||||
* @example
|
||||
* // Assert on the href of the location
|
||||
* cy.location('href').should('contain', '/tag/tutorials/')
|
||||
*/
|
||||
should: Chainer<Subject>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user