Skip to content

Test Configuration

Robert Polak edited this page Aug 9, 2019 · 9 revisions

Home / Test / Configuration

1. test\template\index.html Configuration file.

test\template\index.html is the entry page for application (http://[domain.name]/client/3.0.0/test/index.html#) The file contains entries for Test Client API Library Java Script listed as below:

  • api.constant.js RequiredOK
  • api.config.js RequiredOK
  • api.library.js RequiredOK
  • api.plugin.js RequiredOK

Configuration entries at /index.html file.

<!DOCTYPE html>
<html lang="en">

<head>
    <!-- API Constant -->
    <script src="js/app.constant.js"></script>

    <!-- API Configuration -->
    <script src="js/app.config.js"></script>

    <!-- API Global -->
    <script src="js/app.global.js"></script>

    <!-- API Plugin -->
    <script src="js/app.plugin.js"></script>

    <!-- API Library -->
    <script src="js/app.library.js"></script>  
</head>

2. The entry page for application Test Web Site

Screen shot of Version 3.0.0 Test Web Site and URL below:

http://[domain.name]/client/3.0.0/test/index.html#

image

3. The Test folder content.

The Test folder contains templates definitions for Client API.

image

  • 4. test\config - Test Client API Library config.json configuration file. .

/config.json contains development (debug) configuration parameters and constants.

Each Deployment environment have specific version of config.json file:

  • test\config\config.json - contains development (debug) template configuration parameters and constants.
  • test\config\config.test - Test environment version of config.json
  • test\config\config.uat - UAT environment version of config.json
  • test\config\config.live - Lest environment version of config.json
  • API end point URL configuration

      {
	"url": {
		"api": {
			"public": "https://live-domain.extension/public/api.jsonrpc",
			"private": "https://live-domain.extension/private/api.jsonrpc"
		},
	},
	...
      }

Code usage example: app.config.url.api.private

api.ajax.jsonrpc.request(app.config.url.api.private, "PxStat.System.Settings.Language_API.Read", { LngIsoCode: null }, "app.create.initiate.callback.readLanguages");
  • Title configuration

      {
          ...
         "title": "Title [Live]",
          ...
      }
  • Header links configuration

      {
	"url": {
		"api": {
			"public": "https://live-domain.extension/public/api.jsonrpc",
			"private": "https://live-domain.extension/private/api.jsonrpc"
		},
		"header": {
			"logo": {
				"alt": "YOUR LOGO HERE",
				"src": "image/logo.png"
			}
		},
	}
	...
      }
  • Footer links configuration

      {
	"url": {
		"footer": [
			{
				"text": "Home",
				"href": "https://domain.extension"
			},
			{
				"text": "Contact Us",
				"href": "https://domain.extension/contactus"
			},
			{
				"text": "Privacy",
				"href": "https://domain.extension/privacy"
			},
			{
				"text": "Copyright",
				"href": "https://domain.extension/copyright"
			}
		]
	},
	...
      }

Code usage example: app.config.url.footer.length

    var numLinks = app.config.url.footer.length;

More details about the Client API Library /test at Test.

Clone this wiki locally