generated from NHSDigital/repository-template
-
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
1 parent
0140781
commit 07ac980
Showing
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
from libs import CurrentExecution | ||
from libs import file_ops | ||
from playwright.sync_api import expect | ||
|
||
|
||
class Test_Smoke: | ||
ce = CurrentExecution() | ||
fo = file_ops.file_operations() | ||
|
||
@pytest.fixture | ||
def setup(self): | ||
self.ce.start_execution() | ||
yield | ||
self.ce.end_execution() | ||
|
||
@pytest.mark.smoke | ||
@pytest.mark.order(1) | ||
def test_smoke_files_and_paths(self): | ||
assert self.fo.check_if_path_exists(file_or_folder_path=".env"), ".env file not found at the project root." | ||
assert self.fo.check_if_path_exists( | ||
file_or_folder_path="screenshots/" | ||
), "Screenshots folder does not exist at project root" | ||
|
||
@pytest.mark.smoke | ||
@pytest.mark.order(2) | ||
def test_smoke_verify_packages(self): | ||
pass | ||
|
||
@pytest.mark.smoke | ||
@pytest.mark.order(3) | ||
def test_smoke_homepage_loads(self, setup): | ||
expect(self.ce.page.locator("h1")).to_contain_text("Manage vaccinations in schools") |