Skip to content

Commit

Permalink
Pagination test
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrlc committed Nov 7, 2023
1 parent c0971e5 commit 39b8d6b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions tests/foreman/ui/test_pagination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""Test class for Locations UI
:Requirement: Location
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: OrganizationsandLocations
:Team: Endeavour
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import pytest


@pytest.mark.tier2
def test_pagination(session):
"""Dummy test for pagination
Args:
session (_type_): _description_
"""
with session:

# Pagination in SatTable
view = session.task.navigate_to(session.task, 'All')
assert view.table.pagination.is_enabled is True
assert view.table.pagination.current_page == 1
view.table.pagination.next_page()
assert view.table.pagination.current_page == 2
view.table.pagination.previous_page()
assert view.table.pagination.current_page == 1
assert view.table.pagination.total_pages > 0

# Pagination in a view with Table
view = session.location.navigate_to(session.location, 'All')
assert view.pagination.is_enabled is True
assert view.pagination.current_page == 1
view.pagination.next_page()
assert view.pagination.current_page == 2
view.pagination.previous_page()
assert view.pagination.current_page == 1
assert view.pagination.total_pages > 0

0 comments on commit 39b8d6b

Please sign in to comment.