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

CSC/ECE 517 Spring 2024 - E2413. Testing - Answer Tagging #2775

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
09a88bb
First commit
bmorri3 Mar 8, 2024
eb48c3f
More test comments
bmorri3 Mar 8, 2024
87a5931
Added skeleton tests to answer_tags_controller_spec.rb
bmorri3 Mar 8, 2024
44dce12
Added test skeletons to tag_prompt_deployment_spec.rb
bmorri3 Mar 8, 2024
07a6416
Merge pull request #2 from bmorri3/add_answer_tag_controller_spec.rb_…
bmorri3 Mar 9, 2024
fd0b5ac
Merge pull request #3 from bmorri3/add_tag_prompt_deployment_spec.rb_…
bmorri3 Mar 9, 2024
c77be05
Implemented testing when action destroy is accessed.
bmorri3 Mar 9, 2024
7cf852b
Merge pull request #4 from bmorri3/answer_tags_controller_spec_action…
bmorri3 Mar 9, 2024
eec618a
Removed comments regarding why destroy was returning nil. Addressed i…
Mar 16, 2024
51ae7bb
Added test: when there is one answer tag for given user_id, assignmen…
bmorri3 Mar 16, 2024
ee99d2f
given 3 random ids and 2 ids not prodvided
Mar 16, 2024
9bf792a
Test commit
bmorri3 Mar 16, 2024
f3a900a
'when there is no answer tag for given user_id' test passes
bmorri3 Mar 16, 2024
c98f763
'when there is no answer tag for given assignment_id' passes
bmorri3 Mar 16, 2024
1d324bd
'when there is no answer tag for given user_id, assignment_id, and qu…
bmorri3 Mar 16, 2024
8b77279
Merge pull request #23 from CSC517-Project3/answer_tags_controller_sp…
bmorri3 Mar 16, 2024
98cd5ae
removed not needed specs
Mar 16, 2024
1b52586
Merge branch 'dev' into answer_tagging_spec_index
shandlermason Mar 16, 2024
c0f47db
Merge pull request #25 from CSC517-Project3/answer_tagging_spec_index
shandlermason Mar 16, 2024
0a14425
fixed bug with end statement - 37 tests pass
Mar 16, 2024
9027d88
Commented out 'when there is no answer tag for given questionnaire_id'
bmorri3 Mar 16, 2024
b1b2db7
Merge branch 'dev' into answer_tags_controller_spec_action_allowed
bmorri3 Mar 16, 2024
40277a4
Merge pull request #28 from CSC517-Project3/answer_tags_controller_sp…
bmorri3 Mar 16, 2024
354fbb9
Fixed unexpected end of file error.
bmorri3 Mar 16, 2024
2e261bc
Adding test for user id
Mar 23, 2024
24c40ab
Added 'when given an invalid tag_prompt_id' and 'when there are no te…
bmorri3 Mar 24, 2024
0f6bd08
Added contexts and comments for all tests.
bmorri3 Mar 24, 2024
ffc943a
Merge pull request #30 from CSC517-Project3/tag_prompt_deployment_spe…
bmorri3 Mar 24, 2024
38fb28e
Spelling fix in TPDS, some tests commented out in ATGS
bmorri3 Mar 24, 2024
a615689
Merge pull request #39 from CSC517-Project3/answer_tags_controller_sp…
bmorri3 Mar 24, 2024
322c366
Added all necessary tests. Needs contexts/comments.
bmorri3 Mar 24, 2024
b0290fa
Minor formatting
bmorri3 Mar 24, 2024
db0b596
Adding context for each test
Mar 24, 2024
62e0ee7
Merge branch 'dev' into answer_tags_controller_spec_adding_contexts
bmorri3 Mar 24, 2024
99277bf
Merge pull request #43 from CSC517-Project3/answer_tags_controller_sp…
bmorri3 Mar 24, 2024
21f88e4
Fixed a type fo -> of
bmorri3 Mar 24, 2024
63b0c57
Added comments to every test
Mar 24, 2024
7df87ea
Merge pull request #47 from CSC517-Project3/dev
bmorri3 Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,9 @@ pg_data
.ruby-version
mysql2psql.yml
*.pem
t.csv
t.csv

# Output for answer_tags_controller_spec.rb
answer_tags_controller_rspec_output.txt
# Output for tag_prompt_deployment_spec.rb
tag_prompt_deployment_spec_output.txt
3 changes: 2 additions & 1 deletion app/models/tag_prompt_deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def get_number_of_taggable_answers(user_id)

answers = Answer.where(question_id: questions_ids, response_id: responses_ids)

answers = answers.where(conditions: "length(comments) < #{answer_length_threshold}") unless answer_length_threshold.nil?
# answers = answers.where(conditions: "length(comments) < #{answer_length_threshold}") unless answer_length_threshold.nil?
answers = answers.where(conditions: "length(comments) < #{self.answer_length_threshold}" ) unless self.answer_length_threshold.nil?
return answers.count
end
0
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
t.float "Hamer", limit: 24, default: 1.0
t.float "Lauw", limit: 24, default: 0.0
t.integer "duty_id"
t.boolean "can_mentor"
t.boolean "can_mentor", default: false
t.index ["duty_id"], name: "index_participants_on_duty_id"
t.index ["user_id"], name: "fk_participant_users"
end
Expand Down