Koha/t/db_dependent
Tomas Cohen Arazi 5bb19808bb Bug 19337: Make basic_workflow.t configurable through ENV
This patch makes the basic_workflow.t selenium tests read ENV for the
following vars:

KOHA_USER
KOHA_PASS
KOHA_INTRANET_URL
SELENIUM_ADDR
SELENIUM_PORT

to properly configure the running environment. If absent, all variables
fallback to current behaviour:

KOHA_USER // 'koha'
KOHA_PASS // 'koha'
KOHA_INTRANET_URL (unchanged)
SELENIUM_ADDR // 'localhost'
SELENIUM_PORT // 4444

[*] Selenium defaults are documented on the Selenium::Remote::Driver docs.

Prerequisites:
Make sure you have a working environment for the Selenium tests:
- Run:
  $ sudo apt update
  $ sudo apt install xvfb firefox-esr

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar \
     -O /tmp/selenium.jar
 k$ SELENIUM_PATH=/tmp/selenium.jar
 k$ Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
 k$ DISPLAY=:1 java -jar $SELENIUM_PATH &
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-19 08:53:46 -03:00
..
Acquisition Bug 19256: Make Koha::Acq::Order using Koha::Object 2017-09-07 15:03:04 -03:00
api/v1
Auth Bug 15756: Some tests for haspermission in C4::Auth 2016-02-23 20:54:42 +00:00
Authority
Biblio Bug 18951: Adjust Isbd.t 2017-07-24 13:37:18 -03:00
Circulation
Creators Bug 18044: Add a test 2017-02-07 17:46:00 +00:00
data
Exporter
Holds
Items Bug 19057: Move C4::Reserve::GetReserve to Koha::Holds 2017-09-01 17:05:17 -03:00
Koha
Labels
LDAP DB-dependent tests moved 2008-01-08 14:07:38 -06:00
Letters
Members
OAI
Patron
Record
Reports Bug 17898: Automagically convert SQL reports 2017-05-19 18:48:26 +00:00
Reserves
Search Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup 2017-07-26 14:36:34 -03:00
selenium Bug 19337: Make basic_workflow.t configurable through ENV 2017-09-19 08:53:46 -03:00
Serials Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
SIP
Template/Plugin
Utils
www Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
XSLT_Handler Bug 13262 - Add parameters to XSLT Handler transform method 2015-02-05 15:24:29 -03:00
00-strict.t Bug 18233 - t/db_dependent/00-strict.t has non-existant resetversion.pl 2017-05-08 09:22:27 -04:00
01-test_dbic.t Bug 18226: Perltidy + license 2017-06-05 17:52:48 -03:00
Accounts.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Acquisition.t Bug 19256: (QA followup) Remove warn from unit test 2017-09-07 15:03:04 -03:00
AdditionalField.t Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
Amazon.t
ArticleRequests.t Bug 18766: Remove itemtype-related warnings from ArticleRequests.t 2017-06-09 10:50:53 -03:00
AudioAlerts.t Bug 11431: (QA followup) remove diags 2015-11-06 15:08:37 -03:00
Auth.t
Auth_with_cas.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Auth_with_ldap.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
AuthorisedValues.t Bug 18748: Noisy t/db_dependent/AuthorisedValues.t 2017-07-14 12:29:22 -03:00
AuthoritiesMarc.t Bug 18448: Fix a few db_dependent tests 2017-04-21 00:09:43 +00:00
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t
Biblio.t Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
Bookseller.t
Breeding.t Bug 12898: (regression test) test terms inside double quotes 2014-09-14 02:02:51 -03:00
Budgets.t Bug 19256: Make Koha::Acq::Order using Koha::Object 2017-09-07 15:03:04 -03:00
Calendar.t Bug 12063 - Fix QA failures 2017-05-09 08:59:39 -04:00
Charset.t
check_sysprefs.t Bug 17917: [AMENDED] Fix path issue in t/db_dependent/check_sysprefs.t 2017-01-20 13:39:37 +00:00
Circulation.t Bug 19059: Fix compilation issues 2017-09-12 12:42:59 -03:00
ClassSource.t
Clubs.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
ColumnsSettings.t Bug 16177: Fix tests for ColumnsSsettings.t 2016-04-01 19:08:23 +00:00
Context.t
Contract.t
CourseReserves.t Bug 17716: (followup) Remove dep on existing data and tidy 2016-12-05 15:32:57 +00:00
db_structure.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
DecreaseLoanHighHolds.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
default_search_class.pl Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Filter_MARC_ViewPolicy.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Fines.t
FrameworkPlugin.t Bug 14199: Unify marc orgcode plugins, not overwriting existing values 2016-02-26 14:04:28 +00:00
Heading_MARC21.t Merge remote-tracking branch 'origin/new/bug_7284' 2012-04-04 18:18:26 +02:00
Hold.t
Holds.t Bug 19059: Remove CancelReserve - move tests 2017-09-12 12:42:58 -03:00
HoldsQueue.t Bug 19059: Move C4::Reserves::CancelReserve to Koha::Hold->cancel 2017-09-12 12:42:58 -03:00
Holidays.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
ILSDI_Services.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
ImportBatch.t
Installer.t
Items.t
Items_DelItemCheck.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
KitchenSinkPlugin.kpz Bug 17368: Update KitchenSinkPlugin.kpz 2016-10-21 14:48:53 +00:00
Koha.t Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes 2017-07-05 13:42:21 -03:00
Koha_Authority.t Bug 15578: Insert authority records before processing tests 2016-01-23 18:28:49 +00:00
Koha_Database.t
Koha_Elasticsearch.t
Koha_Elasticsearch_Indexer.t
Koha_Misc_Files.t
Koha_SearchEngine_Elasticsearch_Search.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Languages.t Bug 16866: Catch warning t/db_dependent/Languages.t 2016-07-08 14:50:18 +00:00
Letters.t Bug 19256: Make Koha::Acq::Order using Koha::Object 2017-09-07 15:03:04 -03:00
Linker_FirstMatch.t
Log.t Bug 18991: [QA Follow-up] Use schema txn_begin and txn_rollback 2017-07-28 11:23:40 -03:00
MarcModificationTemplates.t Bug 15669: Add a test for GetModificationTemplates 2016-03-03 22:11:44 +00:00
Members.t Bug 19126: Fix Members.t with IndependentBranches set 2017-08-25 12:12:04 -03:00
MungeMarcPrice.t Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search 2016-03-03 20:39:01 +00:00
NewsChannels.t Bug 17960: Rename opac_news.new with opac_news.content 2017-02-06 17:42:12 +00:00
Overdues.t Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
Passwordrecovery.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
PatronLists.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Patrons.t
Plugins.t Bug 15879: Add Tests 2017-01-11 14:03:00 +00:00
QueryParser.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Record.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 15380: Move Koha::Authority to Koha::MetadataRecord::Authority 2015-12-31 18:50:41 +00:00
RefundLostItemFeeRule.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Reports.t Bug 5327: Shifting a db dependent test to the right place 2012-02-01 18:15:19 +01:00
Reserves.t Bug 19059: Remove CancelReserve - move tests 2017-09-12 12:42:58 -03:00
rollingloans.t Bug 17829: Execute rollingloans tests in a transaction 2017-07-26 16:39:17 -03:00
RotatingCollections.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Search.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Serials.t Bug 18782: Remove unused C4::Serials::getsupplierbyserialid 2017-07-05 13:41:47 -03:00
Serials_2.t Bug 18420: Do not use 'S' as patron category code in other tests 2017-04-21 10:49:25 -04:00
Service.t Bug 5477 [SIGN-OFF] Fix test cases that require database access 2011-01-29 17:02:31 +13:00
ShelfBrowser.t Bug 19047: Fix AddBiblio call in ShelfBrowser.t 2017-08-10 16:25:32 -03:00
Sitemapper.t Bug 18226 - Remove "use Test::DBIx::Class" instantiations' dangerous code duplication 2017-06-05 17:52:48 -03:00
Stats.t
SuggestionEngine_ExplodedTerms.t Bug 9857: Fix failing tests 2017-09-01 16:22:02 -03:00
Suggestions.t
sysprefs.t
Tags.t Bug 12916 - Missing Test to demonstrate warnings. 2014-10-30 00:31:26 -03:00
Templates.t
TestBuilder.t Bug 15339: Remove extra 'my' 2017-09-07 13:56:08 -03:00
Upload.t
UsageStats.t
Virtualshelves.t Bug 18672: [QA Follow-up] Simplify without sleep 2017-07-17 13:19:43 -03:00
XISBN.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
XSLT_Handler.t Bug 17807: Add format parameter to XSLT_Handler->transform 2017-08-30 15:06:40 -03:00
zebra_config.pl