fix payment
This commit is contained in:
1 parent
4f7486152c
commit
bb3ddd1610
47 files changed
+2137
-51
No files matched your search
@@ -0,0 +1,44 @@
|
||||
from django.urls import reverse
|
||||
from playwright.sync_api import expect
|
||||
|
||||
from .base import BasePage
|
||||
|
||||
|
||||
class StaffPaymentsPage(BasePage):
|
||||
def open_desk(self, parameters=''):
|
||||
self.goto(reverse('staff_payments:desk') + parameters)
|
||||
|
||||
def assert_action_tab(self):
|
||||
expect(self.page.get_by_role('link', name='نیازمند اقدام من', exact=True)).to_have_attribute('aria-current', 'page')
|
||||
expect(self.page.get_by_role('heading', name='فیشهای نیازمند اقدام شما')).to_be_visible()
|
||||
|
||||
def search(self, query):
|
||||
self.page.locator('[name=q]').fill(query)
|
||||
self.page.get_by_role('button', name='جستوجو', exact=True).click()
|
||||
|
||||
def next_page(self):
|
||||
pagination = self.page.get_by_role('navigation', name='صفحهبندی', exact=True)
|
||||
expect(pagination).to_contain_text('صفحه 1 از 2')
|
||||
pagination.get_by_role('link', name='بعدی', exact=True).click()
|
||||
expect(pagination).to_contain_text('صفحه 2 از 2')
|
||||
|
||||
def open_notice(self, public_id):
|
||||
self.goto(reverse('staff_payments:notice_detail', args=[public_id]))
|
||||
|
||||
def inspect_history(self):
|
||||
panel = self.page.locator('.pay-sms-panel')
|
||||
expect(panel).to_contain_text('رسیده به گوشی')
|
||||
expect(panel).to_contain_text('پذیرفتهشده توسط سرویس پیامک')
|
||||
expect(panel).to_contain_text('اعتبار پنل کافی نیست')
|
||||
for details in panel.locator('details').all():
|
||||
details.locator('summary').click()
|
||||
expect(panel).to_contain_text('old-delivered-id')
|
||||
expect(panel).to_contain_text('کد پاسخ سرویس: -19')
|
||||
|
||||
def resend_sms(self):
|
||||
button = self.page.get_by_role('button', name='ارسال مجدد پیامک اعلامیه واریز', exact=True)
|
||||
expect(button).to_be_enabled()
|
||||
button.click()
|
||||
expect(self.page.locator('.flash')).to_contain_text('درخواست ارسال مجدد پیامک در صف ثبت شد')
|
||||
expect(button).to_be_disabled()
|
||||
expect(self.page.locator('.pay-sms-history .pay-sms-record')).to_have_count(3)
|
||||
Reference in new issue
Block a user