fix payment UI UX
This commit is contained in:
1 parent
bb3ddd1610
commit
90931a5a64
6 files changed
+104
-10
No files matched your search
@@ -12,9 +12,10 @@ class PaymentLinkPage(PaymentsPage):
|
||||
self.page.context.grant_permissions(['clipboard-read', 'clipboard-write'])
|
||||
|
||||
def copied_text(self, button_name):
|
||||
self.page.get_by_role('button', name=button_name, exact=True).click()
|
||||
button = self.page.locator('[data-share-link] button') if button_name == 'کپی لینک کوتاه این صفحه برای ارسال به دیگران' else self.page.get_by_role('button', name=button_name, exact=True)
|
||||
button.click()
|
||||
if button_name == 'کپی لینک کوتاه این صفحه برای ارسال به دیگران':
|
||||
expect(self.page.locator('.pay-share-feedback')).to_contain_text('لینک آماده است')
|
||||
expect(self.page.locator('.pay-share-feedback')).to_contain_text('لینک آماده است' if self.manual_copy else 'لینک کوتاه کپی شد')
|
||||
if self.manual_copy:
|
||||
dialog = self.page.get_by_role('dialog')
|
||||
expect(dialog).to_be_visible()
|
||||
@@ -26,7 +27,9 @@ class PaymentLinkPage(PaymentsPage):
|
||||
|
||||
def copy_short_link(self):
|
||||
value = self.copied_text('کپی لینک کوتاه این صفحه برای ارسال به دیگران')
|
||||
expect(self.page.locator('.pay-share-feedback')).to_contain_text('لینک آماده است')
|
||||
expect(self.page.locator('[data-share-link] button')).to_be_enabled()
|
||||
expect(self.page.locator('[data-share-link] button')).not_to_have_attribute('aria-busy', 'true')
|
||||
expect(self.page.locator('[data-share-link] button')).to_have_text('کپی لینک کوتاه این صفحه برای ارسال به دیگران' if self.manual_copy else 'لینک کپی شد؛ کپی دوباره')
|
||||
return value
|
||||
|
||||
def open_link(self, path):
|
||||
|
||||
Reference in new issue
Block a user