-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dmy.berezovskyi
committed
Jan 10, 2025
1 parent
2e411ca
commit 8baea99
Showing
21 changed files
with
114 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
users: | ||
username1: | ||
john: | ||
username: "[email protected]" | ||
details: | ||
first_name: "John" | ||
last_name: "Doe" | ||
password: "" | ||
password: gAAAAABngSXGxzoV1WZASXEj7VbEH37pOJ4_vC9gcdUnSpUI46fPOvTxhQ4-p_JNdCpRqmDlqX4nE0c9ISBB3-0-lWs2WcvdAQ== | ||
username2: | ||
username: "username" | ||
names: | ||
|
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 @@ | ||
rd-xPFY051UmVWPmmNoMXkq3qbuCJ7Ajc0BY7MtXm6g= |
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
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
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
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 |
---|---|---|
@@ -1,8 +1,27 @@ | ||
import time | ||
|
||
import pytest | ||
from src.pageobjects.text.fill_form import FillForm | ||
from utils.crypto import Secure | ||
from utils.yaml_reader import YAMLReader | ||
|
||
|
||
class TestFillForm: | ||
@pytest.fixture | ||
def get_password(): | ||
secure = Secure() | ||
read = YAMLReader.read("data.yaml", to_simple_namespace=True) | ||
password = read.users.john.details.password | ||
print(password) | ||
return secure.decrypt_password(password) | ||
|
||
|
||
def test_fill_user(self, make_driver): | ||
class TestFillForm: | ||
def test_fill_user(self, make_driver, get_password): | ||
fill = FillForm(make_driver) | ||
|
||
# Use the password provided by the fixture | ||
password = get_password | ||
print(password) | ||
|
||
fill.enter_username("selenium framework") | ||
fill.enter_password(password) |
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,20 @@ | ||
import pathlib | ||
from typing import Optional, Literal | ||
|
||
from core.cipher import Cipher | ||
|
||
|
||
class Secure: | ||
def __init__( | ||
self, | ||
base_path: Optional[pathlib.Path] = None, | ||
store_type: Literal["local", "vault"] = "local", | ||
): | ||
self.base_path = ( | ||
base_path or pathlib.Path(__file__).resolve().parent.parent / "config" | ||
) | ||
self.store_type = store_type | ||
self.cipher = Cipher(base_path=self.base_path, vault_type=store_type) | ||
|
||
def decrypt_password(self, password: bytes): | ||
return self.cipher.decrypt(password) |
This file was deleted.
Oops, something went wrong.
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