-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove more references to Comment from tests
Remove more references to Comment from tests
- Loading branch information
Showing
3 changed files
with
2 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,77 +156,6 @@ | |
# assert_equal pm.full_url, result[row].join(', ') | ||
# end | ||
|
||
# test "should add as note column 'Item note'" do | ||
# user_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{@user.id}" | ||
# data = { item: random_string, user: user_url, projects: @p.url, annotator: user_url, note1: 'A note', note2: 'Other note' } | ||
# spreadsheet_id = "1lyxWWe9rRJPZejkCpIqVrK54WUV2UJl9sR75W5_Z9jo" | ||
# row = add_data_on_spreadsheet(data) | ||
|
||
# result = @team.import_spreadsheet(@@spreadsheet_id, @@worksheet.title, @user.id) | ||
# pm = Media.find_by_quote(data[:item]).project_medias.first | ||
# assert_equal ['A note', 'Other note'], pm.comments.map(&:text).sort | ||
# assert_equal pm.full_url, result[row].join(', ') | ||
# assert_equal 2, pm.get_versions_log.where(item_type: 'Comment').count | ||
# end | ||
|
||
# test "should not add note if annotator is not valid" do | ||
# user_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{@user.id}" | ||
# invalid_annotator = 'some annotator that is invalid' | ||
# data1 = { item: random_string, user: user_url, projects: @p.url, annotator: invalid_annotator, note1: 'A note' } | ||
# spreadsheet_id = "1lyxWWe9rRJPZejkCpIqVrK54WUV2UJl9sR75W5_Z9jo" | ||
# row_with_invalid_annotator = add_data_on_spreadsheet(data1) | ||
|
||
# user2 = create_user is_admin: true | ||
# user2_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{user2.id}" | ||
# data2 = data1.merge({ item: random_string, annotator: user2_url}) | ||
# row_with_valid_annotator = add_data_on_spreadsheet(data2) | ||
|
||
# result = @team.import_spreadsheet(@@spreadsheet_id, @@worksheet.title, @user.id) | ||
# pm1 = Media.find_by_quote(data1[:item]).project_medias.first | ||
# assert pm1.comments.empty? | ||
# assert_match(I18n.t("team_import.invalid_annotator", { user: invalid_annotator }), result[row_with_invalid_annotator].join(', ')) | ||
|
||
# pm2 = Media.find_by_quote(data2[:item]).project_medias.first | ||
# assert_equal ['A note'], pm2.comments.map(&:text) | ||
# assert_no_match(I18n.t("team_import.invalid_annotator", { user: invalid_annotator }), result[row_with_valid_annotator].join(', ')) | ||
# end | ||
|
||
# test "should add user as annotator if annotator is blank" do | ||
# user_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{@user.id}" | ||
# data = { item: random_string, user: user_url, projects: @p.url, note1: 'A note' } | ||
# spreadsheet_id = "1lyxWWe9rRJPZejkCpIqVrK54WUV2UJl9sR75W5_Z9jo" | ||
# row = add_data_on_spreadsheet(data) | ||
|
||
# result = @team.import_spreadsheet(@@spreadsheet_id, @@worksheet.title, @user.id) | ||
# pm = Media.find_by_quote(data[:item]).project_medias.first | ||
# assert_equal [@user.id], pm.comments.map(&:annotator_id) | ||
# assert_no_match(I18n.t("team_import.invalid_annotator"), result[row].join(', ')) | ||
# end | ||
|
||
# test "should add annotator with user email or team owner" do | ||
# user2 = create_user | ||
# create_team_user team: @team, user: user2 | ||
# user_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{@user.id}" | ||
# data1 = { item: random_string, user: user_url, projects: @p.url, annotator: user2.email, note1: 'A note' } | ||
# spreadsheet_id = "1lyxWWe9rRJPZejkCpIqVrK54WUV2UJl9sR75W5_Z9jo" | ||
# row_with_email_annotator = add_data_on_spreadsheet(data1) | ||
|
||
# team_owner = create_user | ||
# create_team_user team: @team, user: team_owner, role: 'admin' | ||
# data2 = data1.merge({ item: random_string, annotator: '[email protected]', note1: 'Other note'}) | ||
# row_with_invalid_email_annotator = add_data_on_spreadsheet(data2) | ||
|
||
# result = @team.import_spreadsheet(@@spreadsheet_id, @@worksheet.title, @user.id) | ||
|
||
# pm1 = Media.find_by_quote(data1[:item]).project_medias.first | ||
# assert_equal ['A note'], pm1.comments.map(&:text) | ||
# assert_equal [user2.id], pm1.comments.map(&:annotator_id) | ||
|
||
# pm2 = Media.find_by_quote(data2[:item]).project_medias.first | ||
# assert_equal ['Other note'], pm2.comments.map(&:text) | ||
# assert_equal [team_owner.id], pm2.comments.map(&:annotator_id) | ||
# end | ||
|
||
# test "should not assign if user on assigned to is not valid" do | ||
# user_url = "#{CheckConfig.get('checkdesk_client')}/check/user/#{@user.id}" | ||
# invalid_assignee = 'Some assignee that is invalid' | ||
|