Member Junction
Preparing search index...
@memberjunction/react-test-harness
AssertionHelpers
Class AssertionHelpers
Index
Constructors
constructor
Methods
assert
Contains
Text
assert
Element
Count
assert
Has
Element
assert
No
Console
Errors
assert
No
Errors
assert
Not
Contains
Text
assert
Success
contains
Text
count
Elements
create
Matcher
extract
Text
Content
find
Console
Errors
find
Console
Warnings
has
Attribute
has
Element
Constructors
constructor
new
AssertionHelpers
()
:
AssertionHelpers
Returns
AssertionHelpers
Methods
Static
assert
Contains
Text
assertContainsText
(
html
:
string
,
text
:
string
)
:
void
Parameters
html
:
string
text
:
string
Returns
void
Static
assert
Element
Count
assertElementCount
(
html
:
string
,
tagName
:
string
,
expectedCount
:
number
)
:
void
Parameters
html
:
string
tagName
:
string
expectedCount
:
number
Returns
void
Static
assert
Has
Element
assertHasElement
(
html
:
string
,
selector
:
string
)
:
void
Parameters
html
:
string
selector
:
string
Returns
void
Static
assert
No
Console
Errors
assertNoConsoleErrors
(
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
)
:
void
Parameters
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
Returns
void
Static
assert
No
Errors
assertNoErrors
(
result
:
{
errors
:
string
[]
}
)
:
void
Parameters
result
:
{
errors
:
string
[]
}
Returns
void
Static
assert
Not
Contains
Text
assertNotContainsText
(
html
:
string
,
text
:
string
)
:
void
Parameters
html
:
string
text
:
string
Returns
void
Static
assert
Success
assertSuccess
(
result
:
{
errors
:
string
[]
;
success
:
boolean
}
)
:
void
Parameters
result
:
{
errors
:
string
[]
;
success
:
boolean
}
Returns
void
Static
contains
Text
containsText
(
html
:
string
,
text
:
string
)
:
boolean
Parameters
html
:
string
text
:
string
Returns
boolean
Static
count
Elements
countElements
(
html
:
string
,
tagName
:
string
)
:
number
Parameters
html
:
string
tagName
:
string
Returns
number
Static
create
Matcher
createMatcher
(
html
:
string
,
)
:
{
toContainText
:
(
text
:
string
)
=>
void
;
toHaveAttribute
:
(
selector
:
string
,
attribute
:
string
,
value
?:
string
,
)
=>
void
;
toHaveElement
:
(
selector
:
string
)
=>
void
;
toHaveElementCount
:
(
tagName
:
string
,
count
:
number
)
=>
void
;
}
Parameters
html
:
string
Returns
{
toContainText
:
(
text
:
string
)
=>
void
;
toHaveAttribute
:
(
selector
:
string
,
attribute
:
string
,
value
?:
string
,
)
=>
void
;
toHaveElement
:
(
selector
:
string
)
=>
void
;
toHaveElementCount
:
(
tagName
:
string
,
count
:
number
)
=>
void
;
}
Static
extract
Text
Content
extractTextContent
(
html
:
string
)
:
string
Parameters
html
:
string
Returns
string
Static
find
Console
Errors
findConsoleErrors
(
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
)
:
string
[]
Parameters
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
Returns
string
[]
Static
find
Console
Warnings
findConsoleWarnings
(
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
)
:
string
[]
Parameters
consoleLogs
:
{
text
:
string
;
type
:
string
}
[]
Returns
string
[]
Static
has
Attribute
hasAttribute
(
html
:
string
,
selector
:
string
,
attribute
:
string
,
value
?:
string
,
)
:
boolean
Parameters
html
:
string
selector
:
string
attribute
:
string
Optional
value
:
string
Returns
boolean
Static
has
Element
hasElement
(
html
:
string
,
selector
:
string
)
:
boolean
Parameters
html
:
string
selector
:
string
Returns
boolean
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
assert
Contains
Text
assert
Element
Count
assert
Has
Element
assert
No
Console
Errors
assert
No
Errors
assert
Not
Contains
Text
assert
Success
contains
Text
count
Elements
create
Matcher
extract
Text
Content
find
Console
Errors
find
Console
Warnings
has
Attribute
has
Element
Member Junction
Loading...