Skip to content

Commit

Permalink
Convert text and html documentation to markdown in order to display i…
Browse files Browse the repository at this point in the history
…t nicely in GitHub
  • Loading branch information
AkeluX committed May 17, 2017
1 parent e08b1ad commit 78196c1
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 260 deletions.
31 changes: 31 additions & 0 deletions GruntSetup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
This file explains how to install and run Grunt for building Web World Wind artifacts.
On OS X and Linux you will need to run the given commands as root (using sudo). On Windows, you can run them as given.

The below 3 installations are per-machine:

1) Install Node (https://nodejs.org/download/)
Download and install the appropriate installation file.

2) Install r.js (http://requirejs.org/docs/node.html)
`npm install -g requirejs`

3) Install grunt-cli (http://gruntjs.com/getting-started)
`npm update`
`npm install -g grunt-cli`

The below installations are per-project — must be performed with each new full-project checkout - with `cwd` as the project folder:

1) Install requirejs plugin (https://jaketrent.com/post/run-requirejs-with-gruntjs/)
`npm install grunt-contrib-requirejs`

2) Install jsdoc 3.3.0 plugin (https://github.com/krampstudio/grunt-jsdoc)
`npm install grunt-jsdoc@beta`

3) Install compress plugin (https://github.com/gruntjs/grunt-contrib-compress)
`npm install grunt-contrib-compress`

You should now be able to run Grunt:
`grunt jsdoc`
`grunt requirejs`
`grunt compress`
To run all tasks, just run grunt without any arguments.
34 changes: 0 additions & 34 deletions GruntSetup.txt

This file was deleted.

61 changes: 29 additions & 32 deletions HowToCreateAndRunUnitTests.txt → HowToCreateAndRunUnitTests.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@

Preparation: Install Karma and Jasmine
======================================
# Preparation: Install Karma and Jasmine

If you don't have Node.js, please visit https://nodejs.org/en/download/ and
install the appropriate release for your system.

In a terminal, go to the project folder and run “npm install” to install
the necessary dependencies saved as devDependencies in 'package.json' file.
In a terminal, go to the project folder and run `npm install` to install
the necessary dependencies saved as `devDependencies` in `package.json` file.

# How to Run the Tests

How to Run the Tests
====================
## Continuous Testing from the Terminal

Continuous Testing from the Terminal
------------------------------------
In a terminal, go to the project folder and run “karma start karma.conf.js”.
In a terminal, go to the project folder and run `karma start karma.conf.js`.
This will start a process, which automatically runs all tests when source
files are changed and saved as long as the process is running.

Testing from WebStorm
---------------------
## Testing from WebStorm

If you use the workspace configuration provided in the source code repository,
you already have a run configuration called "Karma Tests".

Otherwise, running karma.conf.js in WebStorm will run the tests only once
Otherwise, running `karma.conf.js` in WebStorm will run the tests only once
unless the re-run option is selected. In this case, all tests are run when
source files are changed similarly to starting Karma from the terminal.

Expand All @@ -31,44 +28,43 @@ following steps:
- Go to Run -> Edit Configurations...
- Click on the '+' button on the top left side (Add New Configuration)
- Select 'Karma' from the menu
- In Configuration file box insert the path of the file 'karma.conf.js'
- In Configuration file box insert the path of the file `karma.conf.js`
- In Name box insert the name of the configuration (e.g. Karma Tests)
- Save the configuration

Testing with Other Browsers
---------------------------
## Testing with Other Browsers

By default, the tests run in PhamtomJS. They can be run in other browsers by
changing the list of browsers in karma.conf.js to, for example:
changing the list of browsers in `karma.conf.js` to, for example:

browsers: ['PhantomJS', 'Chrome’]
`browsers: ['PhantomJS', 'Chrome’]`

Please make sure that you also have the approriate launchers available in your
node modules, for example:

npm install karma-chrome-launcher
`npm install karma-chrome-launcher`

## Integration with the Build Process

Integration with the Build Process
----------------------------------
The tests are automatically run when the project is built using the Grunt.

Test Results
------------
The test results are available in "test/<USED_BROWSER>/test-results.xml".
## Test Results

The test results are available in `test/<USED_BROWSER>/test-results.xml`.

How to Create a Test
====================
# How to Create a Test

Please have a look at the existing tests for reference.

1) Go to the 'test' folder and create a new file. Note that the 'test' folder
should maintain the same structure as the 'src' folder, so if the module to
be tested is located in 'src/features/', the related test should be in
'test/features'.
1) Go to the `test` folder and create a new file. Note that the 'test' folder
should maintain the same structure as the `src` folder, so if the module to
be tested is located in `src/features/`, the related test should be in
`test/features`.

2) Save the file as '<name of the module to be tested>.test.js'
2) Save the file as `<name of the module to be tested>.test.js`

3) The basic structure of the test is the following:

```javascript
define([ <list of paths of the modules that this module depends on> ],
function (< list of parameters>) {

Expand All @@ -86,6 +82,7 @@ Please have a look at the existing tests for reference.
})
});
});
```

For more information about the Jasmine Framework used for defining the tests,
please visit: https://jasmine.github.io/2.0/introduction.html
194 changes: 0 additions & 194 deletions WebWorldWindDesignAndCodingGuidelines.html

This file was deleted.

Loading

0 comments on commit 78196c1

Please sign in to comment.