mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-02 08:10:03 -06:00
Port Master Password dialog to React. Fixes #7342
This commit is contained in:
1 parent
e59471d87d
commit
b283c0ba18
11 files changed
+238
-197
No files matched your search
@@ -25,30 +25,20 @@ class MasterPasswordTestCase(BaseTestGenerator):
|
||||
# This testcase validates invalid confirmation password
|
||||
('TestCase for Create master password dialog', dict(
|
||||
password="",
|
||||
content=(
|
||||
"Set Master Password",
|
||||
[
|
||||
"Please set a master password for pgAdmin.",
|
||||
"This will be used to secure and later unlock saved "
|
||||
"passwords and other credentials."
|
||||
]
|
||||
)
|
||||
errmsg=None,
|
||||
is_error=False
|
||||
)),
|
||||
('TestCase for Setting Master Password', dict(
|
||||
password="masterpasstest",
|
||||
check_if_set=True,
|
||||
errmsg=None,
|
||||
is_error=False
|
||||
)),
|
||||
('TestCase for Resetting Master Password', dict(
|
||||
reset=True,
|
||||
password="",
|
||||
content=(
|
||||
"Set Master Password",
|
||||
[
|
||||
"Please set a master password for pgAdmin.",
|
||||
"This will be used to secure and later unlock saved "
|
||||
"passwords and other credentials."
|
||||
]
|
||||
)
|
||||
errmsg=None,
|
||||
is_error=False
|
||||
)),
|
||||
]
|
||||
|
||||
@@ -90,13 +80,6 @@ class MasterPasswordTestCase(BaseTestGenerator):
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
if hasattr(self, 'content'):
|
||||
self.assertEqual(response.json['data']['title'],
|
||||
self.content[0])
|
||||
|
||||
for text in self.content[1]:
|
||||
self.assertIn(text, response.json['data']['content'])
|
||||
|
||||
if hasattr(self, 'check_if_set'):
|
||||
response = self.tester.get(
|
||||
'/browser/master_password'
|
||||
|
||||
Reference in new issue
Block a user