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()
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()
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()
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()
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()
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()
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()
def test_advisors_typehead(login): create_author.go_to() assert create_author.write_advisor('alexe', 'Vorobyev, Alexey').has_error()
def test_experiments_typehead(login): create_author.go_to() assert create_author.write_experiment('atl', 'ATLAS').has_error()
def test_institutions_typehead(login): create_author.go_to() assert create_author.write_institution('cer', 'CERN').has_error()