Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80021


Change subject: Test remove parts of rendered page from search.
......................................................................

Test remove parts of rendered page from search.

This requires instant commons and proper ogg support which already is
setup in beta but needs to be setup on newly built instances.  I've added
some instructions for that as well.

Change-Id: I942b42645544be60fb82a6d64d72034cd3a285f2
---
M tests/browser/README
M tests/browser/features/full_text.feature
M tests/browser/features/support/build_pages.rb
3 files changed, 58 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/21/80021/1

diff --git a/tests/browser/README b/tests/browser/README
index 9f68200..b438922 100644
--- a/tests/browser/README
+++ b/tests/browser/README
@@ -27,6 +27,36 @@
 While you could technically just change config.yml that wouldn't be a good idea
 because it'd be too easy to accidentally commit your password.
 
+Some tests use instant commans.  You should make sure mediawiki is configured
+to allow this.  If you are using this:
+https://wikitech.wikimedia.org/wiki/Help:Single_Node_MediaWiki
+then you'll just need to switch
+ $wgUseInstantCommons = false;
+to
+ $wgUseInstantCommons = true;
+in orig/LocalSettings.php
+
+And some tests require Ogg support.  Install it too....  On single node
+mediawiki you can do this:
+ pushd /srv/
+ if [ ! -d TimedMediaHandler ]; then git clone 
https://gerrit.wikimedia.org/r/mediawiki/extensions/TimedMediaHandler; fi
+ if [ ! -d MwEmbedSupport ]; then git clone 
https://gerrit.wikimedia.org/r/mediawiki/extensions/MwEmbedSupport; fi
+ pushd mediawiki/extensions
+ if [ ! -d TimedMediaHandler ]; then ln -s ../../TimedMediaHandler; fi
+ if [ ! -d MwEmbedSupport ]; then ln -s ../../MwEmbedSupport; fi
+ sudo su -c 'crontab -u www-data -l' > /tmp/www-data-crontab
+ echo '* * * * * php /srv/mediawiki/maintenance/runJobs.php --type 
webVideoTranscode --maxjobs 1 >> /tmp/mw-transcode-log' >> /tmp/www-data-crontab
+ echo '0 0 * * * rm /tmp/mw-transcode-log' >> /tmp/www-data-crontab
+ sort /tmp/www-data-crontab | uniq | sudo su -c 'crontab -u www-data -'
+ rm /tmp/www-data-crontab
+ sudo apt-get install -y oggvideotools ffmpeg ffmpeg2theora libav-tools 
libavcodec-extra-53
+ popd
+ popd
+Then add this to your localsettings:
+ require( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" );
+ require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );
+ $wgOggThumbLocation = '/usr/bin/oggThumb';
+
 Running
 -------
 If you want to run tests against anything other than
diff --git a/tests/browser/features/full_text.feature 
b/tests/browser/features/full_text.feature
index 7dd0410..9e4557d 100644
--- a/tests/browser/features/full_text.feature
+++ b/tests/browser/features/full_text.feature
@@ -7,27 +7,33 @@
     And <first_result> the first search result
     But Two Words is <two_words_is_in> the search results
   Examples:
-    | term                                 | first_result                      
| two_words_is_in |
-    | catapult                             | Catapult is in                    
| in              |
-    | pickles                              | Two Words is                      
| in              |
-    | catapul*                             | Catapult is in                    
| in              |
-    | rdir                                 | Two Words (redirect is in         
| not in          |
-    | intitle:catapult                     | Catapult is in                    
| not in          |
-    | intitle:catapul*                     | Catapult is in                    
| not in          |
-    | intitle:catapult amazing             | Amazing Catapult is               
| not in          |
-    | intitle:catapul* amaz*               | Amazing Catapult is               
| not in          |
-    | incategory:weaponry                  | Catapult is in                    
| not in          |
-    | incategory:weaponry amazing          | Amazing Catapult is               
| not in          |
-    | incategory:weaponry intitle:catapult | Catapult is in                    
| not in          |
-    | incategory:alpha incategory:beta     | AlphaBeta is                      
| not in          |
-    | incategory:twowords catapult         | Two Words is                      
| in              |
-    | incategory:twowords intitle:catapult | none is                           
| not in          |
-    | incategory:templatetagged two words  | Two Words is                      
| in              |
-    | talk:catapult                        | Talk:Two Words is                 
| not in          |
-    | talk:intitle:words                   | Talk:Two Words is                 
| not in          |
-    | template:pickles                     | Template:Template Test is         
| not in          |
-    | pickles/                             | Two Words is                      
| in              |
-    | catapult/pickles                     | Two Words is                      
| in              |
+    | term                                 | first_result              | 
two_words_is_in |
+    | catapult                             | Catapult is in            | in    
          |
+    | pickles                              | Two Words is              | in    
          |
+    | catapul*                             | Catapult is in            | in    
          |
+    | rdir                                 | Two Words (redirect is in | not 
in          |
+    | intitle:catapult                     | Catapult is in            | not 
in          |
+    | intitle:catapul*                     | Catapult is in            | not 
in          |
+    | intitle:catapult amazing             | Amazing Catapult is       | not 
in          |
+    | intitle:catapul* amaz*               | Amazing Catapult is       | not 
in          |
+    | incategory:weaponry                  | Catapult is in            | not 
in          |
+    | incategory:weaponry amazing          | Amazing Catapult is       | not 
in          |
+    | incategory:weaponry intitle:catapult | Catapult is in            | not 
in          |
+    | incategory:alpha incategory:beta     | AlphaBeta is              | not 
in          |
+    | incategory:twowords catapult         | Two Words is              | in    
          |
+    | incategory:twowords intitle:catapult | none is                   | not 
in          |
+    | incategory:templatetagged two words  | Two Words is              | in    
          |
+    | talk:catapult                        | Talk:Two Words is         | not 
in          |
+    | talk:intitle:words                   | Talk:Two Words is         | not 
in          |
+    | template:pickles                     | Template:Template Test is | not 
in          |
+    | pickles/                             | Two Words is              | in    
          |
+    | catapult/pickles                     | Two Words is              | in    
          |
+    # You can't search for text inside a <video> tag
+    | "JavaScript disabled"                | none is                   | not 
in          |
+    # You can't search for text inside the table of contants
+    | "3.1 Conquest of Persian empire"     | none is                   | not 
in          |
+    # You can't search for the [edit] tokens that users can click to edit 
sections
+    | "Succession of Umar edit"            | none is                   | not 
in          |
 
   @setup_main
   Scenario Outline: Searching for empty-string like values
diff --git a/tests/browser/features/support/build_pages.rb 
b/tests/browser/features/support/build_pages.rb
index cc1eaae..3dedc87 100644
--- a/tests/browser/features/support/build_pages.rb
+++ b/tests/browser/features/support/build_pages.rb
@@ -12,6 +12,7 @@
       And a page named África exists with contents for testing
       And a page named Rdir exists with contents #REDIRECT [[Two Words]]
       And a page named AlphaBeta exists with contents [[Category:Alpha]] 
[[Category:Beta]]
+      And a page named IHaveAVideo exists with contents [[File:How to Edit 
Article in Arabic Wikipedia.ogg|thumb|267x267px]]
     }
     $setup_main = true
   end

-- 
To view, visit https://gerrit.wikimedia.org/r/80021
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I942b42645544be60fb82a6d64d72034cd3a285f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to