Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBAAEC-33 Modify PR template body and create github actions to add Jira issue #476

Open
wants to merge 20 commits into
base: qa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
20f7c1f
Modify PR template body and create github action to add Jira issue
Janell-Huyck Oct 16, 2024
0cf7ee4
Add github action to update PR title
Janell-Huyck Oct 16, 2024
c69562e
Fix Github automation error
Janell-Huyck Oct 16, 2024
076c5f9
Break up large run blocks in github actions, fix flaky test
Janell-Huyck Oct 16, 2024
e947b22
Update github action to use new Environment file
Janell-Huyck Oct 16, 2024
54153d5
Fix flaky tests
Janell-Huyck Oct 16, 2024
ea7f73b
Correct multiple title updates
Janell-Huyck Oct 16, 2024
4a3f005
Fix syntax error of unclosed if/else statement in yml file
Janell-Huyck Oct 16, 2024
334111c
Simplify adding jira issue, add clarifying comments, fix errors
Janell-Huyck Oct 16, 2024
605fc65
fix flaky test
Janell-Huyck Oct 16, 2024
4cb6a1c
Make template github action run when commits are pushed
Janell-Huyck Oct 16, 2024
d184b2c
Correct 'Check if Jira link exists in PR body' task
Janell-Huyck Oct 24, 2024
392d4a5
Safely load PR body using jq
Janell-Huyck Oct 28, 2024
fab9edb
Add workflow file for jira-pr-updater
Janell-Huyck Nov 22, 2024
040e494
Update to Rails 6.1.7.10
Janell-Huyck Nov 25, 2024
87aa1c8
Update to Rails 6.1.7.10
Janell-Huyck Nov 25, 2024
b7d79bc
Add brakeman.ignore file to ignore brakeman warning for Rails 6.1.7.10
Janell-Huyck Nov 27, 2024
451819b
Merge branch 'qa' into LIBAAEC-33-update-pr-template
Janell-Huyck Jan 23, 2025
981cd02
Add .bundler-audit file to ignore warnings that need Rails 7
Janell-Huyck Jan 23, 2025
d574d55
Merge branch 'qa' into LIBAAEC-33-update-pr-template
Janell-Huyck Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ignore:
- CVE-2024-53986
- CVE-2024-53985

# actionpack - needs Rails 7 upgrade to fix
# actionpack - needs Rails 7 upgrade to fix
- CVE-2024-54133
20 changes: 0 additions & 20 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/update-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Update PR with Jira Issue
on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
update-pr:
runs-on: ubuntu-latest
steps:
- name: Update PR with Jira Issue
uses: uclibs/jira-pr-updater-action@v1
with:
jira-base-url: 'https://ucdts.atlassian.net'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .ruby-gemset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-global
-global
36 changes: 15 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,19 @@ GEM
net-protocol
net-ssh (7.3.0)
nio4r (2.7.4)
nokogiri (1.18.1)
mini_portile2 (~> 2.8.2)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.18.1-aarch64-linux-gnu)
nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.18.1-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.18.1-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.1-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-gnu)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-musl)
nokogiri (1.16.7-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
ostruct (0.6.1)
pagy (9.3.1)
parallel (1.26.3)
Expand Down Expand Up @@ -300,17 +292,17 @@ GEM
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.67.0)
rubocop (1.69.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
rubocop-ast (>= 1.36.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
Expand All @@ -324,7 +316,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (4.25.0)
selenium-webdriver (4.27.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -378,7 +370,9 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.6.0)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand Down
2 changes: 1 addition & 1 deletion config/brakeman.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"check_name": "EOLRails",
"message": "Support for Rails 6.1.7.10 ended on 2024-10-01",
"file": "Gemfile.lock",
"line": 213,
"line": 233,
"link": "https://brakemanscanner.org/docs/warning_types/unmaintained_dependency/",
"code": null,
"render_path": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@

it 'selects an already listed college' do
within '#colleges-group' do
all('input[type="checkbox"]')[1].set(true) # Array is zero-indexed
# Find and explicitly check the second checkbox
checkbox = all('input[type="checkbox"]')[1]
checkbox.set(true)

# Explicitly wait for the checkbox to be checked
expect(checkbox).to be_checked
end
expect(page).to have_selector('input[type="checkbox"]:checked', count: 1)
click_on('Submit')

expect(page).to have_current_path(Rails.application.routes.url_helpers.publications_path)
Expand All @@ -32,33 +36,34 @@
context 'When selecting Other college' do
it 'toggles the Other College text field' do
other_checkbox = all('input[type="checkbox"]').last
other_college_field = find('#other_college_group', visible: :all) # Finds even if invisible

# Initially, the Other College field should not be visible
expect(other_college_field).not_to be_visible
expect(page).to have_selector('#other_college_group', visible: false)

# Select the Other checkbox
other_checkbox.set(true)

# Now, the Other College field should be visible
expect(page).to have_selector('input[type="checkbox"]:checked', count: 1)
expect(page).to have_text('Other College')
expect(other_college_field).to be_visible
expect(page).to have_selector('#other_college_group', visible: true)

# Unselect the Other checkbox
other_checkbox.set(false)

# The Other College field should not be visible again
expect(other_college_field).not_to be_visible
expect(page).to have_selector('#other_college_group', visible: false)
end

it 'allows user to select Other college without filling in the Other name' do
# The "Other" college is the last checkbox in the Colleges group
within '#colleges-group' do
all('input[type="checkbox"]').last.set(true)
# Find and explicitly check the last checkbox
checkbox = all('input[type="checkbox"]').last
checkbox.set(true)

# Explicitly wait for the last checkbox to be checked
expect(checkbox).to be_checked
end

expect(page).to have_selector('input[type="checkbox"]:checked', count: 1)
click_on('Submit')

expect(page).to have_current_path(Rails.application.routes.url_helpers.publications_path)
Expand Down Expand Up @@ -111,9 +116,22 @@

it 'saves both a listed college and Other college when selected' do
within '#colleges-group' do
all('input[type="checkbox"]')[1].set(true) # Array is zero-indexed
all('input[type="checkbox"]').last.set(true)
# Select the second checkbox and set it to true
checkbox1 = all('input[type="checkbox"]')[1]
checkbox1.set(true)

# Explicitly wait for the checkbox to be checked
expect(checkbox1).to be_checked

# Select the last checkbox and set it to true
checkbox2 = all('input[type="checkbox"]').last
checkbox2.set(true)

# Explicitly wait for the last checkbox to be checked
expect(checkbox2).to be_checked
end

# Ensure there are exactly 2 checkboxes checked
expect(page).to have_selector('input[type="checkbox"]:checked', count: 2)
fill_in('artwork[other_college]', with: 'Other College Name')
click_on('Submit')
Expand Down