Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Legacy Search for Joomla

License

NotificationsYou must be signed in to change notification settings

joomla-extensions/search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Drone-CI
Build Status

Legacy Search provides a rudimentary search for the Joomla! CMS. To be able to search the data of a datasource from this, you have to provide a plugin for that. It is advised to use the built-in Smart Search component in Joomla instead of this one. This set of extensions is going to be supported until Joomla 5.0 is going to be released.

How to test a PR

Easily apply changes from a pull requests against this repo:Install the last release ofcom_search into your Joomla.Install the last release ofcom_patchtester into your Joomla (search is supported since Version 3.0.0 Alpha 2).Log into your site's administrator section, go to the Patch Tester Component Options (Components -> Patch Tester -> Options)Switch theGitHub Repository toJoomla Search Package. For this you have to fill the fieldGitHub Project Owner withjoomla-extensions and the fieldGitHub Project Repository withsearch.ClickSave & Close and hit theFetch Data Button to the the lastest pull requestsClickApply Patch to apply the proposed changes from the pull request.ClickRevert Patch to revert an applied patch.

You can read more about the Patch Tester extension on theJoomla! Documentation Wiki.

With Github

If you want to test a patch you can apply the patch via git.

If you cloned this repo under the name upstream - your remote is upstream – you can user the command

git fetch upstream pull/PR_NUMBER/head:BRANCHNUMER

for fetching the branch of the PRhttps://github.com/joomla-extensions/search/pull/290 this would be

git fetch upstream pull/290/head:move-lang-files

After that you can checkout the branch and start testing.

git checkout move-lang-files

For Linux

Install

1. Open a session and change to the document root of your local webserver.

$ cd /var/www/html//var/www/html$

2. Clone the current repository into your webserver root folder

/var/www/html$ git clone git@github.com:joomla-extensions/search.gitClone nach 'search' ...remote: Counting objects: 2446, done.remote: Compressing objects: 100% (75/75), done.remote: Total 2446 (delta 10), reused 0 (delta 0), pack-reused 2361Empfange Objekte: 100% (2446/2446), 615.02 KiB | 375.00 KiB/s, Fertig.Löse Unterschiede auf: 100% (1232/1232), Fertig.Prüfe Konnektivität ... Fertig.

Are you new with github? Here you can find informations about setting it up:https://help.github.com/articles/set-up-git/If you get an error you can try git clonehttps://github.com:joomla-extensions/search.git instead of git clonegit@github.com:joomla-extensions/search.git

3. Change to the directory search

/var/www/html$ cd search/var/www/html/search$

4. This files should be in your search folder.

/var/www/html/search$ lscodeception.yml  docs  LICENSERoboFile.dist.ini  testscomposer.json jed_update.xml   manifest.xmlRoboFile.phpcomposer.lock jorobo.dist.ini  README.mdsrc

5. Optional: Have a look into composer.json for information what software you will install via composer.

/var/www/html/search$ cat composer.json

orhttps://github.com/joomla-extensions/search/blob/master/composer.json

Read more abouthow to install composer here.

6. Optional: If you have problems using composer set a timeout.

/var/www/html/search$export COMPOSER_PROCESS_TIMEOUT=1500;

7. Install via composer

/var/www/html/search$ composer installLoading composer repositories with package informationInstalling dependencies (including require-dev) from lock file  - Installing symfony/yaml (v3.1.3)    Downloading: 100%......Generating autoload files

8. After that you have to buildrobo

/var/www/html/search$ vendor/bin/robo build

9. Optional: Prepare the database

If you use MySQL or PostgreSQL as database and your user has create database privileges the Database is automatically created by the Joomla installer.But the safest way is to create the database before running Joomla's web installer.

/var/www/html/search$ mysql -u root -pmysql> create database search;Query OK, 1 row affected (0,00 sec)mysql> quit;Bye

10. Copy the file acceptance.suite.dist.yml into acceptance.suite.dist.yml

/var/www/html/search$ cd tests/var/www/html/search/tests$ cp acceptance.suite.dist.yml acceptance.suite.yml

11. Update the file acceptance.suite.yml to your needs. At least you have to update the options url, database name and counter_test_url.

