|
46 | 46 | click_button('Submit final files for review') |
47 | 47 | expect(page).not_to have_content('Invention disclosure number is required for Restricted submissions.') |
48 | 48 | end |
| 49 | + end |
49 | 50 |
|
50 | | - context 'when graduate author is in college of liberal arts' do |
51 | | - unless current_partner.honors? |
52 | | - before do |
53 | | - submission.update(academic_program: 'LA') |
54 | | - page.refresh |
55 | | - end |
56 | | - |
57 | | - it 'has a restricted_liberal_arts radio button' do |
58 | | - page.find("input#submission_access_level_restricted_liberal_arts").click |
59 | | - expect(page.find("input#submission_access_level_restricted_liberal_arts")).to be_checked |
60 | | - expect(page).not_to have_content('Enter justification') |
61 | | - expect(page).not_to have_field('submission_invention_disclosures_attributes_0_id_number') |
62 | | - end |
63 | | - end |
| 51 | + context 'when author is in college of liberal arts' do |
| 52 | + before do |
| 53 | + submission.update(academic_program: 'LA') |
| 54 | + page.refresh |
64 | 55 | end |
65 | 56 |
|
66 | | - context 'when author is not in college of liberal arts' do |
67 | | - before do |
68 | | - submission.update(academic_program: 'CA') |
69 | | - page.refresh |
| 57 | + if current_partner.graduate? |
| 58 | + it 'has a restricted_liberal_arts radio button' do |
| 59 | + page.find("input#submission_access_level_restricted_liberal_arts").click |
| 60 | + expect(page.find("input#submission_access_level_restricted_liberal_arts")).to be_checked |
| 61 | + expect(page).not_to have_content('Enter justification') |
| 62 | + expect(page).not_to have_field('submission_invention_disclosures_attributes_0_id_number') |
70 | 63 | end |
| 64 | + end |
71 | 65 |
|
| 66 | + unless current_partner.graduate? |
72 | 67 | it 'does not have a restricted_liberal_arts radio button' do |
73 | 68 | expect(page).not_to have_selector("input#submission_access_level_restricted_liberal_arts") |
74 | 69 | end |
75 | 70 | end |
76 | 71 | end |
| 72 | + |
| 73 | + context 'when author is not in college of liberal arts' do |
| 74 | + before do |
| 75 | + submission.update(academic_program: 'CA') |
| 76 | + page.refresh |
| 77 | + end |
| 78 | + |
| 79 | + it 'does not have a restricted_liberal_arts radio button' do |
| 80 | + expect(page).not_to have_selector("input#submission_access_level_restricted_liberal_arts") |
| 81 | + end |
| 82 | + end |
77 | 83 | end |
78 | 84 |
|
79 | 85 | context 'milsch authors cannot choose the access level', :milsch do |
|
0 commit comments