# ArchbotGUI Module
The ArchbotGUI module creates a communication channel between the game client and the [Generic Test Suite](https://git.netent.com/projects/GAT/repos/archbot-generic-testsuite-opr/browse).
Game based data which is required by the Generic Test Suite or any automated test cases can be obtained from the game by using this module.
## Usage
**1.** Add the archbotGUI module in the game client package.json:
```
npm i -E @netent/archbot-testsuite-guimodule@x.x.x
```
**2.** Add the following entries to the index.xhtml:
```bash
```
**Order matters!** Please put these entries at bottom of the file.
**3.** Check ArchbotGUIController js file. There is a DATA_SET object which you must override according
to your game. Create a separate ArchbotGUIController.js inside your game source and override DATA_SET according to your game.
```
introMovie: {
"skipButton": {pixi: "pixiSkipButton", nonPixi: "nonPixiSkipButton"}
},
```
**For example:** See the introMovie module and the name of the skip button in the view. Suppose the game is a pixi-netent game and
the name of the item in the game is myPixiSkipButton, then the "skipButton" object should be changed to:
```
"skipButton": {pixi: "myPixiSkipButton", nonPixi: "nonPixiSkipButton"}
```
If you are **not** using pixi-netent and just using common framework, then instead change the skipButton to reflect the name of your game's skipButton like this:
```
"skipButton": {pixi: "pixiSkipButton", nonPixi: "myNonPixiSkipButton"}
```
**Do this change for every module you want to test.**
**4.** After you are done with the DATA_SET setup, please make sure you have an entry in index.xhtml of the new
archbotGUIController.js, which is overriding the archbotGUI module's archbotGUIController.js
```
```
#### More details about DATA_SET mapping
If you want to fetch the continue button of the "featureSplash" module, you need to put the property name under the game type ('pixi'/ 'nonPixi').
The property should be directly associated with the view.
In the current case the property name is 'featureSplashContinueBox' for the continue button.
If the property is not a direct child of the view you may indicate the path with the dot operator.
**For example:** If the 'featureSplashContinueBox' is under a property 'abc' which is a direct child of the view,
then you should mention the key as 'abc.featureSplashContinueBox'.
You can use it for multiple levels too, for example 'abc.xyz.pqr.featureSplashContinueBox'
**5.**: Add the following entry in the game client's modules.json:
```
"archbotGUI": {
"optional" : true,
"module" : "Archbot.ArchbotGUI"
}
```
**6.** Go to [Starburst repo](https://git.netent.com/projects/GRXIJ/repos/starburst-client-generic/browse?at=refs%2Fheads%2Fmaster)
and copy "archbotTestData.json" from within "src/config" to your game client's "src/config" folder. Change
"archbotTestData.json" according to your game data.
**For example:** If your game has an Intro movie and Feature Splash (Intro screen) then set the following properties to true:
```
"hasIntroMovie" : true,
"hasIntroScreen" : true,
```
**7.** Put archbotTestData.json entry in game client's resources.xml:
```
config/archbotTestData.json
json
archbotTestData
4822
```
**8.** Now check the game client build process. New added modules/files must exist in the built version of the game.
- If your game is using xsl files for game build then please check Starburst / [Elements](https://git.netent.com/projects/ELMNTS/repos/elements-client-generic/commits/35f6f79d1025a28fb291b0a9d0a8c4ced6601077)
game client and follow the changes done in xsl files and pom.xml.
- If your game is using gulp then you need to do changes in the gulp file so that the archbotGUI module is included in the game build.
Please check [castle-destroyer](https://git.netent.com/projects/CSD/repos/castle-destroyer-client/commits/15f92aa9c91d772cb7545a3901031bdfbe369748#gulpfile.js)
for gulp file changes.
- Make sure your prod build version do not have archbotGUI module and archbotTestData.json
Reference link for pom changes: [Link](https://git.netent.com/projects/GONZO/repos/gonzos-quest-client-generic/commits/339d2050624248da956b224a3dd6039aebd060fe#pom.xml)
## Issue tracking
Bugs and feature requests should be added to [JIRA](https://jira.netent.com/projects/ATCS/summary).
## Support
You can reach the development team on [Hipchat](https://hipchat.netent.com/chat/room/2048).