/var/www/html/search/tests$ cat acceptance.suite.ymlclass_name: AcceptanceTestermodules:    enabled:        - JoomlaBrowser        - AcceptanceHelper    config:        JoomlaBrowser:            url: 'http://localhost/search/tests/joomla-cms3'     # the url that points to the joomla installation at /tests/system/joomla-cms            browser: 'firefox'            window_size: 1024x768            capabilities:            unexpectedAlertBehaviour: 'accept'            username: 'admin'                      # UserName for the Administrator            password: 'admin'                      # Password for the Administrator            database host: 'localhost'             # place where the Application is Hosted #server Address            database user: 'root'                  # MySQL Server user ID, usually root            database password: 'yourPassword'                  # MySQL Server password, usually empty or root            database name: 'search'         # DB Name, at the Server            database type: 'mysqli'                # type in lowercase one of the options: MySQL\MySQLi\PDO            database prefix: 'jos_'                # DB Prefix for tables            install sample data: 'no'              # Do you want to Download the Sample Data Along with Joomla Installation, then keep it Yes            sample data: 'Default English (GB) Sample Data'    # Default Sample Data            admin email: 'admin@mydomain.com'      # email Id of the Admin            language: 'English (United Kingdom)'   # Language in which you want the Application to be Installed        AcceptanceHelper:            repo_folder: '/home/travis/build/joomla-extensions/search/' # Path to the Extension repository. To be used by tests to install via Install from folder            counter_test_url: 'http://localhost/search/tests/joomla-cms3' # the url for the weblink item used to test hits counter            url: 'http://localhost/search/tests/joomla-cms3' # the url that points to the joomla installation at /tests/system/joomla-cms - we need it twice hereerror_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED"env:    desktop: ~    tablet:        modules:            config:                JoomlaBrowser:                    window_size: 768x1024    phone:        modules:            config:                JoomlaBrowser:                    window_size: 480x640

12. Optional: Go back to search directory and create and edit the file RoboFile.ini. Delete the local user www-data.

/var/www/html/search$ cp RoboFile.dist.ini RoboFile.ini/var/www/html/search$ cat RoboFile.ini; If set to true, the repo will not be cloned from GitHub and the local copy will be reused.; This setting will be obsolete once we have local Git cache enabledskipClone = false; If you want to setup your test website in a different folder, you can do that here.; You can also set an absolute path, i.e. /path/to/my/cms/foldercmsPath = tests/joomla-cms3; If you want to clone a different branch, you can set it herebranch = staging; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.localUser =; Set this to true, if your curl binaries are not able to create an https connectioninsecure = false

13. Optional: Set use owner of the project to your user.

/var/www/html/search$sudo chown -R username:usergroup /var/www

14. Ready! Run the first tests:

/var/www/html/search$ vendor/bin/robo run:testsClone nach 'tests/cache' ... [Exec] Done in 13.18s [FileSystem\CopyDir] Copied from tests/cache to tests/joomla-cms3...

Tests

The tests in search Extension use Codeception Testing Framework, if you want to know more about the technology used for testing please check:Testing Joomla Extensions with Codeception.

Optional: extra configuration for RoboFile

This is not required, and if in doubt you can just skip this section, but there may be some specific use cases when you need (or want) to override the default behaviour of RoboFile.php. To do this, copyRoboFile.dist.ini toRoboFile.ini and add options in INI format, one per line, e.g.

skipClone = truecmsPath = tests/joomla-cms3

The currently available options are as follows:

  • skipClone: set totrue to avoid the cms repo being deleted and re-cloned at each test execution. Useful to save time and bandwidth while you're debugging your test environment. But please be aware that if you don't refresh the repo you'll have to manually check theinstallation folder is present and theconfiguration.php is not.
  • cmsPath: set to the local path (absolute or relative) where you'd like the test website to be installed. Default istests/joomla-cms3.
  • branch: set to whatever existing branch from thejoomla-cms project if you want to clone that specific branch. Default isstaging.

Additional options

You can run the tests against different resolutions. The default acceptance YAML configuration file provides three options:

  • "desktop": default, 1024x768px
  • "tablet": tablet in portrait mode, 768x1024px
  • "phone": phone in portrait mode, 480x640px

To set a specific resolution, set is as an option of the command:

$ vendor/bin/robo run:tests --env=tablet

Note: the first parameter is used by Travis and you should always set it to "0" when you run your tests locally.

Video

Here you can finde a video that shows the installation of com_search for testing.

For Windows:

You need to install:

Note: For commands line is better if you use the 'Git shell' program.

First you should create a fork of the official repository and clone the fork into your web server folder.

To prepare the system tests (Selenium) to be run in your local machine you are asked to rename the filetests/acceptance.suite.dist.yml totests/acceptance.suite.yml. Afterwards, please edit the file according to your system needs.

The next step is only required if you don't place the search folder into your web server folder. Create a symbolic link from your tests\joomla-cms3 to a subfolder of your web server. For example:

mklink /J C:\wamp\www\tests\joomla-cms3 C:\Users\Name\Documents\GitHub\search\tests\joomla-cms3

Open the console and go in the folder of search, for example:

cd C:\wamp\www\search

Then run the command:

$ composer install

You can then run the following command to start the tests:

$ vendor/bin/robo run:tests

Once all tests were executed, you may also run a specific test:

$ vendor/bin/robo run:test // Thenselectthetest you want to run!

[8]ページ先頭

©2009-2025 Movatter.jp