Beispiel #1
0
 def test_all(self):
     DjkSeleniumCommands(testcase=self, ).exec_class(
         DjkSampleCommands(testcase=self).set_parameters({
             'username':
             '******',
             'password':
             '******',
         }), 'test_all')._default_wait()
Beispiel #2
0
from django_jinja_knockout.viewmodels import to_json
from django_jinja_knockout.automation import AutomationCommands
from django_jinja_knockout.testing import DjkSeleniumCommands
from club_app.testing import SportClub, SportClubInventory, SportClubMembers

for command in DjkSeleniumCommands.yield_command_names():
    globals()[command] = command


class EventAppCommands(AutomationCommands):

    event_list_navigate = (
        click_anchor_by_view,
        {
            'viewname': 'action:list'
        },
        click_anchor_by_view,
        ('action:list', {}, {
            'page': 2,
        }),
        click_anchor_by_view,
        ('action:list', {}, {
            'list_filter': to_json({
                'action_type': 0,
            })
        }),
        click_anchor_by_view,
        ('action:list', {}, {
            'list_filter': to_json({
                'action_type': 0,
            }),
Beispiel #3
0
from django_jinja_knockout.automation import AutomationCommands
from django_jinja_knockout.testing import DjkSeleniumCommands

for command in DjkSeleniumCommands.yield_command_names():
    globals()[command] = command


class FormPrefixMixin:

    def __init__(self, *args, **kwargs):
        self.prefix = kwargs.get('prefix', '')
        if self.prefix != '':
            self.prefix += '-'


class SportClub(FormPrefixMixin, AutomationCommands):

    def club_form_view(self):
        yield (
            click_anchor_by_view, self._.form_view,
            # Next one step is optional:
            form_by_view, self._.form_view,
        )

    def club_base_info(self):
        if hasattr(self._, 'club'):
            yield (
                keys_by_id,
                ('id_{}title'.format(self.prefix), self._.club['title']),
                ('id_{}foundation_date'.format(self.prefix), self._.club['foundation_date']),
                'input_as_select_click', ('id_{}category_{}'.format(self.prefix, self._.club['category_id']),),