Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4130827
App.test.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
886 B
Referenced Files
None
Subscribers
None
App.test.js
View Options
const
VueTestUtils
=
require
(
'@vue/test-utils'
);
const
App
=
require
(
'../../resources/skins.vector.search/App.vue'
);
const
defaultProps
=
{
id
:
'searchform'
,
searchAccessKey
:
'f'
,
searchTitle
:
'search'
,
showThumbnail
:
true
,
showDescription
:
true
,
highlightQuery
:
true
,
searchPlaceholder
:
'Search MediaWiki'
,
searchQuery
:
''
};
const
mount
=
(
/** @type {Object} */
customProps
)
=>
VueTestUtils
.
shallowMount
(
App
,
{
props
:
Object
.
assign
(
{},
defaultProps
,
customProps
),
global
:
{
mocks
:
{
$i18n
:
(
/** @type {string} */
str
)
=>
(
{
text
:
()
=>
str
}
)
},
directives
:
{
'i18n-html'
:
(
el
,
binding
)
=>
{
el
.
innerHTML
=
`
${
binding
.
arg
}
(
${
binding
.
value
}
)`
;
}
}
}
}
);
describe
(
'App'
,
()
=>
{
it
(
'renders a typeahead search component'
,
()
=>
{
const
wrapper
=
mount
();
expect
(
wrapper
.
element
).
toMatchSnapshot
();
}
);
}
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 10:35 (3 w, 5 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
aa/1d/8491be72c52d7c925ca1b7535ba1
Default Alt Text
App.test.js (886 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment