Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter file #2365

Merged
merged 7 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions tests/rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,45 @@ JasmineJS test suite for testing Oskari rpc functions, events and requests.

To run tests on your published map set the URL in common_parts.js.

```
mapURL = 'http://demo.oskari.org/?lang=en&uuid=8016f9be-131b-44ab-bcee-5055628dbd42'
``` javascript
var mapURL = 'http://demo.oskari.org/?lang=en&uuid=8016f9be-131b-44ab-bcee-5055628dbd42'
```

### Adding tests

Add specs to SpecRunner.html

```
``` html
<!-- include spec files here... -->
<script src="spec/map_spec.js" defer></script>
```

## Running the tests

SpecRunner.html runs the defined specs. Open it from server (for example http://localhost:8080/Oskari/tests/rpc/SpecRunner.html).
SpecRunner.html runs the defined specs. Open it from server (for example [http://localhost:8080/Oskari/tests/rpc/SpecRunner.html](http://localhost:8080/Oskari/tests/rpc/SpecRunner.html)).

### All tests

To run all tests open SpecRunner.html in browser.

```
SpecRunner.html
``` bash
/SpecRunner.html
```

### Specific spec

Run tests from one spec by specifying the name in the URL or by clicking the spec name in browser.

```
SpecRunner.html?spec=Map
``` bash
/SpecRunner.html?spec=Map
```

### Specific test

Run only one test by specifying the test name in URL or by clicking the test name in browser.

```
SpecRunner.html?spec=Map%20Zoom%20functions%20Gets%20Zoom%20Range
``` bash
/SpecRunner.html?spec=Map%20Zoom%20functions%20Gets%20Zoom%20Range
```

## Framework
Expand All @@ -55,11 +55,11 @@ SpecRunner.html?spec=Map%20Zoom%20functions%20Gets%20Zoom%20Range

## RPC documentation

* http://www.oskari.org/examples/rpc-api/rpc_example.html
* http://www.oskari.org/documentation/bundles/framework/rpc
* http://www.oskari.org/api/bundles
* http://www.oskari.org/api/requests
* http://www.oskari.org/api/events
* [RPC example](http://www.oskari.org/examples/rpc-api/rpc_example.html)
* [RPC documentation](https://www.oskari.org/api/bundles#/unreleased/framework/rpc)
* [Bundles](http://www.oskari.org/api/bundles)
* [RPC Requests](http://www.oskari.org/api/requests)
* [RPC Events](http://www.oskari.org/api/events)

## License

Expand Down
4 changes: 2 additions & 2 deletions tests/rpc/SpecRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

</head>
<body>
<iframe id="map" style="border: none; height: 100%; width: 100%;"></iframe>
<iframe id="map" style="border: none; height: 700px; width: 100%;"></iframe>

<!-- include source files here... -->
<script src="src/common_parameters.js" defer></script>
<script src="src/paikkatietoikkuna_parameters.js" defer></script>

<!-- include spec files here... -->
<script src="spec/general_spec.js" defer></script>
Expand Down
3 changes: 2 additions & 1 deletion tests/rpc/src/common_parameters.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
Switch map URL to test other maps
*/
var mapUrl = 'https://kartta.paikkatietoikkuna.fi/?lang=en&uuid=053027f4-91d9-4351-aec4-c6a31dd68c56';
var mapUrl = 'https://demo.oskari.org/example';

// sets source
document.getElementById('map').src = mapUrl;
// sets domain (localhost is allowed)
Expand Down
Loading