File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
tests/System/integration/administrator/components/com_finder Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ describe ( 'Test in backend that the Smart Search' , ( ) => {
2+ beforeEach ( ( ) => {
3+ cy . doAdministratorLogin ( ) ;
4+ } ) ;
5+ afterEach ( ( ) => {
6+ cy . task ( 'queryDB' , "DELETE FROM #__content WHERE title = 'Test article'" ) ;
7+ } ) ;
8+
9+ it ( 'can index an article' , ( ) => {
10+ // Create a new article
11+ cy . visit ( '/administrator/index.php?option=com_content&task=article.add' ) ;
12+ cy . get ( '#jform_title' ) . clear ( ) . type ( 'Test article' ) ;
13+ cy . clickToolbarButton ( 'Save & Close' ) ;
14+ // Visit the smart search page
15+ cy . visit ( '/administrator/index.php?option=com_finder&view=index' ) ;
16+ cy . contains ( 'Test article' ) . should ( 'exist' ) ;
17+ } ) ;
18+
19+ it ( 'can purge the index' , ( ) => {
20+ // Visit the smart search page
21+ cy . visit ( '/administrator/index.php?option=com_finder&view=index' ) ;
22+ cy . get ( '#toolbar-maintenance-group > button' ) . click ( ) ;
23+ // Click the "Clear Index" button
24+ cy . get ( '#maintenance-group-children-index-purge > button' , { force : true } ) . click ( ) ;
25+ cy . clickDialogConfirm ( true ) ;
26+ cy . checkForSystemMessage ( 'All items have been deleted.' ) ;
27+ } ) ;
28+ } ) ;
You can’t perform that action at this time.
0 commit comments