Skip to content

Commit

Permalink
Automated last step in offline editing test
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Nov 30, 2018
1 parent 5f3857f commit dbd18fa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions coretests/tests/testerplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def _modifyAndLoadWfs():
if failed:
raise AssertionError("Test failed for the following URLs: " + str(failed))

def _loadWfsToBeEdited():
def _loadWfsToBeEdited(name="testlayer"):
valid = {}
url = os.getenv(TEST_URLS).split(",")[0] + + "/wfs"
url = url.strip() + "/wfs"
uri = "%s?typename=usa:states&version=1.0.0&request=GetFeature&service=WFS&username=admin&password=geoserver" % url
layer = QgsVectorLayer(uri, "testlayer", "WFS")
layer = QgsVectorLayer(uri, name, "WFS")
if not layer.isValid():
raise AssertionError("Test failed loading WFS layer")

Expand Down Expand Up @@ -277,10 +277,8 @@ def functionalTests():
isVerifyStep=True)
offlineTest.addStep("Sync the project by selecting *Database > Offline editing > Synchronize*",
isVerifyStep=True)
offlineTest.addStep("Verify that your changes were stored on the GeoServer.",
isVerifyStep=True)
offlineTest.addStep("Sync the project by selecting *Database > Offline editing > Synchronize*",
isVerifyStep=True)
offlineTest.addStep("Verify that your changes were stored on the GeoServer. Compare the edited layer with the new one, and verify that they are identical.",
prestep= lambda: _loadWfsToBeEdited("testlayer_afterediting"), isVerifyStep=True)

return [spatialiteTest, logTest, aboutTest, wcsTest, wfsTest, arcmapTest, arcfeatureTest, postgisTest, offlineTest]

Expand Down

0 comments on commit dbd18fa

Please sign in to comment.