Skip to content

Commit

Permalink
Create test_0_smoke.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaymudholkar1 authored Sep 20, 2024
1 parent 0140781 commit 07ac980
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/test_0_smoke.py
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")

0 comments on commit 07ac980

Please sign in to comment.