Esempio n. 1
0
def test_review_submission_author(login):
    create_author.go_to()
    create_author.submit_author(input_author_data)
    holding_panel_author_list.go_to()
    holding_panel_author_list.load_submission_record(input_author_data)
    holding_panel_author_detail.go_to()
    holding_panel_author_detail.load_submitted_record(input_author_data)
    assert holding_panel_author_detail.review_record().has_error()
Esempio n. 2
0
def test_accept_author(login):
    create_author.go_to()
    create_author.submit_author(INPUT_AUTHOR_DATA)
    holding_panel_author_list.go_to()
    holding_panel_author_list.load_submission_record(INPUT_AUTHOR_DATA)
    holding_panel_author_detail.go_to()
    holding_panel_author_detail.load_submitted_record(INPUT_AUTHOR_DATA)
    assert holding_panel_author_detail.accept_record().has_error()
Esempio n. 3
0
def test_mandatory_fields(login):
    expected_data = {
        'given-name': 'This field is required.',
        'display-name': 'This field is required.',
        'reserach-field': 'This field is required.'
    }

    create_author.go_to()
    assert create_author.submit_empty_form(expected_data).has_error()
Esempio n. 4
0
def test_experiments_years(login):
    create_author.go_to()

    input_id = 'experiments-0-start_year'
    error_mess_id = 'state-experiments-0-start_year'
    assert create_author.write_year(input_id, error_mess_id, 'wrongyear').has_error()
    assert not create_author.write_year(input_id, error_mess_id, '2016').has_error()

    input_id = 'experiments-0-end_year'
    error_mess_id = 'state-experiments-0-end_year'
    assert create_author.write_year(input_id, error_mess_id, 'wrongyear').has_error()
    assert not create_author.write_year(input_id, error_mess_id, '2016').has_error()
Esempio n. 5
0
def test_institutions_years(login):
    create_author.go_to()

    input_id = 'institution_history-0-start_year'
    error_mess_id = 'state-institution_history-0-start_year'
    assert create_author.write_year(input_id, error_mess_id, 'wrongyear').has_error()
    assert not create_author.write_year(input_id, error_mess_id, '2016').has_error()

    input_id = 'institution_history-0-end_year'
    error_mess_id = 'state-institution_history-0-end_year'
    assert create_author.write_year(input_id, error_mess_id, 'wrongyear').has_error()
    assert not create_author.write_year(input_id, error_mess_id, '2016').has_error()
Esempio n. 6
0
def test_ORCID_format(login):
    create_author.go_to()
    assert create_author.write_orcid('wrong.ORCID').has_error()
    assert not create_author.write_orcid('1111-1111-1111-1111').has_error()
Esempio n. 7
0
def test_mail_format(login):
    create_author.go_to()
    assert create_author.write_mail('wrong.mail').has_error()
    assert not create_author.write_mail('*****@*****.**').has_error()
Esempio n. 8
0
def test_advisors_typehead(login):
    create_author.go_to()
    assert create_author.write_advisor('alexe', 'Vorobyev, Alexey').has_error()
Esempio n. 9
0
def test_experiments_typehead(login):
    create_author.go_to()
    assert create_author.write_experiment('atl', 'ATLAS').has_error()
Esempio n. 10
0
def test_institutions_typehead(login):
    create_author.go_to()
    assert create_author.write_institution('cer', 'CERN').has_error()