-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for the settings-rollback location (#5065)
- Loading branch information
Showing
6 changed files
with
139 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /usr/bin/env python3 | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import argparse | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
parser = argparse.ArgumentParser(description="Generate an addon package") | ||
parser.add_argument( | ||
"-q", | ||
"--qt_path", | ||
default=None, | ||
dest="qtpath", | ||
help="The QT binary path. If not set, we try to guess.", | ||
) | ||
args = parser.parse_args() | ||
|
||
generateall_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "generate_all.py") | ||
addons_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "tests", "functional", "addons") | ||
|
||
for file in os.listdir(addons_path): | ||
manifest_path = os.path.join(addons_path, file, "manifest.json") | ||
if os.path.exists(manifest_path): | ||
print(f"Ignoring path {file} because the manifest already exists.") | ||
continue | ||
|
||
build_cmd = [sys.executable, generateall_path, "-p", os.path.join(addons_path, file)] | ||
if args.qtpath: | ||
build_cmd.append("-q") | ||
build_cmd.append(args.qtpath) | ||
subprocess.call(build_cmd) |
36 changes: 36 additions & 0 deletions
36
tests/functional/addons/05_settings_rollback/tutorial_01/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"api_version": "0.1", | ||
"id": "tutorial_01", | ||
"name": "Tutorial: 01", | ||
"type": "tutorial", | ||
"tutorial": { | ||
"id": "01", | ||
"highlighted": true, | ||
"settings_rollback_needed": true, | ||
"image": "qrc:/addons/tutorial_01/image.svg", | ||
"title": "Tutorial 01", | ||
"subtitle": "Tutorial 01 sub", | ||
"completion_message": "You’ve successfully completed tutorial 01", | ||
"steps": [ | ||
{ | ||
"id": "mainScreen", | ||
"element": "serverListButton-btn", | ||
"tooltip": "Select your location", | ||
"before": [{ | ||
"op": "vpn_off" | ||
},{ | ||
"op": "vpn_location_set", | ||
"exitCountryCode": "at", | ||
"exitCity": "Vienna", | ||
"entryCountryCode": "", | ||
"entryCity": "" | ||
}], | ||
"next": { | ||
"op": "signal", | ||
"qml_emitter": "serverListButton-btn", | ||
"signal": "visibleChanged" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters