fix payment UI UX
This commit is contained in:
1 parent
bb3ddd1610
commit
90931a5a64
6 files changed
+104
-10
No files matched your search
@@ -0,0 +1,25 @@
|
||||
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('دریافت لینک ممکن نشد')
|
||||
Reference in new issue
Block a user