Files
2026-10-07 14:06:14 +03:30

26 lines
1.1 KiB
Python

from playwright.sync_api import expect
from .payments import PaymentsPage
class PaymentFeedbackPage(PaymentsPage):
def check_amount(self, raw, expected):
self.page.locator('#id_amount').fill(raw)
expect(self.page.locator('#amount-words')).to_have_text(expected)
def request_share(self):
self.page.locator('[data-share-link] button').click()
def expect_pending_share(self):
button = self.page.locator('[data-share-link] button')
expect(button).to_be_disabled()
expect(button).to_have_attribute('aria-busy', 'true')
expect(button).to_have_text('در حال آماده‌سازی لینک…')
def expect_failed_share(self):
button = self.page.locator('[data-share-link] button')
expect(button).to_be_enabled()
expect(button).not_to_have_attribute('aria-busy', 'true')
expect(button).to_have_text('کپی لینک کوتاه این صفحه برای ارسال به دیگران')
expect(self.page.locator('.pay-share-feedback')).to_contain_text('دریافت لینک ممکن نشد')