InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - GUI Test Cases.
Contact : ole.moller.nielsen@gmail.com
Note
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Test the InaSAFE GUI
Issue47: Problem when hazard & exposure data are in different proj to viewport. See https://github.com/AIFDR/inasafe/issues/47
Test that ouputs from a model are correctly styled (colours and opacity.
Aggregation combo changes properly according on no loaded layers
Aggregation combo changes properly according loaded layers
Aggregation Combobox toggles on and off as expected.
Aggregation attribute is chosen correctly when there is only one attr available.
Aggregation attribute is chosen correctly when present in kezwords.
Aggregation attribute is chosen correctly when there is no attr available.
Aggregation attribute is chosen correctly when there None in the kezwords
Function configuration button is disabled when layers not compatible.
Function configuration button is enabled when layers are compatible.
Test the metadata is updated as the user highlights different QGIS layers. For inasafe outputs, the table of results should be shown See also https://github.com/AIFDR/inasafe/issues/58
Check that when we add a layer we can see it in the canvas list.
Flood function runs in GUI with Flood in Jakarta hazard data Uses DKI buildings exposure data.
Padang 2009 fatalities estimated correctly (large extent)
Padang 2009 fatalities estimated correctly (small extent)
Flood function runs in GUI with Jakarta data Raster on raster based function runs as expected.
Flood function runs in GUI with 5x5km population data Raster on raster based function runs as expected with scaling.
Flood function runs in GUI with Jakarta polygon flood hazard data. Uses population raster exposure layer
Check if the save/restore state methods work. See also https://github.com/AIFDR/inasafe/issues/58
Return a string representing the list of canvas layers (in correct order) but formatted with line breaks between each entry.
Helper to return a string showing the state of all combos (all their entries
Return a string representing a list of layers (in correct order) but formatted with line breaks between each entry.
Get state of the 3 combos on the DOCK ui. This method is purely for testing and not to be confused with the saveState and restoreState methods of inasafedock.
Helper function to load layers as defined in a python list.
Helper function to load standard layers into the dialog.
A helper function to populate the DOCK and set it to a valid state.
Helper function to set the gui state to a given scenario.
theHazard str - (Required) name of the hazard combo entry to set. theExposure str - (Required) name of exposure combo entry to set. theFunction - (Required) name of the function combo entry to set. theFunctionId - (Required) the impact function id that should be used. theOkButtonFlag - (Optional) Whether the ok button should be enabled
after this scenario is set up.
theAggregationLayer - (Optional) which layer should be used for aggregation
We require both theFunction and theFunctionId because safe allows for multiple functions with the same name but different id’s so we need to be sure we have the right one.
Raises: None
This module forms part of the InaSAFE tool.