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

WIP - FEATURE BRANCH - 214 - Refactor Feature Testing #472

Open
wants to merge 25 commits into
base: qa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9b71b6a
Rebase merge conflict
Janell-Huyck Jul 2, 2024
fb92091
Merge conflict resolved
Janell-Huyck Apr 26, 2024
e6a2581
Merge conflicts
Janell-Huyck Apr 23, 2024
e39ff89
Rebase merge conflict
Janell-Huyck Apr 23, 2024
28299f4
Log in use specs with context
Janell-Huyck Apr 19, 2024
cd38517
Rubocop:
Janell-Huyck Apr 19, 2024
8f26fa2
Rubocop
Janell-Huyck Apr 23, 2024
f5714d8
MERGE TO FEATURE BRANCH - 214 - Test viewing pages - MERGE FIRST (#475)
Janell-Huyck Apr 29, 2024
aa28ab8
MERGE TO FEATURE BRANCH - 214 - Test Header and Search - MERGE FIRST …
Janell-Huyck Apr 30, 2024
7a112c7
MERGE TO FEATURE BRANCH - 214 Test Conservation Record Creation - MER…
Janell-Huyck Apr 30, 2024
4d2f3df
Rubocop fix
Janell-Huyck Apr 30, 2024
d8681f7
Test fix and Rubocop
Janell-Huyck May 2, 2024
2d0768c
Fix standard user spec
Janell-Huyck May 2, 2024
971e064
MERGE TO FEATURE - 214 - Edit conservation record specs - MERGE FIRST…
Janell-Huyck May 2, 2024
e89a7ef
MERGE-TO-FEATURE - 214 - Create staff code tests - MERGE FIRST (#488)
Janell-Huyck May 2, 2024
835dfe7
MERGE TO FEATURE - 214 - Edit staff codes - MERGE FIRST (#489)
Janell-Huyck May 3, 2024
08a3dc5
MERGE TO FEATURE - 214 Create new user spec - MERGE FIRST (#490)
Janell-Huyck May 3, 2024
b611881
MERGE TO FEATURE - 214 Edit user spec - MERGE FIRST (#491)
Janell-Huyck May 3, 2024
083211d
MERGE TO FEATURE - 214 - Create controlled vocabulary specs - MERGE F…
Janell-Huyck May 3, 2024
fd09229
MERGE TO FEATURE BRANCH - 214 Edit controlled vocabularies - MERGE FI…
Janell-Huyck May 3, 2024
64a089b
MERGE TO FEATURE - 214 Read only conservation record checks - MERGE F…
Janell-Huyck May 8, 2024
0205082
MERGE TO BRANCH - 214 branch in house repair checks - MERGE FIRST (#495)
Janell-Huyck May 9, 2024
7279dd2
MERGE TO FEATURE - 214 add environment sso config (#510)
Janell-Huyck May 30, 2024
c0cffc4
Fix broken test after rebase
Janell-Huyck Jul 2, 2024
12dd075
Revert the PR that shouldn't have happened to the testing feature bra…
Janell-Huyck Jul 12, 2024
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
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ jobs:
key: v1-dependencies-{{ checksum "Gemfile.lock" }}

# Database setup
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load
- run: bundle exec rails db:create
- run: bundle exec rails db:schema:load
- run: bundle exec rails db:seed

- run:
name: Rubocop
Expand Down
8 changes: 4 additions & 4 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Admin Variables
ADMIN_USERNAME=test
ADMIN_PASSWORD=password
# Admin Variables
ADMIN_USERNAME=test
ADMIN_PASSWORD=password

# Mail Variables
[email protected]
Expand All @@ -15,6 +15,6 @@
TREATMENT_DATABASE_TIMEOUT=5000
TREATMENT_DATABASE_USERNAME=

Mailer settings
# Mailer settings
[email protected]
TREATMENT_PRODUCTION_MAILER_URL=localhost
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
TREATMENT_DATABASE_POOL=5
TREATMENT_DATABASE_PORT=
TREATMENT_DATABASE_TIMEOUT=5000
TREATMENT_DATABASE_USERNAME=
TREATMENT_DATABASE_USERNAME=
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ group :development, :test do
gem 'database_cleaner'
gem 'ed25519'
gem 'factory_bot_rails'
gem 'launchy'
gem 'rspec_junit_formatter'
gem 'rspec-rails', '~> 4.1.0'
gem 'rubocop-rails'
Expand Down
82 changes: 53 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
airbrussh (1.5.2)
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
Expand All @@ -81,7 +81,7 @@ GEM
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
brakeman (5.4.1)
builder (3.2.4)
builder (3.3.0)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
Expand Down Expand Up @@ -109,7 +109,8 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
concurrent-ruby (1.3.1)
childprocess (5.0.0)
concurrent-ruby (1.3.3)
coveralls_reborn (0.28.0)
simplecov (~> 0.22.0)
term-ansicolor (~> 1.7)
Expand All @@ -136,19 +137,23 @@ GEM
dotenv (= 3.1.2)
railties (>= 6.1)
ed25519 (1.3.0)
erubi (1.12.0)
erubi (1.13.0)
execjs (2.9.1)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.5)
Expand All @@ -162,6 +167,9 @@ GEM
thor (>= 0.14, < 2.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand All @@ -177,11 +185,12 @@ GEM
matrix (0.4.2)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.23.1)
minitest (5.24.1)
mize (0.4.1)
protocol (~> 2.0)
msgpack (1.7.2)
mutex_m (0.2.0)
mysql2 (0.5.6)
net-imap (0.4.12)
net-imap (0.4.14)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -196,30 +205,32 @@ GEM
net-protocol
net-ssh (7.2.3)
nio4r (2.7.3)
nokogiri (1.16.5-aarch64-linux)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm-linux)
nokogiri (1.16.6-arm-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86-linux)
nokogiri (1.16.6-x86-linux)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
pagy (8.4.4)
pagy (8.6.2)
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.24.0)
parser (3.3.2.0)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
racc
pdfkit (0.8.7.3)
popper_js (1.16.1)
public_suffix (5.0.5)
protocol (2.0.0)
ruby_parser (~> 3.0)
public_suffix (6.0.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.0)
Expand Down Expand Up @@ -270,11 +281,11 @@ GEM
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.1)
strscan
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
Expand Down Expand Up @@ -304,12 +315,15 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-rails (2.25.0)
rubocop-rails (2.25.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
ruby_parser (3.21.0)
racc (~> 1.5)
sexp_processor (~> 4.16)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
Expand All @@ -326,6 +340,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sexp_processor (4.17.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -340,7 +355,7 @@ GEM
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.0)
sprockets-rails (3.5.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
Expand All @@ -350,18 +365,18 @@ GEM
sqlite3 (1.7.3-x86-linux)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
sshkit (1.22.2)
sshkit (1.23.0)
base64
mutex_m
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
strscan (3.1.0)
sync (0.5.0)
term-ansicolor (1.8.0)
term-ansicolor (1.10.2)
mize
tins (~> 1.0)
thor (1.3.1)
tilt (2.3.0)
tilt (2.4.0)
timeout (0.4.1)
tins (1.33.0)
bigdecimal
Expand All @@ -388,15 +403,23 @@ GEM
wkhtmltopdf-binary (0.12.6.7)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.15)
zeitwerk (2.6.16)

PLATFORMS
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm-linux
arm-linux-gnu
arm-linux-musl
arm64-darwin
x86-linux
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
activestorage (>= 5.2.6.3)
Expand All @@ -421,6 +444,7 @@ DEPENDENCIES
factory_bot_rails
jbuilder (~> 2.5)
jquery-rails
launchy
mysql2
nokogiri
pagy
Expand Down Expand Up @@ -451,4 +475,4 @@ RUBY VERSION
ruby 3.3.1p55

BUNDLED WITH
2.5.6
2.5.10
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ bundle install
```bash
rails db:migrate
rails db:seed
rails db:seed # (Optional, for example works, accounts, and vocabularies)
rails server
rails db:seed # (Optional, for example works)
```
### Important:
Running the db:seed is not sufficient to populate the database with the necessary data. You will need to import the data
for the controlled vocaublary and users.
See [wiki](https://github.com/uclibs/treatment_database/wiki/Migration) for migration steps.

## Running the Tests

Expand Down
2 changes: 2 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

class UsersController < ApplicationController
before_action :authenticate_user!

load_and_authorize_resource

def index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<p>
<%= f.text_area :abbreviated_treatment_report, class: 'form-control' %>
</p>

<p>
<%= f.submit 'Save Abbreviated Treatment Report', class: 'btn btn-primary' %>
</div>
Expand Down
Loading