spec: add modules to selenium helper files
Test Plan: - Pass Jenkins Change-Id: I4cff1ce650f1b4ef2eb8b515f641c8fcaa0dacd1 Reviewed-on: https://gerrit.instructure.com/67174 Tested-by: Jenkins Reviewed-by: Pedro Fajardo <pfajardo@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> Reviewed-by: Robert Lamb <rlamb@instructure.com> Product-Review: Robert Lamb <rlamb@instructure.com> QA-Review: Robert Lamb <rlamb@instructure.com>
This commit is contained in:
parent
85c1a75c8b
commit
2e4a5a798e
|
@ -5,11 +5,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/outcome_common')
|
||||||
|
|
||||||
describe "account admin outcomes" do
|
describe "account admin outcomes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
let(:outcome_url) { "/accounts/#{Account.default.id}/outcomes" }
|
let(:outcome_url) { "/accounts/#{Account.default.id}/outcomes" }
|
||||||
let(:who_to_login) { 'admin' }
|
let(:who_to_login) { 'admin' }
|
||||||
let(:account) { Account.default }
|
let(:account) { Account.default }
|
||||||
describe "course outcomes" do
|
describe "course outcomes" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
RoleOverride.create!(:context => account, :permission => 'manage_courses',
|
RoleOverride.create!(:context => account, :permission => 'manage_courses',
|
||||||
:role => admin_role, :enabled => false) # should not manage_courses permission
|
:role => admin_role, :enabled => false) # should not manage_courses permission
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
|
|
|
@ -3,11 +3,12 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/grading_schemes_c
|
||||||
|
|
||||||
describe "account admin grading schemes" do
|
describe "account admin grading schemes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GradingSchemesCommon
|
||||||
|
|
||||||
let(:account) { Account.default }
|
let(:account) { Account.default }
|
||||||
let(:url) { "/accounts/#{Account.default.id}/grading_standards" }
|
let(:url) { "/accounts/#{Account.default.id}/grading_standards" }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
get url
|
get url
|
||||||
end
|
end
|
||||||
|
@ -31,7 +32,7 @@ describe "account admin grading schemes" do
|
||||||
|
|
||||||
describe "grading scheme items" do
|
describe "grading scheme items" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
create_simple_standard_and_edit(account, url)
|
create_simple_standard_and_edit(account, url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ end
|
||||||
|
|
||||||
describe "course grading schemes as account admin" do
|
describe "course grading schemes as account admin" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GradingSchemesCommon
|
||||||
|
|
||||||
before(:once) do
|
before(:once) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
|
|
|
@ -3,6 +3,7 @@ require 'thread'
|
||||||
|
|
||||||
describe "account admin manage groups" do
|
describe "account admin manage groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include ManageGroupsCommon
|
||||||
|
|
||||||
def add_account_category (account, name)
|
def add_account_category (account, name)
|
||||||
f(".add_category_link").click
|
f(".add_category_link").click
|
||||||
|
@ -15,7 +16,7 @@ describe "account admin manage groups" do
|
||||||
category
|
category
|
||||||
end
|
end
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
skip
|
skip
|
||||||
#course_with_admin_logged_in
|
#course_with_admin_logged_in
|
||||||
#@admin_account = Account.default
|
#@admin_account = Account.default
|
||||||
|
@ -45,7 +46,7 @@ describe "account admin manage groups" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "single category" do
|
context "single category" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
@courses_group_category = @admin_account.group_categories.create(:name => "Existing Category")
|
@courses_group_category = @admin_account.group_categories.create(:name => "Existing Category")
|
||||||
groups_student_enrollment 1
|
groups_student_enrollment 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,12 +3,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/rubrics_common')
|
||||||
|
|
||||||
describe "account shared rubric specs" do
|
describe "account shared rubric specs" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include RubricsCommon
|
||||||
|
|
||||||
let(:rubric_url) { "/accounts/#{Account.default.id}/rubrics" }
|
let(:rubric_url) { "/accounts/#{Account.default.id}/rubrics" }
|
||||||
let(:who_to_login) { 'admin' }
|
let(:who_to_login) { 'admin' }
|
||||||
let(:account) { Account.default }
|
let(:account) { Account.default }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
resize_screen_to_normal
|
resize_screen_to_normal
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
end
|
end
|
||||||
|
@ -24,7 +25,6 @@ describe "account shared rubric specs" do
|
||||||
should_allow_fractional_points
|
should_allow_fractional_points
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
it "should round to 2 decimal places" do
|
it "should round to 2 decimal places" do
|
||||||
should_round_to_2_decimal_places
|
should_round_to_2_decimal_places
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,8 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/outcome_common')
|
||||||
|
|
||||||
describe "account admin outcomes" do
|
describe "account admin outcomes" do
|
||||||
include_examples "in-process server selenium tests"
|
include_examples "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
let(:outcome_url) { "/accounts/#{Account.default.id}/outcomes" }
|
let(:outcome_url) { "/accounts/#{Account.default.id}/outcomes" }
|
||||||
let(:who_to_login) { 'admin' }
|
let(:who_to_login) { 'admin' }
|
||||||
let(:account) { Account.default }
|
let(:account) { Account.default }
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../helpers/shared_user_methods')
|
require File.expand_path(File.dirname(__FILE__) + '/../helpers/users_common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../helpers/basic/users_specs')
|
require File.expand_path(File.dirname(__FILE__) + '/../helpers/basic/users_specs')
|
||||||
|
|
||||||
describe "admin courses tab" do
|
describe "admin courses tab" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include UsersCommon
|
||||||
|
|
||||||
context "add user basic" do
|
context "add user basic" do
|
||||||
describe "shared users specs" do
|
describe "shared users specs" do
|
||||||
|
@ -16,7 +17,7 @@ describe "admin courses tab" do
|
||||||
|
|
||||||
context "add users" do
|
context "add users" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
get "/accounts/#{Account.default.id}/users"
|
get "/accounts/#{Account.default.id}/users"
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,11 +3,12 @@ require File.expand_path(File.dirname(__FILE__) + '/../../helpers/grading_scheme
|
||||||
|
|
||||||
describe "sub account grading schemes" do
|
describe "sub account grading schemes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GradingSchemesCommon
|
||||||
|
|
||||||
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
||||||
let(:url) { "/accounts/#{account.id}/grading_standards" }
|
let(:url) { "/accounts/#{account.id}/grading_standards" }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
get url
|
get url
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,13 +3,14 @@ require File.expand_path(File.dirname(__FILE__) + '/../../helpers/outcome_common
|
||||||
|
|
||||||
describe "sub account outcomes" do
|
describe "sub account outcomes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
describe "account outcome specs" do
|
describe "account outcome specs" do
|
||||||
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
||||||
let(:outcome_url) { "/accounts/#{account.id}/outcomes" }
|
let(:outcome_url) { "/accounts/#{account.id}/outcomes" }
|
||||||
let(:who_to_login) { 'admin' }
|
let(:who_to_login) { 'admin' }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../../helpers/rubrics_common
|
||||||
|
|
||||||
describe "sub account shared rubric specs" do
|
describe "sub account shared rubric specs" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include RubricsCommon
|
||||||
|
|
||||||
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
let(:account) { Account.create(:name => 'sub account from default account', :parent_account => Account.default) }
|
||||||
let(:rubric_url) { "/accounts/#{account.id}/rubrics" }
|
let(:rubric_url) { "/accounts/#{account.id}/rubrics" }
|
||||||
let(:who_to_login) { 'admin' }
|
let(:who_to_login) { 'admin' }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
resize_screen_to_normal
|
resize_screen_to_normal
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,6 +6,7 @@ describe "discussion assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DiscussionsCommon
|
include DiscussionsCommon
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@domain_root_account = Account.default
|
@domain_root_account = Account.default
|
||||||
|
|
|
@ -3,6 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
describe "assignments" do
|
describe "assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
def point_validation
|
def point_validation
|
||||||
assignment_name = 'first test assignment'
|
assignment_name = 'first test assignment'
|
||||||
|
|
|
@ -3,12 +3,13 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
describe "assignment groups" do
|
describe "assignment groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
def get_assignment_groups
|
def get_assignment_groups
|
||||||
ff('.assignment_group')
|
ff('.assignment_group')
|
||||||
end
|
end
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
@domain_root_account = Account.default
|
@domain_root_account = Account.default
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
@course.require_assignment_group
|
@course.require_assignment_group
|
||||||
|
|
|
@ -8,6 +8,8 @@ describe 'assignments' do
|
||||||
include_context 'in-process server selenium tests'
|
include_context 'in-process server selenium tests'
|
||||||
include QuizzesCommon
|
include QuizzesCommon
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
include SubmissionsCommon
|
||||||
|
|
||||||
before do
|
before do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
|
|
|
@ -2,9 +2,9 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
describe "quizzes assignments" do
|
describe "quizzes assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
|
before(:each) do
|
||||||
before (:each) do
|
|
||||||
@domain_root_account = Account.default
|
@domain_root_account = Account.default
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/rubrics_common')
|
||||||
|
|
||||||
describe "assignment rubrics" do
|
describe "assignment rubrics" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include RubricsCommon
|
||||||
|
|
||||||
context "assignment rubrics as a teacher" do
|
context "assignment rubrics as a teacher" do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/common')
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/helpers/public_courses_context')
|
require File.expand_path(File.dirname(__FILE__) + '/helpers/public_courses_context')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/helpers/files_common')
|
require File.expand_path(File.dirname(__FILE__) + '/helpers/files_common')
|
||||||
|
@ -6,6 +6,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/files_common')
|
||||||
describe "assignments" do
|
describe "assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
# note: due date testing can be found in assignments_overrides_spec
|
# note: due date testing can be found in assignments_overrides_spec
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
describe "assignments" do
|
describe "assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "as observer" do
|
context "as observer" do
|
||||||
before :each do
|
before(:each) do
|
||||||
@course = course(:active_all => true)
|
@course = course(:active_all => true)
|
||||||
@student = user(:active_all => true, :active_state => 'active')
|
@student = user(:active_all => true, :active_state => 'active')
|
||||||
@observer = user(:active_all => true, :active_state => 'active')
|
@observer = user(:active_all => true, :active_state => 'active')
|
||||||
|
@ -18,7 +19,7 @@ describe "assignments" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when not linked to student" do
|
context "when not linked to student" do
|
||||||
before :each do
|
before(:each) do
|
||||||
@course.enroll_user(@observer, 'ObserverEnrollment', :section => @section2, :enrollment_state => 'active')
|
@course.enroll_user(@observer, 'ObserverEnrollment', :section => @section2, :enrollment_state => 'active')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ describe "assignments" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when linked to student" do
|
context "when linked to student" do
|
||||||
before :each do
|
before(:each) do
|
||||||
@student_enrollment = @course.enroll_user(@student, 'StudentEnrollment', :enrollment_state => 'active', :section => @section2)
|
@student_enrollment = @course.enroll_user(@student, 'StudentEnrollment', :enrollment_state => 'active', :section => @section2)
|
||||||
@observer_enrollment = @course.enroll_user(@observer, 'ObserverEnrollment', :enrollment_state => 'active', :section => @section2)
|
@observer_enrollment = @course.enroll_user(@observer, 'ObserverEnrollment', :enrollment_state => 'active', :section => @section2)
|
||||||
@observer_enrollment.update_attribute(:associated_user_id, @student.id)
|
@observer_enrollment.update_attribute(:associated_user_id, @student.id)
|
||||||
|
@ -59,7 +60,7 @@ describe "assignments" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "overridden lock_at" do
|
context "overridden lock_at" do
|
||||||
before :each do
|
before(:each) do
|
||||||
setup_sections_and_overrides_all_future
|
setup_sections_and_overrides_all_future
|
||||||
@course.enroll_user(@student, 'StudentEnrollment', :section => @section2, :enrollment_state => 'active')
|
@course.enroll_user(@student, 'StudentEnrollment', :section => @section2, :enrollment_state => 'active')
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/google_drive_common'
|
||||||
describe "assignments" do
|
describe "assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include GoogleDriveCommon
|
include GoogleDriveCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "as a student" do
|
context "as a student" do
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
describe 'submissions' do
|
describe 'submissions' do
|
||||||
include_context 'in-process server selenium tests'
|
include_context 'in-process server selenium tests'
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context 'create assignment as a teacher' do
|
context 'create assignment as a teacher' do
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -7,6 +7,7 @@ describe "submissions" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include SubmissionsCommon
|
||||||
|
|
||||||
context 'as a student' do
|
context 'as a student' do
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/common')
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
|
|
||||||
describe 'submissions' do
|
describe 'submissions' do
|
||||||
include_context 'in-process server selenium tests'
|
include_context 'in-process server selenium tests'
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
before do
|
before do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/submissions_common')
|
||||||
describe "submissions" do
|
describe "submissions" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include SubmissionsCommon
|
||||||
|
|
||||||
context 'as a teacher' do
|
context 'as a teacher' do
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/scheduler_common'
|
||||||
describe "scheduler" do
|
describe "scheduler" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Calendar2Common
|
include Calendar2Common
|
||||||
|
include SchedulerCommon
|
||||||
|
|
||||||
context "as a student" do
|
context "as a student" do
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/scheduler_common'
|
||||||
describe "scheduler" do
|
describe "scheduler" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Calendar2Common
|
include Calendar2Common
|
||||||
|
include SchedulerCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/scheduler_common'
|
||||||
describe "scheduler" do
|
describe "scheduler" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Calendar2Common
|
include Calendar2Common
|
||||||
|
include SchedulerCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/differentiated_as
|
||||||
describe "interaction with differentiated assignments" do
|
describe "interaction with differentiated assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DifferentiatedAssignments
|
include DifferentiatedAssignments
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "Student" do
|
context "Student" do
|
||||||
before :each do
|
before :each do
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/differentiated_as
|
||||||
describe "interaction with differentiated assignments on the dashboard and calendar" do
|
describe "interaction with differentiated assignments on the dashboard and calendar" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DifferentiatedAssignments
|
include DifferentiatedAssignments
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "Student" do
|
context "Student" do
|
||||||
before :each do
|
before :each do
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/differentiated_as
|
||||||
describe "interaction with differentiated discussions" do
|
describe "interaction with differentiated discussions" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DifferentiatedAssignments
|
include DifferentiatedAssignments
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "Student" do
|
context "Student" do
|
||||||
before :each do
|
before :each do
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/differentiated_as
|
||||||
describe "interaction with differentiated assignments/quizzes/discusssions in modules" do
|
describe "interaction with differentiated assignments/quizzes/discusssions in modules" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DifferentiatedAssignments
|
include DifferentiatedAssignments
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
def expect_module_to_have_items(module_item)
|
def expect_module_to_have_items(module_item)
|
||||||
expect(f("#context_module_#{module_item.id}")).to include_text(@da_assignment.title)
|
expect(f("#context_module_#{module_item.id}")).to include_text(@da_assignment.title)
|
||||||
|
|
|
@ -4,9 +4,10 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/differentiated_as
|
||||||
describe "interaction with differentiated quizzes" do
|
describe "interaction with differentiated quizzes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DifferentiatedAssignments
|
include DifferentiatedAssignments
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
context "Student" do
|
context "Student" do
|
||||||
before :each do
|
before(:each) do
|
||||||
course_with_student_logged_in
|
course_with_student_logged_in
|
||||||
da_setup
|
da_setup
|
||||||
@da_quiz = create_da_quiz
|
@da_quiz = create_da_quiz
|
||||||
|
@ -97,7 +98,7 @@ describe "interaction with differentiated quizzes" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
context "Observer with student" do
|
context "Observer with student" do
|
||||||
before :each do
|
before(:each) do
|
||||||
observer_setup
|
observer_setup
|
||||||
da_setup
|
da_setup
|
||||||
@da_quiz = create_da_quiz
|
@da_quiz = create_da_quiz
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/discussions_common')
|
||||||
describe "discussion assignments" do
|
describe "discussion assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include DiscussionsCommon
|
include DiscussionsCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
before :once do
|
before :once do
|
||||||
course_with_teacher(:active_all => true)
|
course_with_teacher(:active_all => true)
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../helpers/discussions_commo
|
||||||
describe "discussion availability" do
|
describe "discussion availability" do
|
||||||
include_examples "in-process server selenium tests"
|
include_examples "in-process server selenium tests"
|
||||||
include DiscussionsCommon
|
include DiscussionsCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
before :each do
|
before :each do
|
||||||
course_with_teacher_logged_in.course
|
course_with_teacher_logged_in.course
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/groups_common')
|
||||||
describe 'Excuse an Assignment' do
|
describe 'Excuse an Assignment' do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
before do |example|
|
before do |example|
|
||||||
unless example.metadata[:group]
|
unless example.metadata[:group]
|
||||||
|
|
|
@ -4,6 +4,7 @@ require_relative '../../helpers/groups_common'
|
||||||
describe "gradebook2" do
|
describe "gradebook2" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
describe "multiple grading periods" do
|
describe "multiple grading periods" do
|
||||||
let!(:enable_mgp) do
|
let!(:enable_mgp) do
|
||||||
|
|
|
@ -3,6 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/grading_schemes_comm
|
||||||
|
|
||||||
describe "grading standards" do
|
describe "grading standards" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GradingSchemesCommon
|
||||||
|
|
||||||
context "without Multiple Grading Periods" do
|
context "without Multiple Grading Periods" do
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ describe "groups" do
|
||||||
include CourseCommon
|
include CourseCommon
|
||||||
include DiscussionsCommon
|
include DiscussionsCommon
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include GroupsCommon
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
setup_group_page_urls
|
setup_group_page_urls
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ describe "groups" do
|
||||||
include CourseCommon
|
include CourseCommon
|
||||||
include DiscussionsCommon
|
include DiscussionsCommon
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include GroupsCommon
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
setup_group_page_urls
|
setup_group_page_urls
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/groups_common')
|
||||||
|
|
||||||
describe "student groups" do
|
describe "student groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
let(:group_name){ 'Windfury' }
|
let(:group_name){ 'Windfury' }
|
||||||
let(:group_category_name){ 'cat1' }
|
let(:group_category_name){ 'cat1' }
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/groups_common')
|
||||||
|
|
||||||
describe "student groups" do
|
describe "student groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
let(:group_name){ 'Windfury' }
|
let(:group_name){ 'Windfury' }
|
||||||
let(:group_category_name){ 'cat1' }
|
let(:group_category_name){ 'cat1' }
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/groups_common')
|
||||||
|
|
||||||
describe "new groups" do
|
describe "new groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/groups_common')
|
require File.expand_path(File.dirname(__FILE__) + '/groups_common')
|
||||||
|
|
||||||
def build_assignment_with_type(type, opts={})
|
module AssignmentsCommon
|
||||||
|
include GroupsCommon
|
||||||
|
|
||||||
|
def build_assignment_with_type(type, opts={})
|
||||||
if opts[:assignment_group_id]
|
if opts[:assignment_group_id]
|
||||||
assignment_group_id = opts[:assignment_group_id]
|
assignment_group_id = opts[:assignment_group_id]
|
||||||
else
|
else
|
||||||
|
@ -32,9 +35,9 @@ def build_assignment_with_type(type, opts={})
|
||||||
fj('.more_options:visible').click
|
fj('.more_options:visible').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_assignment(assignment_id, opts={})
|
def edit_assignment(assignment_id, opts={})
|
||||||
f("#assignment_#{assignment_id} .al-trigger").click
|
f("#assignment_#{assignment_id} .al-trigger").click
|
||||||
f("#assignment_#{assignment_id} .edit_assignment").click
|
f("#assignment_#{assignment_id} .edit_assignment").click
|
||||||
|
|
||||||
|
@ -58,72 +61,72 @@ def edit_assignment(assignment_id, opts={})
|
||||||
fj('.more_options:visible').click
|
fj('.more_options:visible').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_assignment_group(assignment_group_id)
|
def edit_assignment_group(assignment_group_id)
|
||||||
f("#assignment_group_#{assignment_group_id} .al-trigger").click
|
f("#assignment_group_#{assignment_group_id} .al-trigger").click
|
||||||
f("#assignment_group_#{assignment_group_id} .edit_group").click
|
f("#assignment_group_#{assignment_group_id} .edit_group").click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_assignment_group(assignment_group_id, opts={})
|
def delete_assignment_group(assignment_group_id, opts={})
|
||||||
f("#assignment_group_#{assignment_group_id} .al-trigger").click
|
f("#assignment_group_#{assignment_group_id} .al-trigger").click
|
||||||
f("#assignment_group_#{assignment_group_id} .delete_group").click
|
f("#assignment_group_#{assignment_group_id} .delete_group").click
|
||||||
unless opts[:no_accept]
|
unless opts[:no_accept]
|
||||||
accept_alert
|
accept_alert
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def submit_assignment_form
|
def submit_assignment_form
|
||||||
expect_new_page_load { f('.btn-primary[type=submit]').click }
|
expect_new_page_load { f('.btn-primary[type=submit]').click }
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def stub_freezer_plugin(frozen_atts = nil)
|
def stub_freezer_plugin(frozen_atts = nil)
|
||||||
frozen_atts ||= {
|
frozen_atts ||= {
|
||||||
"assignment_group_id" => "true"
|
"assignment_group_id" => "true"
|
||||||
}
|
}
|
||||||
PluginSetting.stubs(:settings_for_plugin).returns(frozen_atts)
|
PluginSetting.stubs(:settings_for_plugin).returns(frozen_atts)
|
||||||
end
|
end
|
||||||
|
|
||||||
def frozen_assignment(group)
|
def frozen_assignment(group)
|
||||||
group ||= @course.assignment_groups.first
|
group ||= @course.assignment_groups.first
|
||||||
assign = @course.assignments.create!(
|
assign = @course.assignments.create!(
|
||||||
:name => "frozen",
|
:name => "frozen",
|
||||||
:due_at => Time.now.utc + 2.days,
|
:due_at => Time.zone.now.utc + 2.days,
|
||||||
:assignment_group => group,
|
:assignment_group => group,
|
||||||
:freeze_on_copy => true
|
:freeze_on_copy => true
|
||||||
)
|
)
|
||||||
assign.copied = true
|
assign.copied = true
|
||||||
assign.save!
|
assign.save!
|
||||||
assign
|
assign
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_assignment_edit(assignment)
|
def run_assignment_edit(assignment)
|
||||||
get "/courses/#{@course.id}/assignments/#{assignment.id}/edit"
|
get "/courses/#{@course.id}/assignments/#{assignment.id}/edit"
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
submit_assignment_form
|
submit_assignment_form
|
||||||
end
|
end
|
||||||
|
|
||||||
def manually_create_assignment(assignment_title = 'new assignment')
|
def manually_create_assignment(assignment_title = 'new assignment')
|
||||||
get "/courses/#{@course.id}/assignments"
|
get "/courses/#{@course.id}/assignments"
|
||||||
expect_new_page_load { f('.new_assignment').click }
|
expect_new_page_load { f('.new_assignment').click }
|
||||||
replace_content(f('#assignment_name'), assignment_title)
|
replace_content(f('#assignment_name'), assignment_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_away_accept_alert
|
def click_away_accept_alert
|
||||||
f('#section-tabs .home').click
|
f('#section-tabs .home').click
|
||||||
driver.switch_to.alert.accept
|
driver.switch_to.alert.accept
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_sections_and_overrides_all_future
|
def setup_sections_and_overrides_all_future
|
||||||
# All in the future by default
|
# All in the future by default
|
||||||
@unlock_at = Time.now.utc + 6.days
|
@unlock_at = Time.zone.now.utc + 6.days
|
||||||
@due_at = Time.now.utc + 10.days
|
@due_at = Time.zone.now.utc + 10.days
|
||||||
@lock_at = Time.now.utc + 11.days
|
@lock_at = Time.zone.now.utc + 11.days
|
||||||
|
|
||||||
@assignment.due_at = @due_at
|
@assignment.due_at = @due_at
|
||||||
@assignment.unlock_at = @unlock_at
|
@assignment.unlock_at = @unlock_at
|
||||||
|
@ -134,20 +137,29 @@ def setup_sections_and_overrides_all_future
|
||||||
@section2 = @course.course_sections.create!(:name => 'Section B')
|
@section2 = @course.course_sections.create!(:name => 'Section B')
|
||||||
@course.student_enrollments.scoped.delete_all # get rid of existing student enrollments, mess up section enrollment
|
@course.student_enrollments.scoped.delete_all # get rid of existing student enrollments, mess up section enrollment
|
||||||
# Overridden lock dates for 2nd section - different dates, but still in future
|
# Overridden lock dates for 2nd section - different dates, but still in future
|
||||||
@override = assignment_override_model(:assignment => @assignment, :set => @section2,
|
@override = assignment_override_model(
|
||||||
|
:assignment => @assignment,
|
||||||
|
:set => @section2,
|
||||||
:lock_at => @lock_at + 12.days,
|
:lock_at => @lock_at + 12.days,
|
||||||
:unlock_at => Time.now.utc + 3.days)
|
:unlock_at => Time.zone.now.utc + 3.days
|
||||||
end
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def create_assignment_for_group(submission_type, grade_group_students_individually = false)
|
def create_assignment_for_group(submission_type, grade_group_students_individually = false)
|
||||||
group_test_setup(2,1,2)
|
group_test_setup(2,1,2)
|
||||||
add_user_to_group(@students.first,@testgroup[0])
|
add_user_to_group(@students.first,@testgroup[0])
|
||||||
@assignment = @course.assignments.create!(title: 'assignment 1', name: 'assignment 1', due_at: Time.now.utc + 2.days,
|
@assignment = @course.assignments.create!(
|
||||||
points_possible: 50, submission_types: submission_type, group_category:@group_category[0],
|
title: 'assignment 1',
|
||||||
grade_group_students_individually: grade_group_students_individually)
|
name: 'assignment 1',
|
||||||
end
|
due_at: Time.zone.now.utc + 2.days,
|
||||||
|
points_possible: 50,
|
||||||
|
submission_types: submission_type,
|
||||||
|
group_category: @group_category[0],
|
||||||
|
grade_group_students_individually: grade_group_students_individually
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def create_assignment_with_group_category
|
def create_assignment_with_group_category
|
||||||
get "/courses/#{@course.id}/assignments/new"
|
get "/courses/#{@course.id}/assignments/new"
|
||||||
|
|
||||||
f('#assignment_name').send_keys('my title')
|
f('#assignment_name').send_keys('my title')
|
||||||
|
@ -158,9 +170,9 @@ def create_assignment_with_group_category
|
||||||
f('#assignment_group_category_id').click
|
f('#assignment_group_category_id').click
|
||||||
f('#assignment_group_category_id').send_keys :arrow_up
|
f('#assignment_group_category_id').send_keys :arrow_up
|
||||||
f('#assignment_group_category_id').send_keys :return
|
f('#assignment_group_category_id').send_keys :return
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_file_list
|
def create_file_list
|
||||||
{
|
{
|
||||||
name: '/',
|
name: '/',
|
||||||
folders: [
|
folders: [
|
||||||
|
@ -179,9 +191,9 @@ def create_file_list
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_post_grades_tool(opts = {})
|
def create_post_grades_tool(opts = {})
|
||||||
post_grades_tool = @course.context_external_tools.create!(
|
post_grades_tool = @course.context_external_tools.create!(
|
||||||
name: opts[:name] || 'test tool',
|
name: opts[:name] || 'test tool',
|
||||||
domain: 'example.com',
|
domain: 'example.com',
|
||||||
|
@ -196,16 +208,17 @@ def create_post_grades_tool(opts = {})
|
||||||
)
|
)
|
||||||
post_grades_tool.context_external_tool_placements.create!(placement_type: 'post_grades')
|
post_grades_tool.context_external_tool_placements.create!(placement_type: 'post_grades')
|
||||||
post_grades_tool
|
post_grades_tool
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_cog_to_edit
|
def click_cog_to_edit
|
||||||
ffj('.al-trigger')[1].click
|
ffj('.al-trigger')[1].click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
fj('.edit_assignment').click
|
fj('.edit_assignment').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_assignment_with_type(type, title = 'My Title')
|
def create_assignment_with_type(type, title = 'My Title')
|
||||||
@assignment = @course.assignments.create!(title: title, grading_type: type, points_possible: 20)
|
@assignment = @course.assignments.create!(title: title, grading_type: type, points_possible: 20)
|
||||||
@assignment
|
@assignment
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,7 +1,8 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../..//helpers/shared_user_methods')
|
require File.expand_path(File.dirname(__FILE__) + '/../..//helpers/users_common')
|
||||||
|
|
||||||
shared_examples_for "users basic tests" do
|
shared_examples_for "users basic tests" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include UsersCommon
|
||||||
|
|
||||||
it "should add a new user" do
|
it "should add a new user" do
|
||||||
skip('newly added user in sub account does not show up') if account != Account.default
|
skip('newly added user in sub account does not show up') if account != Account.default
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
def save_and_reload_changes(grading_standard)
|
module GradingSchemesCommon
|
||||||
|
def save_and_reload_changes(grading_standard)
|
||||||
f('.save_button').click
|
f('.save_button').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
grading_standard.reload
|
grading_standard.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
def simple_grading_standard(context)
|
def simple_grading_standard(context)
|
||||||
@standard = context.grading_standards.create!(
|
@standard = context.grading_standards.create!(
|
||||||
:title => "My Grading Standard",
|
:title => "My Grading Standard",
|
||||||
:standard_data => {
|
:standard_data => {
|
||||||
|
@ -12,9 +13,9 @@ def simple_grading_standard(context)
|
||||||
"scheme_1" => {:name => "B", :value => "80"},
|
"scheme_1" => {:name => "B", :value => "80"},
|
||||||
"scheme_2" => {:name => "C", :value => "70"}
|
"scheme_2" => {:name => "C", :value => "70"}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_add_a_grading_scheme(options = {name: "new grading standard"})
|
def should_add_a_grading_scheme(options = {name: "new grading standard"})
|
||||||
new_standard_name = options[:name]
|
new_standard_name = options[:name]
|
||||||
f('.add_standard_link').click
|
f('.add_standard_link').click
|
||||||
expect(f('.add_standard_link')).to have_class('disabled')
|
expect(f('.add_standard_link')).to have_class('disabled')
|
||||||
|
@ -24,9 +25,9 @@ def should_add_a_grading_scheme(options = {name: "new grading standard"})
|
||||||
@new_grading_standard = GradingStandard.last
|
@new_grading_standard = GradingStandard.last
|
||||||
expect(@new_grading_standard.title).to eq new_standard_name
|
expect(@new_grading_standard.title).to eq new_standard_name
|
||||||
expect(f("#grading_standard_#{@new_grading_standard.id}")).to be_displayed
|
expect(f("#grading_standard_#{@new_grading_standard.id}")).to be_displayed
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_edit_a_grading_scheme(context, url)
|
def should_edit_a_grading_scheme(context, url)
|
||||||
edit_name = 'edited grading scheme'
|
edit_name = 'edited grading scheme'
|
||||||
simple_grading_standard(context)
|
simple_grading_standard(context)
|
||||||
grading_standard = GradingStandard.last
|
grading_standard = GradingStandard.last
|
||||||
|
@ -35,26 +36,26 @@ def should_edit_a_grading_scheme(context, url)
|
||||||
replace_content(f('.scheme_name'), edit_name)
|
replace_content(f('.scheme_name'), edit_name)
|
||||||
save_and_reload_changes(grading_standard)
|
save_and_reload_changes(grading_standard)
|
||||||
expect(grading_standard.title).to eq edit_name
|
expect(grading_standard.title).to eq edit_name
|
||||||
expect(fj(".title span:eq(1)").text).to eq edit_name #fj to avoid selenium caching
|
expect(fj(".title span:eq(1)").text).to eq edit_name # fj to avoid selenium caching
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_delete_a_grading_scheme(context, url)
|
def should_delete_a_grading_scheme(context, url)
|
||||||
simple_grading_standard(context)
|
simple_grading_standard(context)
|
||||||
get url
|
get url
|
||||||
f('.delete_grading_standard_link').click
|
f('.delete_grading_standard_link').click
|
||||||
driver.switch_to.alert.accept
|
driver.switch_to.alert.accept
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(GradingStandard.last.workflow_state).to eq 'deleted'
|
expect(GradingStandard.last.workflow_state).to eq 'deleted'
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_simple_standard_and_edit(context, url)
|
def create_simple_standard_and_edit(context, url)
|
||||||
simple_grading_standard(context)
|
simple_grading_standard(context)
|
||||||
@grading_standard = GradingStandard.last
|
@grading_standard = GradingStandard.last
|
||||||
get url
|
get url
|
||||||
f('.edit_grading_standard_link').click
|
f('.edit_grading_standard_link').click
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_add_a_grading_scheme_item
|
def should_add_a_grading_scheme_item
|
||||||
data_count = @grading_standard.data.count
|
data_count = @grading_standard.data.count
|
||||||
grading_standard_row = f('.grading_standard_row')
|
grading_standard_row = f('.grading_standard_row')
|
||||||
driver.action.move_to(grading_standard_row).perform
|
driver.action.move_to(grading_standard_row).perform
|
||||||
|
@ -65,28 +66,28 @@ def should_add_a_grading_scheme_item
|
||||||
expect(@grading_standard.data.count).to eq data_count + 1
|
expect(@grading_standard.data.count).to eq data_count + 1
|
||||||
expect(@grading_standard.data[1][0]).to eq 'Z'
|
expect(@grading_standard.data[1][0]).to eq 'Z'
|
||||||
# TODO: check for change in upper limit of next row item
|
# TODO: check for change in upper limit of next row item
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def grading_standard_rows
|
def grading_standard_rows
|
||||||
ff('.grading_standard_row')
|
ff('.grading_standard_row')
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_edit_a_grading_scheme_item
|
def should_edit_a_grading_scheme_item
|
||||||
replace_content(grading_standard_rows[0].find_element(:css, '.standard_name'), 'F')
|
replace_content(grading_standard_rows[0].find_element(:css, '.standard_name'), 'F')
|
||||||
save_and_reload_changes(@grading_standard)
|
save_and_reload_changes(@grading_standard)
|
||||||
expect(@grading_standard.data[0][0]).to eq 'F'
|
expect(@grading_standard.data[0][0]).to eq 'F'
|
||||||
# TODO: check that changing lower limit changes upper limit of next row item
|
# TODO: check that changing lower limit changes upper limit of next row item
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_not_update_invalid_grading_scheme_input
|
def should_not_update_invalid_grading_scheme_input
|
||||||
replace_content(grading_standard_rows[1].find_element(:css, '.standard_value'), '90')
|
replace_content(grading_standard_rows[1].find_element(:css, '.standard_value'), '90')
|
||||||
save_and_reload_changes(@grading_standard)
|
save_and_reload_changes(@grading_standard)
|
||||||
expect(f("#invalid_standard_message_#{@grading_standard.id}")).to be_displayed
|
expect(f("#invalid_standard_message_#{@grading_standard.id}")).to be_displayed
|
||||||
expect(@grading_standard.data[1][1]).to eq 0.8
|
expect(@grading_standard.data[1][1]).to eq 0.8
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_delete_a_grading_scheme_item
|
def should_delete_a_grading_scheme_item
|
||||||
data_count = @grading_standard.data.count
|
data_count = @grading_standard.data.count
|
||||||
grading_standard_rows[0].find_element(:css, '.delete_row_link').click
|
grading_standard_rows[0].find_element(:css, '.delete_row_link').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
@ -94,9 +95,9 @@ def should_delete_a_grading_scheme_item
|
||||||
expect(@grading_standard.data.count).to eq data_count - 1
|
expect(@grading_standard.data.count).to eq data_count - 1
|
||||||
expect(@grading_standard.data[0][0]).to eq 'B'
|
expect(@grading_standard.data[0][0]).to eq 'B'
|
||||||
# TODO: check that changing upped limit of next row item changes to lower limit of line above
|
# TODO: check that changing upped limit of next row item changes to lower limit of line above
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_contain_a_tab_for_grading_schemes_and_periods(url)
|
def should_contain_a_tab_for_grading_schemes_and_periods(url)
|
||||||
@course.root_account.allow_feature!(:multiple_grading_periods)
|
@course.root_account.allow_feature!(:multiple_grading_periods)
|
||||||
@course.account.enable_feature!(:multiple_grading_periods)
|
@course.account.enable_feature!(:multiple_grading_periods)
|
||||||
get url
|
get url
|
||||||
|
@ -107,4 +108,5 @@ def should_contain_a_tab_for_grading_schemes_and_periods(url)
|
||||||
expect(f(".grading_standards_tab")).to be_displayed
|
expect(f(".grading_standards_tab")).to be_displayed
|
||||||
f(".grading_standards_tab").click
|
f(".grading_standards_tab").click
|
||||||
expect(f(".add_standard_link")).to be_displayed
|
expect(f(".add_standard_link")).to be_displayed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
|
def setup_group_page_urls
|
||||||
|
let(:url) {"/groups/#{@testgroup.first.id}"}
|
||||||
|
let(:announcements_page) {url + '/announcements'}
|
||||||
|
let(:people_page) {url + '/users'}
|
||||||
|
let(:discussions_page) {url + '/discussion_topics'}
|
||||||
|
let(:pages_page) {url + '/pages'}
|
||||||
|
let(:files_page) {url + '/files'}
|
||||||
|
let(:conferences_page) {url + '/conferences'}
|
||||||
|
end
|
||||||
|
|
||||||
# ======================================================================================================================
|
# ======================================================================================================================
|
||||||
# Shared Examples
|
# Shared Examples
|
||||||
# ======================================================================================================================
|
# ======================================================================================================================
|
||||||
|
@ -235,6 +245,7 @@ end
|
||||||
# ======================================================================================================================
|
# ======================================================================================================================
|
||||||
# Helper Methods
|
# Helper Methods
|
||||||
# ======================================================================================================================
|
# ======================================================================================================================
|
||||||
|
|
||||||
def pick_test_id(context, id1, id2)
|
def pick_test_id(context, id1, id2)
|
||||||
case context
|
case context
|
||||||
when 'student'
|
when 'student'
|
||||||
|
@ -257,16 +268,17 @@ def pick_priority(context, p1, p2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def seed_students(count)
|
module GroupsCommon
|
||||||
|
def seed_students(count)
|
||||||
@students = []
|
@students = []
|
||||||
count.times do |n|
|
count.times do |n|
|
||||||
@students << User.create!(:name => "Test Student #{n+1}")
|
@students << User.create!(:name => "Test Student #{n+1}")
|
||||||
@course.enroll_student(@students.last).accept!
|
@course.enroll_student(@students.last).accept!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Creates group sets equal to groupset_count and groups within each group set equal to groups_per_set
|
# Creates group sets equal to groupset_count and groups within each group set equal to groups_per_set
|
||||||
def seed_groups(groupset_count, groups_per_set)
|
def seed_groups(groupset_count, groups_per_set)
|
||||||
@group_category = []
|
@group_category = []
|
||||||
@testgroup = []
|
@testgroup = []
|
||||||
groupset_count.times do |n|
|
groupset_count.times do |n|
|
||||||
|
@ -276,46 +288,44 @@ def seed_groups(groupset_count, groups_per_set)
|
||||||
@testgroup << @course.groups.create!(:name => "Test Group #{i+1}", :group_category => @group_category[n])
|
@testgroup << @course.groups.create!(:name => "Test Group #{i+1}", :group_category => @group_category[n])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sets up groups and users for testing. Default is 1 user, 1 groupset, and 1 group per groupset.
|
# Sets up groups and users for testing. Default is 1 user, 1 groupset, and 1 group per groupset.
|
||||||
def group_test_setup(user_count = 1, groupset_count = 1, groups_per_set = 1)
|
def group_test_setup(user_count = 1, groupset_count = 1, groups_per_set = 1)
|
||||||
seed_students(user_count)
|
seed_students(user_count)
|
||||||
seed_groups(groupset_count, groups_per_set)
|
seed_groups(groupset_count, groups_per_set)
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_user_to_group(user,group,is_leader = false)
|
def add_user_to_group(user,group,is_leader = false)
|
||||||
group.add_user user
|
group.add_user user
|
||||||
group.leader = user if is_leader
|
group.leader = user if is_leader
|
||||||
group.save!
|
group.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
# Adds all given users to group, can use arrays or a single variable
|
# Adds all given users to group, can use arrays or a single variable
|
||||||
def add_users_to_group(students, group)
|
def add_users_to_group(students, group)
|
||||||
count = students.size
|
count = students.size
|
||||||
count.times do |n|
|
count.times do |n|
|
||||||
group.add_user students[n]
|
group.add_user students[n]
|
||||||
group.save!
|
group.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_default_student_group(group_name = "Windfury")
|
def create_default_student_group(group_name = "Windfury")
|
||||||
fj("#groupName").send_keys(group_name.to_s)
|
fj("#groupName").send_keys(group_name.to_s)
|
||||||
fj('button.confirm-dialog-confirm-btn').click
|
fj('button.confirm-dialog-confirm-btn').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_group_and_add_all_students(group_name = "Windfury")
|
def create_group_and_add_all_students(group_name = "Windfury")
|
||||||
fj("#groupName").send_keys(group_name.to_s)
|
fj("#groupName").send_keys(group_name.to_s)
|
||||||
students = ffj(".checkbox")
|
students = ffj(".checkbox")
|
||||||
students.each do |student|
|
students.each(&:click)
|
||||||
student.click
|
|
||||||
end
|
|
||||||
fj('button.confirm-dialog-confirm-btn').click
|
fj('button.confirm-dialog-confirm-btn').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_category(params={})
|
def create_category(params={})
|
||||||
default_params = {
|
default_params = {
|
||||||
category_name:'category1',
|
category_name:'category1',
|
||||||
has_max_membership:false,
|
has_max_membership:false,
|
||||||
|
@ -330,9 +340,9 @@ def create_category(params={})
|
||||||
end
|
end
|
||||||
|
|
||||||
category1
|
category1
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_group(params={})
|
def create_group(params={})
|
||||||
default_params = {
|
default_params = {
|
||||||
group_name:'Windfury',
|
group_name:'Windfury',
|
||||||
enroll_student_count:0,
|
enroll_student_count:0,
|
||||||
|
@ -349,8 +359,9 @@ def create_group(params={})
|
||||||
params[:group_category] = create_category(category_name:params[:category_name]) if params[:group_category].nil?
|
params[:group_category] = create_category(category_name:params[:category_name]) if params[:group_category].nil?
|
||||||
|
|
||||||
group = @course.groups.create!(
|
group = @course.groups.create!(
|
||||||
name:params[:group_name],
|
name: params[:group_name],
|
||||||
group_category:params[:group_category])
|
group_category: params[:group_category]
|
||||||
|
)
|
||||||
|
|
||||||
if params[:has_max_membership]
|
if params[:has_max_membership]
|
||||||
group.update_attribute(:max_membership,params[:member_limit])
|
group.update_attribute(:max_membership,params[:member_limit])
|
||||||
|
@ -361,9 +372,9 @@ def create_group(params={})
|
||||||
end
|
end
|
||||||
|
|
||||||
seed_students(params[:enroll_student_count]) if params[:enroll_student_count] > 0
|
seed_students(params[:enroll_student_count]) if params[:enroll_student_count] > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_student_group_as_a_teacher(group_name = "Windfury", enroll_student_count = 0)
|
def create_student_group_as_a_teacher(group_name = "Windfury", enroll_student_count = 0)
|
||||||
@student = User.create!(:name => "Test Student 1")
|
@student = User.create!(:name => "Test Student 1")
|
||||||
@course.enroll_student(@student).accept!
|
@course.enroll_student(@student).accept!
|
||||||
|
|
||||||
|
@ -378,9 +389,9 @@ def create_student_group_as_a_teacher(group_name = "Windfury", enroll_student_co
|
||||||
end
|
end
|
||||||
|
|
||||||
group
|
group
|
||||||
end
|
end
|
||||||
|
|
||||||
def manually_create_group(params={})
|
def manually_create_group(params={})
|
||||||
default_params = {
|
default_params = {
|
||||||
group_name:'Test Group',
|
group_name:'Test Group',
|
||||||
has_max_membership:false,
|
has_max_membership:false,
|
||||||
|
@ -397,16 +408,16 @@ def manually_create_group(params={})
|
||||||
end
|
end
|
||||||
f('#groupEditSaveButton').click
|
f('#groupEditSaveButton').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# Used to set group_limit field manually. Assumes you are on Edit Group Set page and self-sign up is checked
|
# Used to set group_limit field manually. Assumes you are on Edit Group Set page and self-sign up is checked
|
||||||
def manually_set_groupset_limit(member_limit = "2")
|
def manually_set_groupset_limit(member_limit = "2")
|
||||||
replace_content(fj('input[name="group_limit"]:visible'), member_limit)
|
replace_content(fj('input[name="group_limit"]:visible'), member_limit)
|
||||||
fj('.btn.btn-primary[type=submit]').click
|
fj('.btn.btn-primary[type=submit]').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def manually_fill_limited_group(member_limit ="2",student_count = 0)
|
def manually_fill_limited_group(member_limit ="2",student_count = 0)
|
||||||
student_count.times do |n|
|
student_count.times do |n|
|
||||||
# Finds all student add buttons and updates the through each iteration
|
# Finds all student add buttons and updates the through each iteration
|
||||||
studs = ff('.assign-to-group')
|
studs = ff('.assign-to-group')
|
||||||
|
@ -417,26 +428,26 @@ def manually_fill_limited_group(member_limit ="2",student_count = 0)
|
||||||
expect(f('.group-summary')).to include_text("#{n+1} / #{member_limit} students")
|
expect(f('.group-summary')).to include_text("#{n+1} / #{member_limit} students")
|
||||||
end
|
end
|
||||||
expect(f('.show-group-full')).to be_displayed
|
expect(f('.show-group-full')).to be_displayed
|
||||||
end
|
end
|
||||||
|
|
||||||
# Used to enable self-signup on an already created group set by opening Edit Group Set
|
# Used to enable self-signup on an already created group set by opening Edit Group Set
|
||||||
def manually_enable_self_signup
|
def manually_enable_self_signup
|
||||||
f('.icon-settings').click
|
f('.icon-settings').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.edit-category').click
|
f('.edit-category').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
f('.self-signup-toggle').click
|
f('.self-signup-toggle').click
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_clone_group_set_option
|
def open_clone_group_set_option
|
||||||
f('.icon-settings').click
|
f('.icon-settings').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.clone-category').click
|
f('.clone-category').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_cloned_groupset_name(groupset_name="Test Group Set Clone",page_reload=false)
|
def set_cloned_groupset_name(groupset_name="Test Group Set Clone",page_reload=false)
|
||||||
replace_content(f('#cloned_category_name'), groupset_name)
|
replace_content(f('#cloned_category_name'), groupset_name)
|
||||||
if page_reload
|
if page_reload
|
||||||
expect_new_page_load {f('#clone_category_submit_button').click}
|
expect_new_page_load {f('#clone_category_submit_button').click}
|
||||||
|
@ -444,32 +455,32 @@ def set_cloned_groupset_name(groupset_name="Test Group Set Clone",page_reload=fa
|
||||||
f('#clone_category_submit_button').click
|
f('#clone_category_submit_button').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_randomly_assign_students_option
|
def select_randomly_assign_students_option
|
||||||
f('.icon-settings').click
|
f('.icon-settings').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.randomly-assign-members').click
|
f('.randomly-assign-members').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.randomly-assign-members-confirm').click
|
f('.randomly-assign-members-confirm').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_change_groups_option
|
def select_change_groups_option
|
||||||
(ff('#option_change_groups').last).click
|
(ff('#option_change_groups').last).click
|
||||||
(ff('#clone_category_submit_button').last).click
|
(ff('#clone_category_submit_button').last).click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def move_unassigned_student_to_group(group=0)
|
def move_unassigned_student_to_group(group=0)
|
||||||
f('.assign-to-group').click
|
f('.assign-to-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
ff('.set-group')[group].click
|
ff('.set-group')[group].click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# Moves student from one group to another group. Assumes student can be seen by toggling group's collapse arrow.
|
# Moves student from one group to another group. Assumes student can be seen by toggling group's collapse arrow.
|
||||||
def move_student_to_group(group_destination, student=0)
|
def move_student_to_group(group_destination, student=0)
|
||||||
ff('.group-user-actions')[student].click
|
ff('.group-user-actions')[student].click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
ff('.edit-group-assignment')[student].click
|
ff('.edit-group-assignment')[student].click
|
||||||
|
@ -477,31 +488,31 @@ def move_student_to_group(group_destination, student=0)
|
||||||
click_option('.single-select', "#{@testgroup[group_destination].name}")
|
click_option('.single-select', "#{@testgroup[group_destination].name}")
|
||||||
f('.set-group').click
|
f('.set-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# Assumes student can be seen by toggling group's collapse arrow
|
# Assumes student can be seen by toggling group's collapse arrow
|
||||||
def remove_student_from_group(student=0)
|
def remove_student_from_group(student=0)
|
||||||
ff('.group-user-actions')[student].click
|
ff('.group-user-actions')[student].click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
ff('.remove-from-group')[student].click
|
ff('.remove-from-group')[student].click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def toggle_group_collapse_arrow
|
def toggle_group_collapse_arrow
|
||||||
f('.toggle-group').click
|
f('.toggle-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def manually_delete_group
|
def manually_delete_group
|
||||||
f('.group-actions .icon-settings').click
|
f('.group-actions .icon-settings').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.delete-group').click
|
f('.delete-group').click
|
||||||
|
|
||||||
driver.switch_to.alert.accept
|
driver.switch_to.alert.accept
|
||||||
wait_for_animations
|
wait_for_animations
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_group
|
def delete_group
|
||||||
f(".icon-settings").click
|
f(".icon-settings").click
|
||||||
wait_for_animations
|
wait_for_animations
|
||||||
|
|
||||||
|
@ -509,45 +520,45 @@ def delete_group
|
||||||
|
|
||||||
driver.switch_to.alert.accept
|
driver.switch_to.alert.accept
|
||||||
wait_for_animations
|
wait_for_animations
|
||||||
end
|
end
|
||||||
|
|
||||||
# Only use to add group_set if no group sets already exist
|
# Only use to add group_set if no group sets already exist
|
||||||
def click_add_group_set
|
def click_add_group_set
|
||||||
f('#add-group-set').click
|
f('#add-group-set').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_group_set
|
def save_group_set
|
||||||
f('#newGroupSubmitButton').click
|
f('#newGroupSubmitButton').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_and_submit_assignment_from_group(student)
|
def create_and_submit_assignment_from_group(student)
|
||||||
category = @group_category[0]
|
category = @group_category[0]
|
||||||
assignment = @course.assignments.create({
|
assignment = @course.assignments.create({
|
||||||
:name => "test assignment",
|
:name => "test assignment",
|
||||||
:group_category => category})
|
:group_category => category})
|
||||||
assignment.submit_homework(student)
|
assignment.submit_homework(student)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_group_announcement_manually(title,text)
|
def create_group_announcement_manually(title,text)
|
||||||
expect_new_page_load { f('.btn-primary').click }
|
expect_new_page_load { f('.btn-primary').click }
|
||||||
replace_content(f('input[name=title]'), title)
|
replace_content(f('input[name=title]'), title)
|
||||||
type_in_tiny('textarea[name=message]', text)
|
type_in_tiny('textarea[name=message]', text)
|
||||||
expect_new_page_load { submit_form('.form-actions') }
|
expect_new_page_load { submit_form('.form-actions') }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checks that a group member can click a specified page entry on the index page and see its show page
|
# Checks that a group member can click a specified page entry on the index page and see its show page
|
||||||
# Expects @page is defined and index is defined as which wiki page is desired to click on. First page entry is default
|
# Expects @page is defined and index is defined as which wiki page is desired to click on. First page entry is default
|
||||||
def verify_member_sees_group_page(index = 0)
|
def verify_member_sees_group_page(index = 0)
|
||||||
get pages_page
|
get pages_page
|
||||||
expect_new_page_load { ff('.wiki-page-link')[index].click }
|
expect_new_page_load { ff('.wiki-page-link')[index].click }
|
||||||
expect expect(f('.page-title')).to include_text("#{@page.title}")
|
expect expect(f('.page-title')).to include_text("#{@page.title}")
|
||||||
end
|
end
|
||||||
|
|
||||||
# context test. if true, allows you to test files both in and out of group context,
|
# context test. if true, allows you to test files both in and out of group context,
|
||||||
# otherwise it adds two files to the group
|
# otherwise it adds two files to the group
|
||||||
def add_test_files(context_test = true)
|
def add_test_files(context_test = true)
|
||||||
if context_test
|
if context_test
|
||||||
second_file_context = @course
|
second_file_context = @course
|
||||||
else
|
else
|
||||||
|
@ -558,16 +569,16 @@ def add_test_files(context_test = true)
|
||||||
@testgroup.first, "example.pdf")
|
@testgroup.first, "example.pdf")
|
||||||
add_file(fixture_file_upload('files/a_file.txt', 'text/plain'),
|
add_file(fixture_file_upload('files/a_file.txt', 'text/plain'),
|
||||||
second_file_context, "a_file.txt")
|
second_file_context, "a_file.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
def expand_files_on_content_pane
|
def expand_files_on_content_pane
|
||||||
fj('.ui-state-default.ui-corner-top:contains("Files")').click
|
fj('.ui-state-default.ui-corner-top:contains("Files")').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.sign.plus').click
|
f('.sign.plus').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def move_file_to_folder(file_name,destination_name)
|
def move_file_to_folder(file_name,destination_name)
|
||||||
move(file_name, 1, :toolbar_menu)
|
move(file_name, 1, :toolbar_menu)
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('#flash_message_holder').text).to eq "#{file_name} moved to #{destination_name}\nClose"
|
expect(f('#flash_message_holder').text).to eq "#{file_name} moved to #{destination_name}\nClose"
|
||||||
|
@ -575,10 +586,10 @@ def move_file_to_folder(file_name,destination_name)
|
||||||
ff('.media-body').first.click
|
ff('.media-body').first.click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(fln(file_name)).to be_displayed
|
expect(fln(file_name)).to be_displayed
|
||||||
end
|
end
|
||||||
|
|
||||||
# For files page, creates a folder and then adds a folder within it
|
# For files page, creates a folder and then adds a folder within it
|
||||||
def create_folder_structure
|
def create_folder_structure
|
||||||
@top_folder = 'Top Folder'
|
@top_folder = 'Top Folder'
|
||||||
@inner_folder = 'Inner Folder'
|
@inner_folder = 'Inner Folder'
|
||||||
add_folder(@top_folder)
|
add_folder(@top_folder)
|
||||||
|
@ -586,37 +597,28 @@ def create_folder_structure
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
add_folder(@inner_folder)
|
add_folder(@inner_folder)
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# Moves a folder to the top level file structure
|
# Moves a folder to the top level file structure
|
||||||
def move_folder(folder_name)
|
def move_folder(folder_name)
|
||||||
move(folder_name, 0, :toolbar_menu)
|
move(folder_name, 0, :toolbar_menu)
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('#flash_message_holder').text).to eq "#{folder_name} moved to files\nClose"
|
expect(f('#flash_message_holder').text).to eq "#{folder_name} moved to files\nClose"
|
||||||
expect(ff('.treeLabel span')[2].text).to eq folder_name
|
expect(ff('.treeLabel span')[2].text).to eq folder_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def verify_no_course_user_access(path)
|
def verify_no_course_user_access(path)
|
||||||
# User.create! creates a course user, who won't be able to access the page
|
# User.create! creates a course user, who won't be able to access the page
|
||||||
user_session(User.create!(name: 'course student'))
|
user_session(User.create!(name: 'course student'))
|
||||||
get path
|
get path
|
||||||
expect(f('.ui-state-error')).to be_displayed
|
expect(f('.ui-state-error')).to be_displayed
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_group_page_urls
|
def edit_group_announcement
|
||||||
let(:url) {"/groups/#{@testgroup.first.id}"}
|
|
||||||
let(:announcements_page) {url + '/announcements'}
|
|
||||||
let(:people_page) {url + '/users'}
|
|
||||||
let(:discussions_page) {url + '/discussion_topics'}
|
|
||||||
let(:pages_page) {url + '/pages'}
|
|
||||||
let(:files_page) {url + '/files'}
|
|
||||||
let(:conferences_page) {url + '/conferences'}
|
|
||||||
end
|
|
||||||
|
|
||||||
def edit_group_announcement
|
|
||||||
get announcements_page
|
get announcements_page
|
||||||
expect_new_page_load { ff('li.discussion-topic').first.click }
|
expect_new_page_load { ff('li.discussion-topic').first.click }
|
||||||
click_edit_btn
|
click_edit_btn
|
||||||
# edit also verifies it has been edited
|
# edit also verifies it has been edited
|
||||||
edit('I edited it','My test message')
|
edit('I edited it','My test message')
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,6 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
|
module ManageGroupsCommon
|
||||||
def add_category(course, name, opts={})
|
def add_category(course, name, opts={})
|
||||||
keep_trying_until do
|
keep_trying_until do
|
||||||
f(".add_category_link").click
|
f(".add_category_link").click
|
||||||
|
@ -121,3 +122,4 @@ require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
fj("#{group_selector} .toggle-group").click
|
fj("#{group_selector} .toggle-group").click
|
||||||
wait_for_ajax_requests
|
wait_for_ajax_requests
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -23,7 +23,8 @@ module NotificationsCommon
|
||||||
NotificationPolicy.create!(
|
NotificationPolicy.create!(
|
||||||
notification: n,
|
notification: n,
|
||||||
communication_channel: user.communication_channel,
|
communication_channel: user.communication_channel,
|
||||||
frequency: params[:frequency])
|
frequency: params[:frequency]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
||||||
|
|
||||||
|
module OutcomeCommon
|
||||||
|
|
||||||
#when 'teacher'; course_with_teacher_logged_in
|
# when 'teacher'; course_with_teacher_logged_in
|
||||||
#when 'student'; course_with_student_logged_in
|
# when 'student'; course_with_student_logged_in
|
||||||
#when 'admin'; course_with_admin_logged_in
|
# when 'admin'; course_with_admin_logged_in
|
||||||
|
|
||||||
|
def import_account_level_outcomes
|
||||||
def import_account_level_outcomes
|
|
||||||
keep_trying_until do
|
keep_trying_until do
|
||||||
f(".btn-primary").click
|
f(".btn-primary").click
|
||||||
expect(driver.switch_to.alert).not_to be nil
|
expect(driver.switch_to.alert).not_to be nil
|
||||||
|
@ -15,36 +15,36 @@ def import_account_level_outcomes
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def traverse_nested_outcomes(outcome)
|
def traverse_nested_outcomes(outcome)
|
||||||
#pass an array with each group or outcome in sequence
|
# pass an array with each group or outcome in sequence
|
||||||
outcome.each do |title|
|
outcome.each do |title|
|
||||||
expect(ffj(".outcome-level:last .outcome-group .ellipsis")[0]).to have_attribute("title", title)
|
expect(ffj(".outcome-level:last .outcome-group .ellipsis")[0]).to have_attribute("title", title)
|
||||||
f(".ellipsis[title='#{title}']").click
|
f(".ellipsis[title='#{title}']").click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def goto_state_outcomes(outcome_url = "/accounts/#{Account.default.id}/outcomes")
|
def goto_state_outcomes(outcome_url = "/accounts/#{Account.default.id}/outcomes")
|
||||||
get outcome_url
|
get outcome_url
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.find_outcome').click
|
f('.find_outcome').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
ff(".outcome-level .outcome-group").last.click
|
ff(".outcome-level .outcome-group").last.click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def state_outcome_setup
|
def state_outcome_setup
|
||||||
@cm.export_content
|
@cm.export_content
|
||||||
run_jobs
|
run_jobs
|
||||||
@cm.reload
|
@cm.reload
|
||||||
expect(@cm.old_warnings_format).to eq []
|
expect(@cm.old_warnings_format).to eq []
|
||||||
expect(@cm.migration_settings[:last_error]).to be_nil
|
expect(@cm.migration_settings[:last_error]).to be_nil
|
||||||
expect(@cm.workflow_state).to eq 'imported'
|
expect(@cm.workflow_state).to eq 'imported'
|
||||||
end
|
end
|
||||||
|
|
||||||
def context_outcome(context, num_of_outcomes)
|
def context_outcome(context, num_of_outcomes)
|
||||||
num_of_outcomes.times do |o|
|
num_of_outcomes.times do |o|
|
||||||
@outcome_group ||= context.root_outcome_group
|
@outcome_group ||= context.root_outcome_group
|
||||||
@outcome = context.created_learning_outcomes.create!(:title => "outcome #{o}")
|
@outcome = context.created_learning_outcomes.create!(:title => "outcome #{o}")
|
||||||
|
@ -53,9 +53,9 @@ def context_outcome(context, num_of_outcomes)
|
||||||
@outcome_group.add_outcome(@outcome)
|
@outcome_group.add_outcome(@outcome)
|
||||||
@outcome_group.save!
|
@outcome_group.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_bulk_outcomes_groups(context, num_of_groups, num_of_outcomes)
|
def create_bulk_outcomes_groups(context, num_of_groups, num_of_outcomes)
|
||||||
@root = context.root_outcome_group
|
@root = context.root_outcome_group
|
||||||
num_of_groups.times do |g|
|
num_of_groups.times do |g|
|
||||||
@group = context.learning_outcome_groups.create!(:title => "group #{g}")
|
@group = context.learning_outcome_groups.create!(:title => "group #{g}")
|
||||||
|
@ -65,9 +65,9 @@ def create_bulk_outcomes_groups(context, num_of_groups, num_of_outcomes)
|
||||||
end
|
end
|
||||||
@root.adopt_outcome_group(@group)
|
@root.adopt_outcome_group(@group)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def valid_outcome_data
|
def valid_outcome_data
|
||||||
{
|
{
|
||||||
:mastery_points => 3,
|
:mastery_points => 3,
|
||||||
:ratings => [
|
:ratings => [
|
||||||
|
@ -75,32 +75,37 @@ def valid_outcome_data
|
||||||
{:points => 0, :description => "Lame"}
|
{:points => 0, :description => "Lame"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def state_outcome
|
def state_outcome
|
||||||
state_outcome = ['NGA Center/CCSSO', 'Common Core State Standards',
|
state_outcome = [
|
||||||
'College- and Career-Readiness Standards and K-12 Mathematics', 'First Grade',
|
'NGA Center/CCSSO',
|
||||||
'1.DD - zééééééééééééééééééééééééééééééééééééééééééééééééé', 'Something else']
|
'Common Core State Standards',
|
||||||
|
'College- and Career-Readiness Standards and K-12 Mathematics',
|
||||||
|
'First Grade',
|
||||||
|
'1.DD - zééééééééééééééééééééééééééééééééééééééééééééééééé',
|
||||||
|
'Something else'
|
||||||
|
]
|
||||||
state_outcome
|
state_outcome
|
||||||
end
|
end
|
||||||
|
|
||||||
def course_bulk_outcome_groups_course(num_of_groups, num_of_outcomes)
|
def course_bulk_outcome_groups_course(num_of_groups, num_of_outcomes)
|
||||||
create_bulk_outcomes_groups(@course, num_of_groups, num_of_outcomes)
|
create_bulk_outcomes_groups(@course, num_of_groups, num_of_outcomes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def course_bulk_outcome_groups_account(num_of_groups, num_of_outcomes)
|
def course_bulk_outcome_groups_account(num_of_groups, num_of_outcomes)
|
||||||
create_bulk_outcomes_groups(@account, num_of_groups, num_of_outcomes)
|
create_bulk_outcomes_groups(@account, num_of_groups, num_of_outcomes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def course_outcome(num_of_outcomes)
|
def course_outcome(num_of_outcomes)
|
||||||
context_outcome(@course, num_of_outcomes)
|
context_outcome(@course, num_of_outcomes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_outcome(num_of_outcomes)
|
def account_outcome(num_of_outcomes)
|
||||||
context_outcome(@account, num_of_outcomes)
|
context_outcome(@account, num_of_outcomes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_create_a_learning_outcome_with_a_new_rating_root_level
|
def should_create_a_learning_outcome_with_a_new_rating_root_level
|
||||||
get outcome_url
|
get outcome_url
|
||||||
|
|
||||||
## when
|
## when
|
||||||
|
@ -130,16 +135,18 @@ def should_create_a_learning_outcome_with_a_new_rating_root_level
|
||||||
# ratings
|
# ratings
|
||||||
ratings = ffj('table.criterion .rating')
|
ratings = ffj('table.criterion .rating')
|
||||||
expect(ratings.size).to eq 4
|
expect(ratings.size).to eq 4
|
||||||
expect(ratings.map { |r| r.text }).to eq ["Exceeds Expectations\n5 Points",
|
expect(ratings.map(&:text)).to eq [
|
||||||
|
"Exceeds Expectations\n5 Points",
|
||||||
"almost exceeds\n4 Points",
|
"almost exceeds\n4 Points",
|
||||||
"Meets Expectations\n3 Points",
|
"Meets Expectations\n3 Points",
|
||||||
"Does Not Meet Expectations\n0 Points"]
|
"Does Not Meet Expectations\n0 Points"
|
||||||
|
]
|
||||||
expect(f('table.criterion .total').text).to eq "Total Points\n5 Points"
|
expect(f('table.criterion .total').text).to eq "Total Points\n5 Points"
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcome.where(short_description: outcome_name).first).to be_present
|
expect(LearningOutcome.where(short_description: outcome_name).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_create_a_learning_outcome_nested
|
def should_create_a_learning_outcome_nested
|
||||||
get outcome_url
|
get outcome_url
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
@ -163,10 +170,10 @@ def should_create_a_learning_outcome_nested
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
refresh_page
|
refresh_page
|
||||||
|
|
||||||
#select group
|
# select group
|
||||||
f('.outcome-group').click
|
f('.outcome-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
#select nested outcome
|
# select nested outcome
|
||||||
f('.outcome-link').click
|
f('.outcome-link').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
@ -178,9 +185,9 @@ def should_create_a_learning_outcome_nested
|
||||||
expect(f(".outcomes-content .title").text).to eq outcome_name
|
expect(f(".outcomes-content .title").text).to eq outcome_name
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcome.where(short_description: outcome_name).first).to be_present
|
expect(LearningOutcome.where(short_description: outcome_name).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_edit_a_learning_outcome_and_delete_a_rating
|
def should_edit_a_learning_outcome_and_delete_a_rating
|
||||||
edited_title = 'edit outcome'
|
edited_title = 'edit outcome'
|
||||||
who_to_login == 'teacher' ? @context = @course : @context = account
|
who_to_login == 'teacher' ? @context = @course : @context = account
|
||||||
outcome_model
|
outcome_model
|
||||||
|
@ -190,35 +197,35 @@ def should_edit_a_learning_outcome_and_delete_a_rating
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
driver.execute_script("$('.edit_button').click()")
|
driver.execute_script("$('.edit_button').click()")
|
||||||
|
|
||||||
## when
|
## when
|
||||||
# edit title
|
# edit title
|
||||||
replace_content f('.outcomes-content input[name=title]'), edited_title
|
replace_content f('.outcomes-content input[name=title]'), edited_title
|
||||||
# delete a rating
|
# delete a rating
|
||||||
f('.edit_rating').click
|
f('.edit_rating').click
|
||||||
f('.delete_rating_link').click
|
f('.delete_rating_link').click
|
||||||
# edit a rating
|
# edit a rating
|
||||||
f('.edit_rating').click
|
f('.edit_rating').click
|
||||||
replace_content f('input[name="ratings[0][points]"]'), '1'
|
replace_content f('input[name="ratings[0][points]"]'), '1'
|
||||||
replace_content f('input[name="mastery_points"]'), '1'
|
replace_content f('input[name="mastery_points"]'), '1'
|
||||||
# submit
|
# submit
|
||||||
driver.execute_script "$('.submit_button').click()"
|
driver.execute_script "$('.submit_button').click()"
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
## expect
|
## expect
|
||||||
# should be edited in directory browser
|
# should be edited in directory browser
|
||||||
expect(ffj('.outcomes-sidebar .outcome-level:first li').detect { |li| li.text == edited_title }).not_to be_nil
|
expect(ffj('.outcomes-sidebar .outcome-level:first li').detect { |li| li.text == edited_title }).not_to be_nil
|
||||||
# title
|
# title
|
||||||
expect(f(".outcomes-content .title").text).to eq edited_title
|
expect(f(".outcomes-content .title").text).to eq edited_title
|
||||||
# ratings
|
# ratings
|
||||||
ratings = ffj('table.criterion .rating')
|
ratings = ffj('table.criterion .rating')
|
||||||
expect(ratings.size).to eq 1
|
expect(ratings.size).to eq 1
|
||||||
expect(ratings.map { |r| r.text }).to eq ["Lame\n1 Points"]
|
expect(ratings.map(&:text)).to eq ["Lame\n1 Points"]
|
||||||
expect(f('table.criterion .total').text).to eq "Total Points\n1 Points"
|
expect(f('table.criterion .total').text).to eq "Total Points\n1 Points"
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcome.where(short_description: edited_title).first).to be_present
|
expect(LearningOutcome.where(short_description: edited_title).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_delete_a_learning_outcome
|
def should_delete_a_learning_outcome
|
||||||
who_to_login == 'teacher' ? @context = @course : @context = account
|
who_to_login == 'teacher' ? @context = @course : @context = account
|
||||||
outcome_model
|
outcome_model
|
||||||
get outcome_url
|
get outcome_url
|
||||||
|
@ -239,9 +246,9 @@ def should_delete_a_learning_outcome
|
||||||
expect(LearningOutcome.where(id: @outcome).first.workflow_state).to eq 'deleted'
|
expect(LearningOutcome.where(id: @outcome).first.workflow_state).to eq 'deleted'
|
||||||
refresh_page # to make sure it was correctly deleted
|
refresh_page # to make sure it was correctly deleted
|
||||||
ff('.learning_outcome').each { |outcome_element| expect(outcome_element).not_to be_displayed }
|
ff('.learning_outcome').each { |outcome_element| expect(outcome_element).not_to be_displayed }
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_mastery_points
|
def should_validate_mastery_points
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
# Must have title for correct validation message to appear.
|
# Must have title for correct validation message to appear.
|
||||||
|
@ -256,9 +263,9 @@ def should_validate_mastery_points
|
||||||
## expect
|
## expect
|
||||||
expect(f('.error_box')).to be_present
|
expect(f('.error_box')).to be_present
|
||||||
expect(fj('.error_text div').text).to include("Must be greater than or equal to 0")
|
expect(fj('.error_text div').text).to include("Must be greater than or equal to 0")
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_calculation_method_dropdown
|
def should_validate_calculation_method_dropdown
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
# create array of drop down options
|
# create array of drop down options
|
||||||
|
@ -267,9 +274,9 @@ def should_validate_calculation_method_dropdown
|
||||||
# expect
|
# expect
|
||||||
expect(drop_down.length).to eq(4)
|
expect(drop_down.length).to eq(4)
|
||||||
expect(drop_down).to match_array(expected_array)
|
expect(drop_down).to match_array(expected_array)
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_decaying_average_below_range
|
def should_validate_decaying_average_below_range
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
below_range = 0
|
below_range = 0
|
||||||
|
@ -281,9 +288,9 @@ def should_validate_decaying_average_below_range
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('.error_box')).to be_present
|
expect(f('.error_box')).to be_present
|
||||||
expect(fj('.error_text div').text).to include("'#{below_range}' is not a valid value")
|
expect(fj('.error_text div').text).to include("'#{below_range}' is not a valid value")
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_decaying_average_above_range
|
def should_validate_decaying_average_above_range
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
above_range = 100
|
above_range = 100
|
||||||
|
@ -296,9 +303,9 @@ def should_validate_decaying_average_above_range
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('.error_box')).to be_present
|
expect(f('.error_box')).to be_present
|
||||||
expect(fj('.error_text div').text).to include("'#{above_range}' is not a valid value")
|
expect(fj('.error_text div').text).to include("'#{above_range}' is not a valid value")
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_n_mastery_below_range
|
def should_validate_n_mastery_below_range
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
below_range = 1
|
below_range = 1
|
||||||
|
@ -310,9 +317,9 @@ def should_validate_n_mastery_below_range
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('.error_box')).to be_present
|
expect(f('.error_box')).to be_present
|
||||||
expect(fj('.error_text div').text).to include("'#{below_range}' is not a valid value")
|
expect(fj('.error_text div').text).to include("'#{below_range}' is not a valid value")
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_n_mastery_above_range
|
def should_validate_n_mastery_above_range
|
||||||
get outcome_url
|
get outcome_url
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
above_range = 6
|
above_range = 6
|
||||||
|
@ -324,9 +331,9 @@ def should_validate_n_mastery_above_range
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f('.error_box')).to be_present
|
expect(f('.error_box')).to be_present
|
||||||
expect(fj('.error_text div').text).to include("'#{above_range}' is not a valid value")
|
expect(fj('.error_text div').text).to include("'#{above_range}' is not a valid value")
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_validate_short_description_presence
|
def should_validate_short_description_presence
|
||||||
get outcome_url
|
get outcome_url
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
|
@ -338,12 +345,10 @@ def should_validate_short_description_presence
|
||||||
driver.execute_script("$('.outcomes-content').scrollTo(0, 0)")
|
driver.execute_script("$('.outcomes-content').scrollTo(0, 0)")
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
keep_trying_until {
|
keep_trying_until { expect(fj('.error_text div').text).to eq "Cannot be blank" }
|
||||||
expect(fj('.error_text div').text).to eq "Cannot be blank"
|
end
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def should_validate_short_description_length
|
def should_validate_short_description_length
|
||||||
get outcome_url
|
get outcome_url
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.add_outcome_link').click
|
f('.add_outcome_link').click
|
||||||
|
@ -352,9 +357,9 @@ def should_validate_short_description_length
|
||||||
f('.submit_button').click
|
f('.submit_button').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(fj('.error_text')).to be_present
|
expect(fj('.error_text')).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_create_an_outcome_group_root_level
|
def should_create_an_outcome_group_root_level
|
||||||
get outcome_url
|
get outcome_url
|
||||||
|
|
||||||
## when
|
## when
|
||||||
|
@ -374,9 +379,9 @@ def should_create_an_outcome_group_root_level
|
||||||
expect(f(".outcomes-content .title").text).to eq group_title
|
expect(f(".outcomes-content .title").text).to eq group_title
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcomeGroup.where(title: group_title).first).to be_present
|
expect(LearningOutcomeGroup.where(title: group_title).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_create_an_outcome_group_nested
|
def should_create_an_outcome_group_nested
|
||||||
get outcome_url
|
get outcome_url
|
||||||
|
|
||||||
## when
|
## when
|
||||||
|
@ -394,16 +399,15 @@ def should_create_an_outcome_group_nested
|
||||||
replace_content f('.outcomes-content input[name=title]'), nested_group_title
|
replace_content f('.outcomes-content input[name=title]'), nested_group_title
|
||||||
# submit
|
# submit
|
||||||
driver.execute_script("$('.submit_button').click()")
|
driver.execute_script("$('.submit_button').click()")
|
||||||
if !f('.submit_button').nil?
|
|
||||||
driver.execute_script("$('.submit_button').click()")
|
driver.execute_script("$('.submit_button').click()") unless f('.submit_button').nil?
|
||||||
end
|
|
||||||
refresh_page
|
refresh_page
|
||||||
|
|
||||||
#select group
|
# select group
|
||||||
fj('.outcome-level:eq(0) .outcome-group').click
|
fj('.outcome-level:eq(0) .outcome-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
#select nested group
|
# select nested group
|
||||||
fj('.outcome-level:eq(1) .outcome-group').click
|
fj('.outcome-level:eq(1) .outcome-group').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
|
||||||
|
@ -415,9 +419,9 @@ def should_create_an_outcome_group_nested
|
||||||
expect(f(".outcomes-content .title").text).to eq nested_group_title
|
expect(f(".outcomes-content .title").text).to eq nested_group_title
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcomeGroup.where(title: nested_group_title).first).to be_present
|
expect(LearningOutcomeGroup.where(title: nested_group_title).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_edit_an_outcome_group
|
def should_edit_an_outcome_group
|
||||||
edited_title = 'edited group'
|
edited_title = 'edited group'
|
||||||
who_to_login == 'teacher' ? @context = @course : @context = account
|
who_to_login == 'teacher' ? @context = @course : @context = account
|
||||||
outcome_group_model
|
outcome_group_model
|
||||||
|
@ -443,9 +447,9 @@ def should_edit_an_outcome_group
|
||||||
expect(f(".outcomes-content .title").text).to eq edited_title
|
expect(f(".outcomes-content .title").text).to eq edited_title
|
||||||
# db
|
# db
|
||||||
expect(LearningOutcomeGroup.where(title: edited_title).first).to be_present
|
expect(LearningOutcomeGroup.where(title: edited_title).first).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_delete_an_outcome_group
|
def should_delete_an_outcome_group
|
||||||
who_to_login == 'teacher' ? @context = @course : @context = account
|
who_to_login == 'teacher' ? @context = @course : @context = account
|
||||||
outcome_group_model
|
outcome_group_model
|
||||||
get outcome_url
|
get outcome_url
|
||||||
|
@ -466,4 +470,5 @@ def should_delete_an_outcome_group
|
||||||
expect(LearningOutcomeGroup.where(id: @outcome_group).first.workflow_state).to eq 'deleted'
|
expect(LearningOutcomeGroup.where(id: @outcome_group).first.workflow_state).to eq 'deleted'
|
||||||
refresh_page # to make sure it was correctly deleted
|
refresh_page # to make sure it was correctly deleted
|
||||||
ffj('.learning_outcome').each { |outcome_element| expect(outcome_element).not_to be_displayed }
|
ffj('.learning_outcome').each { |outcome_element| expect(outcome_element).not_to be_displayed }
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,6 +1,6 @@
|
||||||
require_relative "quizzes_common"
|
require_relative "quizzes_common"
|
||||||
|
|
||||||
shared_context "quiz question selenium tests" do
|
module QuizQuestionsCommon
|
||||||
include QuizzesCommon
|
include QuizzesCommon
|
||||||
|
|
||||||
def create_oqaat_quiz(opts={})
|
def create_oqaat_quiz(opts={})
|
||||||
|
@ -36,13 +36,17 @@ shared_context "quiz question selenium tests" do
|
||||||
def take_the_quiz
|
def take_the_quiz
|
||||||
get "/courses/#{@course.id}/quizzes/#{@quiz.id}"
|
get "/courses/#{@course.id}/quizzes/#{@quiz.id}"
|
||||||
fj("a:contains('Take the Quiz')").click
|
fj("a:contains('Take the Quiz')").click
|
||||||
wait_for_ajaximations
|
|
||||||
|
# sleep because display is updated on timer, not ajax callback
|
||||||
|
sleep 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def preview_the_quiz
|
def preview_the_quiz
|
||||||
get "/courses/#{@course.id}/quizzes/#{@quiz.id}"
|
get "/courses/#{@course.id}/quizzes/#{@quiz.id}"
|
||||||
f("#preview_quiz_button").click
|
f("#preview_quiz_button").click
|
||||||
wait_for_ajaximations
|
|
||||||
|
# sleep because display is updated on timer, not ajax callback
|
||||||
|
sleep 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def navigate_away_and_resume_quiz
|
def navigate_away_and_resume_quiz
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
def create_rubric_with_criterion_points(points)
|
module RubricsCommon
|
||||||
|
def create_rubric_with_criterion_points(points)
|
||||||
get rubric_url
|
get rubric_url
|
||||||
|
|
||||||
f("#right-side-wrapper .add_rubric_link").click
|
f("#right-side-wrapper .add_rubric_link").click
|
||||||
|
@ -9,9 +10,9 @@ def create_rubric_with_criterion_points(points)
|
||||||
criterion_points.send_keys(:return)
|
criterion_points.send_keys(:return)
|
||||||
submit_form('#edit_rubric_form')
|
submit_form('#edit_rubric_form')
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def assignment_with_rubric(points, title = 'new rubric')
|
def assignment_with_rubric(points, title = 'new rubric')
|
||||||
@assignment = create_assignment_with_points(points)
|
@assignment = create_assignment_with_points(points)
|
||||||
rubric_model(title: title, data:
|
rubric_model(title: title, data:
|
||||||
[{
|
[{
|
||||||
|
@ -22,15 +23,15 @@ def assignment_with_rubric(points, title = 'new rubric')
|
||||||
[{description: "Good", points: points, id: 'rat1', criterion_id: 'crit1'}]
|
[{description: "Good", points: points, id: 'rat1', criterion_id: 'crit1'}]
|
||||||
}], description: 'new rubric description')
|
}], description: 'new rubric description')
|
||||||
@association = @rubric.associate_with(@assignment, @course, purpose: 'grading', use_for_grading: false)
|
@association = @rubric.associate_with(@assignment, @course, purpose: 'grading', use_for_grading: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_rubric_after_updating
|
def edit_rubric_after_updating
|
||||||
fj(".rubric .edit_rubric_link:visible").click
|
fj(".rubric .edit_rubric_link:visible").click
|
||||||
driver.find_element(:tag_name, "body").click
|
driver.find_element(:tag_name, "body").click
|
||||||
end
|
end
|
||||||
|
|
||||||
# should be in editing mode before calling
|
# should be in editing mode before calling
|
||||||
def split_ratings(idx)
|
def split_ratings(idx)
|
||||||
rating = ffj(".rubric .criterion:visible .rating")[idx]
|
rating = ffj(".rubric .criterion:visible .rating")[idx]
|
||||||
driver.action.move_to(rating).perform
|
driver.action.move_to(rating).perform
|
||||||
|
|
||||||
|
@ -40,9 +41,9 @@ def split_ratings(idx)
|
||||||
$rating.prev().addClass('add_left');
|
$rating.prev().addClass('add_left');
|
||||||
$rating.click();
|
$rating.click();
|
||||||
JS
|
JS
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_delete_a_rubric
|
def should_delete_a_rubric
|
||||||
create_rubric_with_criterion_points "5"
|
create_rubric_with_criterion_points "5"
|
||||||
f('.delete_rubric_link').click
|
f('.delete_rubric_link').click
|
||||||
driver.switch_to.alert.accept
|
driver.switch_to.alert.accept
|
||||||
|
@ -51,9 +52,9 @@ def should_delete_a_rubric
|
||||||
expect(Rubric.last.workflow_state).to eq 'deleted'
|
expect(Rubric.last.workflow_state).to eq 'deleted'
|
||||||
ff('#rubrics .rubric').each { |rubric| expect(rubric).not_to be_displayed }
|
ff('#rubrics .rubric').each { |rubric| expect(rubric).not_to be_displayed }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_edit_a_rubric
|
def should_edit_a_rubric
|
||||||
edit_title = 'edited rubric'
|
edit_title = 'edited rubric'
|
||||||
create_rubric_with_criterion_points "5"
|
create_rubric_with_criterion_points "5"
|
||||||
rubric = Rubric.last
|
rubric = Rubric.last
|
||||||
|
@ -66,29 +67,29 @@ def should_edit_a_rubric
|
||||||
expect(rubric.title).to eq edit_title
|
expect(rubric.title).to eq edit_title
|
||||||
expect(f('.rubric_title .title').text).to eq edit_title
|
expect(f('.rubric_title .title').text).to eq edit_title
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_allow_fractional_points
|
def should_allow_fractional_points
|
||||||
create_rubric_with_criterion_points "5.5"
|
create_rubric_with_criterion_points "5.5"
|
||||||
expect(fj(".rubric .criterion:visible .display_criterion_points").text).to eq '5.5'
|
expect(fj(".rubric .criterion:visible .display_criterion_points").text).to eq '5.5'
|
||||||
expect(fj(".rubric .criterion:visible .rating .points").text).to eq '5.5'
|
expect(fj(".rubric .criterion:visible .rating .points").text).to eq '5.5'
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_round_to_2_decimal_places
|
def should_round_to_2_decimal_places
|
||||||
create_rubric_with_criterion_points "5.249"
|
create_rubric_with_criterion_points "5.249"
|
||||||
expect(fj(".rubric .criterion:visible .display_criterion_points").text).to eq '5.25'
|
expect(fj(".rubric .criterion:visible .display_criterion_points").text).to eq '5.25'
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_round_to_an_integer_when_splitting
|
def should_round_to_an_integer_when_splitting
|
||||||
create_rubric_with_criterion_points "5.5"
|
create_rubric_with_criterion_points "5.5"
|
||||||
edit_rubric_after_updating
|
edit_rubric_after_updating
|
||||||
|
|
||||||
split_ratings(1)
|
split_ratings(1)
|
||||||
|
|
||||||
expect(ffj(".rubric .criterion:visible .rating .points")[1].text).to eq '3'
|
expect(ffj(".rubric .criterion:visible .rating .points")[1].text).to eq '3'
|
||||||
end
|
end
|
||||||
|
|
||||||
def should_pick_the_lower_value_when_splitting_without_room_for_an_integer
|
def should_pick_the_lower_value_when_splitting_without_room_for_an_integer
|
||||||
create_rubric_with_criterion_points "0.5"
|
create_rubric_with_criterion_points "0.5"
|
||||||
edit_rubric_after_updating
|
edit_rubric_after_updating
|
||||||
|
|
||||||
|
@ -96,9 +97,9 @@ def should_pick_the_lower_value_when_splitting_without_room_for_an_integer
|
||||||
|
|
||||||
expect(ffj(".rubric .criterion:visible .rating .points").count).to eq 3
|
expect(ffj(".rubric .criterion:visible .rating .points").count).to eq 3
|
||||||
expect(ffj(".rubric .criterion:visible .rating .points")[1].text).to eq '0'
|
expect(ffj(".rubric .criterion:visible .rating .points")[1].text).to eq '0'
|
||||||
end
|
end
|
||||||
|
|
||||||
def import_outcome
|
def import_outcome
|
||||||
f('#right-side .edit_rubric_link').click
|
f('#right-side .edit_rubric_link').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
f('.rubric.editing tr.criterion .delete_criterion_link').click
|
f('.rubric.editing tr.criterion .delete_criterion_link').click
|
||||||
|
@ -110,4 +111,5 @@ def import_outcome
|
||||||
f('.ui-dialog .btn-primary').click
|
f('.ui-dialog .btn-primary').click
|
||||||
accept_alert
|
accept_alert
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,6 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
|
module SchedulerCommon
|
||||||
def fill_out_appointment_group_form(new_appointment_text, opts = {})
|
def fill_out_appointment_group_form(new_appointment_text, opts = {})
|
||||||
f('.create_link').click
|
f('.create_link').click
|
||||||
edit_form = f('#edit_appointment_form')
|
edit_form = f('#edit_appointment_form')
|
||||||
|
@ -96,4 +97,4 @@ require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
click_al_option('.edit_link')
|
click_al_option('.edit_link')
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -1,30 +0,0 @@
|
||||||
def add_user (opts={})
|
|
||||||
f(".add_user_link").click
|
|
||||||
name = opts[:name] ? opts[:name] : "user1"
|
|
||||||
email = opts[:email] ? opts[:email] : "user1@test.com"
|
|
||||||
sortable_name = opts[:sortable_name] ? opts[:sortable_name] : name
|
|
||||||
confirmation = opts[:confirmation] ? opts[:confirmation] : 1
|
|
||||||
short_name = opts[:short_name] ? opts[:short_name] : name
|
|
||||||
if (!short_name.eql? name)
|
|
||||||
replace_content f("#user_short_name"), short_name
|
|
||||||
end
|
|
||||||
|
|
||||||
if (!sortable_name.eql? name)
|
|
||||||
replace_content f("#user_sortable_name"), sortable_name
|
|
||||||
end
|
|
||||||
expect(is_checked("#pseudonym_send_confirmation")).to be_truthy
|
|
||||||
if (confirmation == 0)
|
|
||||||
f("#pseudonym_send_confirmation").click
|
|
||||||
expect(is_checked("#pseudonym_send_confirmation")).to be_falsey
|
|
||||||
end
|
|
||||||
f("#add_user_form #user_name").send_keys name
|
|
||||||
f("#pseudonym_unique_id").send_keys email
|
|
||||||
submit_form("#add_user_form")
|
|
||||||
wait_for_ajax_requests
|
|
||||||
user = User.where(:name => name).first
|
|
||||||
expect(user).to be_present
|
|
||||||
expect(user.sortable_name).to eq sortable_name
|
|
||||||
expect(user.short_name).to eq short_name
|
|
||||||
expect(user.email).to eq email
|
|
||||||
user
|
|
||||||
end
|
|
|
@ -1,28 +1,29 @@
|
||||||
def getpseudonym(user_sis_id)
|
module SisGradePassbackCommon
|
||||||
|
def getpseudonym(user_sis_id)
|
||||||
pseudo = Pseudonym.where(sis_user_id: user_sis_id).first
|
pseudo = Pseudonym.where(sis_user_id: user_sis_id).first
|
||||||
expect(pseudo).not_to be_nil
|
expect(pseudo).not_to be_nil
|
||||||
pseudo
|
pseudo
|
||||||
end
|
end
|
||||||
|
|
||||||
def getuser(user_sis_id)
|
def getuser(user_sis_id)
|
||||||
user = getpseudonym(user_sis_id).user
|
user = getpseudonym(user_sis_id).user
|
||||||
expect(user).not_to be_nil
|
expect(user).not_to be_nil
|
||||||
user
|
user
|
||||||
end
|
end
|
||||||
|
|
||||||
def getsection(section_sis_id)
|
def getsection(section_sis_id)
|
||||||
section = CourseSection.where(sis_source_id: section_sis_id).first
|
section = CourseSection.where(sis_source_id: section_sis_id).first
|
||||||
expect(section).not_to be_nil
|
expect(section).not_to be_nil
|
||||||
section
|
section
|
||||||
end
|
end
|
||||||
|
|
||||||
def getenroll(user_sis_id, section_sis_id)
|
def getenroll(user_sis_id, section_sis_id)
|
||||||
e = Enrollment.where(user_id: getuser(user_sis_id).id, course_section_id: getsection(section_sis_id).id).first
|
e = Enrollment.where(user_id: getuser(user_sis_id).id, course_section_id: getsection(section_sis_id).id).first
|
||||||
expect(e).not_to be_nil
|
expect(e).not_to be_nil
|
||||||
e
|
e
|
||||||
end
|
end
|
||||||
|
|
||||||
def grade_passback_setup(wait_for_success)
|
def grade_passback_setup(wait_for_success)
|
||||||
process_csv_data_cleanly(
|
process_csv_data_cleanly(
|
||||||
"user_id,login_id,password,first_name,last_name,email,status",
|
"user_id,login_id,password,first_name,last_name,email,status",
|
||||||
"T1,Teacher1,,T,1,t1@example.com,active",
|
"T1,Teacher1,,T,1,t1@example.com,active",
|
||||||
|
@ -31,10 +32,12 @@ def grade_passback_setup(wait_for_success)
|
||||||
"S3,Student3,,S,3,s3@example.com,active",
|
"S3,Student3,,S,3,s3@example.com,active",
|
||||||
"S4,Student4,,S,4,s4@example.com,active",
|
"S4,Student4,,S,4,s4@example.com,active",
|
||||||
"S5,Student5,,S,5,s5@example.com,active",
|
"S5,Student5,,S,5,s5@example.com,active",
|
||||||
"S6,Student6,,S,6,s6@example.com,active")
|
"S6,Student6,,S,6,s6@example.com,active"
|
||||||
|
)
|
||||||
process_csv_data_cleanly(
|
process_csv_data_cleanly(
|
||||||
"course_id,short_name,long_name,account_id,term_id,status",
|
"course_id,short_name,long_name,account_id,term_id,status",
|
||||||
"C1,C1,C1,,,active")
|
"C1,C1,C1,,,active"
|
||||||
|
)
|
||||||
@course = Course.where(sis_source_id: "C1").first
|
@course = Course.where(sis_source_id: "C1").first
|
||||||
@course.assignment_groups.create(:name => "Assignments")
|
@course.assignment_groups.create(:name => "Assignments")
|
||||||
@teacher = getuser("T1")
|
@teacher = getuser("T1")
|
||||||
|
@ -43,7 +46,8 @@ def grade_passback_setup(wait_for_success)
|
||||||
"S1,C1,S1,active,,",
|
"S1,C1,S1,active,,",
|
||||||
"S2,C1,S2,active,,",
|
"S2,C1,S2,active,,",
|
||||||
"S3,C1,S3,active,,",
|
"S3,C1,S3,active,,",
|
||||||
"S4,C1,S4,active,,")
|
"S4,C1,S4,active,,"
|
||||||
|
)
|
||||||
process_csv_data_cleanly(
|
process_csv_data_cleanly(
|
||||||
"course_id,user_id,role,section_id,status",
|
"course_id,user_id,role,section_id,status",
|
||||||
",T1,teacher,S1,active",
|
",T1,teacher,S1,active",
|
||||||
|
@ -52,7 +56,8 @@ def grade_passback_setup(wait_for_success)
|
||||||
",S3,student,S2,active",
|
",S3,student,S2,active",
|
||||||
",S4,student,S1,active",
|
",S4,student,S1,active",
|
||||||
",S5,student,S3,active",
|
",S5,student,S3,active",
|
||||||
",S6,student,S4,active")
|
",S6,student,S4,active"
|
||||||
|
)
|
||||||
a1 = @course.assignments.create!(:title => "A1", :points_possible => 10)
|
a1 = @course.assignments.create!(:title => "A1", :points_possible => 10)
|
||||||
a2 = @course.assignments.create!(:title => "A2", :points_possible => 10)
|
a2 = @course.assignments.create!(:title => "A2", :points_possible => 10)
|
||||||
|
|
||||||
|
@ -113,17 +118,17 @@ def grade_passback_setup(wait_for_success)
|
||||||
expect(f("#publish_grades_messages").text).to eq "Unpublished - 6"
|
expect(f("#publish_grades_messages").text).to eq "Unpublished - 6"
|
||||||
driver.execute_script "window.confirm = function(msg) { return true; }"
|
driver.execute_script "window.confirm = function(msg) { return true; }"
|
||||||
|
|
||||||
csv =
|
csv = "publisher_id,publisher_sis_id,section_id,section_sis_id,student_id," \
|
||||||
"publisher_id,publisher_sis_id,section_id,section_sis_id,student_id," +
|
"student_sis_id,enrollment_id,enrollment_status,score,grade\n" \
|
||||||
"student_sis_id,enrollment_id,enrollment_status,score,grade\n" +
|
"#{@teacher.id},T1,#{getsection('S1').id},S1,#{getpseudonym('S1').user.id},S1,#{getenroll('S1', 'S1').id},active,70,C-\n" \
|
||||||
"#{@teacher.id},T1,#{getsection('S1').id},S1,#{getpseudonym('S1').user.id},S1,#{getenroll("S1", "S1").id},active,70,C-\n" +
|
"#{@teacher.id},T1,#{getsection('S2').id},S2,#{getpseudonym('S2').user.id},S2,#{getenroll('S2', 'S2').id},active,75,C\n" \
|
||||||
"#{@teacher.id},T1,#{getsection('S2').id},S2,#{getpseudonym('S2').user.id},S2,#{getenroll("S2", "S2").id},active,75,C\n" +
|
"#{@teacher.id},T1,#{getsection('S2').id},S2,#{getpseudonym('S3').user.id},S3,#{getenroll('S3', 'S2').id},active,80,B-\n" \
|
||||||
"#{@teacher.id},T1,#{getsection('S2').id},S2,#{getpseudonym('S3').user.id},S3,#{getenroll("S3", "S2").id},active,80,B-\n" +
|
"#{@teacher.id},T1,#{getsection('S1').id},S1,#{getpseudonym('S4').user.id},S4,#{getenroll('S4', 'S1').id},active,0,F\n" \
|
||||||
"#{@teacher.id},T1,#{getsection('S1').id},S1,#{getpseudonym('S4').user.id},S4,#{getenroll("S4", "S1").id},active,0,F\n" +
|
"#{@teacher.id},T1,#{getsection('S3').id},S3,#{@stud5.id},,#{Enrollment.where(user_id: @stud5.user.id, course_section_id: getsection('S3').first.id).id},active,85,B\n" \
|
||||||
"#{@teacher.id},T1,#{getsection('S3').id},S3,#{@stud5.id},,#{Enrollment.where(user_id: @stud5.user.id, course_section_id: getsection("S3").first.id).id},active,85,B\n" +
|
|
||||||
"#{@teacher.id},T1,#{@sec4.id},,#{@stud6.id},,#{Enrollment.where(user_id: @stud6.user.id, course_section_id: @sec4.id).first.id},active,90,A-\n"
|
"#{@teacher.id},T1,#{@sec4.id},,#{@stud6.id},,#{Enrollment.where(user_id: @stud6.user.id, course_section_id: @sec4.id).first.id},active,90,A-\n"
|
||||||
SSLCommon.expects(:post_data).with("http://localhost/endpoint", csv, "text/csv", {})
|
SSLCommon.expects(:post_data).with("http://localhost/endpoint", csv, "text/csv", {})
|
||||||
f("#publish_grades_link").click
|
f("#publish_grades_link").click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(f("#publish_grades_messages").text).to eq(wait_for_success ? "Publishing - 6" : "Published - 6")
|
expect(f("#publish_grades_messages").text).to eq(wait_for_success ? "Publishing - 6" : "Published - 6")
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,24 +1,25 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
def student_submission(options = {})
|
module SpeedGraderCommon
|
||||||
|
def student_submission(options = {})
|
||||||
submission_model({:assignment => @assignment, :body => "first student submission text"}.merge(options))
|
submission_model({:assignment => @assignment, :body => "first student submission text"}.merge(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
def goto_section(section_id)
|
def goto_section(section_id)
|
||||||
f("#combo_box_container .ui-selectmenu-icon").click
|
f("#combo_box_container .ui-selectmenu-icon").click
|
||||||
driver.execute_script("$('#section-menu-link').trigger('mouseenter')")
|
driver.execute_script("$('#section-menu-link').trigger('mouseenter')")
|
||||||
f("#section-menu .section_#{section_id}").click
|
f("#section-menu .section_#{section_id}").click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_turnitin_asset(asset, asset_data)
|
def set_turnitin_asset(asset, asset_data)
|
||||||
@submission.turnitin_data ||= {}
|
@submission.turnitin_data ||= {}
|
||||||
@submission.turnitin_data[asset.asset_string] = asset_data
|
@submission.turnitin_data[asset.asset_string] = asset_data
|
||||||
@submission.turnitin_data_changed!
|
@submission.turnitin_data_changed!
|
||||||
@submission.save!
|
@submission.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_and_enroll_students(num_to_create)
|
def create_and_enroll_students(num_to_create)
|
||||||
@students = []
|
@students = []
|
||||||
num_to_create.times do |i|
|
num_to_create.times do |i|
|
||||||
s = User.create!(:name => "student #{i}")
|
s = User.create!(:name => "student #{i}")
|
||||||
|
@ -26,22 +27,22 @@ def create_and_enroll_students(num_to_create)
|
||||||
@students << s
|
@students << s
|
||||||
end
|
end
|
||||||
@students
|
@students
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_attachment_student_assignment(file, student, path)
|
def add_attachment_student_assignment(_file, student, path)
|
||||||
attachment = student.attachments.new
|
attachment = student.attachments.new
|
||||||
attachment.uploaded_data = Rack::Test::UploadedFile.new(path, Attachment.mimetype(path))
|
attachment.uploaded_data = Rack::Test::UploadedFile.new(path, Attachment.mimetype(path))
|
||||||
attachment.save!
|
attachment.save!
|
||||||
@assignment.submit_homework(student, :submission_type => :online_upload, :attachments => [attachment])
|
@assignment.submit_homework(student, :submission_type => :online_upload, :attachments => [attachment])
|
||||||
end
|
end
|
||||||
|
|
||||||
def submit_and_grade_homework(student, grade)
|
def submit_and_grade_homework(student, grade)
|
||||||
@assignment.submit_homework(student)
|
@assignment.submit_homework(student)
|
||||||
@assignment.grade_student(student, :grade => grade)
|
@assignment.grade_student(student, :grade => grade)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Creates a dummy rubric and scores its criteria as specified in the parameters (passed as strings)
|
# Creates a dummy rubric and scores its criteria as specified in the parameters (passed as strings)
|
||||||
def setup_and_grade_rubric(score1, score2)
|
def setup_and_grade_rubric(score1, score2)
|
||||||
student_submission
|
student_submission
|
||||||
@association.save!
|
@association.save!
|
||||||
|
|
||||||
|
@ -55,9 +56,9 @@ def setup_and_grade_rubric(score1, score2)
|
||||||
rubric_inputs = rubric.find_elements(:css, 'input.criterion_points')
|
rubric_inputs = rubric.find_elements(:css, 'input.criterion_points')
|
||||||
rubric_inputs[0].send_keys(score1)
|
rubric_inputs[0].send_keys(score1)
|
||||||
rubric_inputs[1].send_keys(score2)
|
rubric_inputs[1].send_keys(score2)
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_grade_and_validate
|
def clear_grade_and_validate
|
||||||
@assignment.grade_student @students[0], {grade: ''}
|
@assignment.grade_student @students[0], {grade: ''}
|
||||||
@assignment.grade_student @students[1], {grade: ''}
|
@assignment.grade_student @students[1], {grade: ''}
|
||||||
|
|
||||||
|
@ -65,4 +66,5 @@ def clear_grade_and_validate
|
||||||
expect(f('#grading-box-extended').attribute 'value').to eq ''
|
expect(f('#grading-box-extended').attribute 'value').to eq ''
|
||||||
f('a.next').click
|
f('a.next').click
|
||||||
expect(f('#grading-box-extended').attribute 'value').to eq ''
|
expect(f('#grading-box-extended').attribute 'value').to eq ''
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,6 +1,7 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
def create_assignment(type = 'online_text_entry')
|
module SubmissionsCommon
|
||||||
|
def create_assignment(type = 'online_text_entry')
|
||||||
assignment = @course.assignments.build({
|
assignment = @course.assignments.build({
|
||||||
:name => 'media assignment',
|
:name => 'media assignment',
|
||||||
:submission_types => type
|
:submission_types => type
|
||||||
|
@ -8,21 +9,21 @@ def create_assignment(type = 'online_text_entry')
|
||||||
assignment.workflow_state = 'published'
|
assignment.workflow_state = 'published'
|
||||||
assignment.save!
|
assignment.save!
|
||||||
assignment
|
assignment
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_assignment_and_go_to_page(type = 'online_text_entry')
|
def create_assignment_and_go_to_page(type = 'online_text_entry')
|
||||||
assignment = create_assignment type
|
assignment = create_assignment type
|
||||||
get "/courses/#{@course.id}/assignments/#{assignment.id}"
|
get "/courses/#{@course.id}/assignments/#{assignment.id}"
|
||||||
assignment
|
assignment
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_media_comment_dialog
|
def open_media_comment_dialog
|
||||||
f('.media_comment_link').click
|
f('.media_comment_link').click
|
||||||
# swf and stuff loads, give it a sec to do its thing
|
# swf and stuff loads, give it a sec to do its thing
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
def submit_media_comment_1
|
def submit_media_comment_1
|
||||||
open_media_comment_dialog
|
open_media_comment_dialog
|
||||||
# pretend like we are flash sending data to the JS
|
# pretend like we are flash sending data to the JS
|
||||||
driver.execute_script <<-JS
|
driver.execute_script <<-JS
|
||||||
|
@ -30,14 +31,14 @@ def submit_media_comment_1
|
||||||
addEntryComplete(entries1)
|
addEntryComplete(entries1)
|
||||||
JS
|
JS
|
||||||
wait_for_ajax_requests
|
wait_for_ajax_requests
|
||||||
end
|
end
|
||||||
|
|
||||||
def submit_media_comment_2
|
def submit_media_comment_2
|
||||||
open_media_comment_dialog
|
open_media_comment_dialog
|
||||||
driver.execute_script <<-JS
|
driver.execute_script <<-JS
|
||||||
var entries2 = [{"duration":1.829,"thumbnailUrl":"http://www.instructuremedia.com/p/100/sp/10000/thumbnail/entry_id/0_5hcd9mro/version/0","numComments":-1,"status":1,"rank":-1,"userScreenName":"_100_1_1","displayCredit":"_100_1_1","partnerLandingPage":null,"dataUrl":"http://www.instructuremedia.com/p/100/sp/10000/flvclipper/entry_id/0_5hcd9mro/version/100000","sourceLink":"","subpId":10000,"puserId":"1_1","views":0,"height":0,"description":null,"hasThumbnail":false,"width":0,"kshowId":"0_pb7id2lf","kuserId":"","userLandingPage":"","mediaType":2,"plays":0,"partnerId":100,"adminTags":"","entryVersion":"","downloadUrl":"http://www.instructuremedia.com/p/100/sp/10000/raw/entry_id/0_5hcd9mro/version/100000","createdAtDate":"1970-01-16T09:24:03.563Z","votes":-1,"uploaderName":null,"tags":"","entryName":"ryanf@instructure.com 2012-02-21T16:59:11.249Z","entryType":1,"entryId":"0_5hcd9mro","createdAtAsInt":1329843563,"uid":"22A2C625-5FAB-AF3A-1A76-A0DA7572BFE4"}]
|
var entries2 = [{"duration":1.829,"thumbnailUrl":"http://www.instructuremedia.com/p/100/sp/10000/thumbnail/entry_id/0_5hcd9mro/version/0","numComments":-1,"status":1,"rank":-1,"userScreenName":"_100_1_1","displayCredit":"_100_1_1","partnerLandingPage":null,"dataUrl":"http://www.instructuremedia.com/p/100/sp/10000/flvclipper/entry_id/0_5hcd9mro/version/100000","sourceLink":"","subpId":10000,"puserId":"1_1","views":0,"height":0,"description":null,"hasThumbnail":false,"width":0,"kshowId":"0_pb7id2lf","kuserId":"","userLandingPage":"","mediaType":2,"plays":0,"partnerId":100,"adminTags":"","entryVersion":"","downloadUrl":"http://www.instructuremedia.com/p/100/sp/10000/raw/entry_id/0_5hcd9mro/version/100000","createdAtDate":"1970-01-16T09:24:03.563Z","votes":-1,"uploaderName":null,"tags":"","entryName":"ryanf@instructure.com 2012-02-21T16:59:11.249Z","entryType":1,"entryId":"0_5hcd9mro","createdAtAsInt":1329843563,"uid":"22A2C625-5FAB-AF3A-1A76-A0DA7572BFE4"}]
|
||||||
addEntryComplete(entries2)
|
addEntryComplete(entries2)
|
||||||
JS
|
JS
|
||||||
wait_for_ajax_requests
|
wait_for_ajax_requests
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,164 +1,164 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
def open_theme_editor_with_btn
|
module ThemeEditorCommon
|
||||||
|
def open_theme_editor_with_btn
|
||||||
fj('.btn.button-sidebar-wide').click
|
fj('.btn.button-sidebar-wide').click
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_theme_editor(account_id)
|
def open_theme_editor(account_id)
|
||||||
get "/accounts/#{account_id}/theme_editor"
|
get "/accounts/#{account_id}/theme_editor"
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# the close mechanism only works with beta and not with how it is in master
|
# the close mechanism only works with beta and not with how it is in master
|
||||||
def close_theme_editor
|
def close_theme_editor
|
||||||
fj('button:contains("Cancel")').click
|
fj('button:contains("Cancel")').click
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_template(template)
|
def select_template(template)
|
||||||
# "Canvas Default" "K12 Theme"
|
# "Canvas Default" "K12 Theme"
|
||||||
select_list = Selenium::WebDriver::Support::Select.new(fj('#sharedThemes'))
|
select_list = Selenium::WebDriver::Support::Select.new(fj('#sharedThemes'))
|
||||||
select_list.select_by(:text, template)
|
select_list.select_by(:text, template)
|
||||||
end
|
end
|
||||||
|
|
||||||
def apply_settings
|
def apply_settings
|
||||||
f('div.Theme__editor-header_actions > span').click
|
f('div.Theme__editor-header_actions > span').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
preview_your_changes
|
preview_your_changes
|
||||||
accept_alert
|
accept_alert
|
||||||
end
|
end
|
||||||
|
|
||||||
def preview_your_changes
|
def preview_your_changes
|
||||||
f('button.Button.Button--primary > span').click
|
f('button.Button.Button--primary > span').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def single_warning_message
|
def single_warning_message
|
||||||
f('.ic-Form-message--error')
|
f('.ic-Form-message--error')
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_warning_messages
|
def all_warning_messages
|
||||||
ff('.ic-Form-message--error')
|
ff('.ic-Form-message--error')
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_global_branding
|
def click_global_branding
|
||||||
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:first-child').click
|
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:first-child').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_global_navigation
|
def click_global_navigation
|
||||||
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:nth-of-type(2)').click
|
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:nth-of-type(2)').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
def click_watermarks_and_other_images
|
def click_watermarks_and_other_images
|
||||||
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:nth-of-type(3)').click
|
f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > h3:nth-of-type(3)').click
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
end
|
end
|
||||||
|
|
||||||
# finds a hex text input by its text label
|
# finds a hex text input by its text label
|
||||||
# i.e. 'Primary Color'
|
# i.e. 'Primary Color'
|
||||||
def find_theme_text_input(text_label)
|
def find_theme_text_input(text_label)
|
||||||
js_string =
|
js_string =
|
||||||
"$('label').filter(function(){return $(this).text() === '#{text_label}'}).siblings('.Theme__editor-color-block').find('.Theme__editor-color-block_input-text')"
|
"$('label').filter(function(){return $(this).text() === '#{text_label}'}).siblings('.Theme__editor-color-block').find('.Theme__editor-color-block_input-text')"
|
||||||
driver.execute_script(js_string)
|
driver.execute_script(js_string)
|
||||||
end
|
end
|
||||||
|
|
||||||
def primary_color(option = 'text_field')
|
def primary_color(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def primary_button(option = 'text_field')
|
def primary_button(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def primary_button_text(option = 'text_field')
|
def primary_button_text(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def secondary_button(option = 'text_field')
|
def secondary_button(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def secondary_button_text(option = 'text_field')
|
def secondary_button_text(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def link(option = 'text_field')
|
def link(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(1) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_background(option = 'text_field')
|
def nav_background(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:first-child > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_icon(option = 'text_field')
|
def nav_icon(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(2) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_icon_active(option = 'text_field')
|
def nav_icon_active(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(3) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_text(option = 'text_field')
|
def nav_text(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(4) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_text_active(option = 'text_field')
|
def nav_text_active(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(5) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_avatar_border(option = 'text_field')
|
def nav_avatar_border(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(6) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_badge(option = 'text_field')
|
def nav_badge(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(7) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(7) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(7) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(7) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def logo_background(option = 'text_field')
|
def logo_background(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(8) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(8) > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(8) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(2) > section:nth-of-type(8) > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
def window_title_color(option = 'text_field')
|
def window_title_color(option = 'text_field')
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(3) > section.Theme__editor-accordion_element.Theme__editor-color.ic-Form-control > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(3) > section.Theme__editor-accordion_element.Theme__editor-color.ic-Form-control > div.Theme__editor-form--color > div.Theme__editor-color-block > span > input.Theme__editor-color-block_input-text.Theme__editor-color-block_input') if option == 'text_field'
|
||||||
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(3) > section.Theme__editor-accordion_element.Theme__editor-color.ic-Form-control > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
return f('div.accordion.ui-accordion--mini.Theme__editor-accordion.ui-accordion.ui-widget.ui-helper-reset > div:nth-of-type(3) > section.Theme__editor-accordion_element.Theme__editor-color.ic-Form-control > div.Theme__editor-form--color > div.Theme__editor-color-block > label.Theme__editor-color-label.Theme__editor-color-block_label-sample') if option == 'color_box'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def all_global_branding(option = 'text_field')
|
||||||
def all_global_branding(option = 'text_field')
|
|
||||||
[primary_color(option), primary_button(option), primary_button_text(option), secondary_button(option), secondary_button_text(option), link(option)]
|
[primary_color(option), primary_button(option), primary_button_text(option), secondary_button(option), secondary_button_text(option), link(option)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_global_navigation(option = 'text_field')
|
def all_global_navigation(option = 'text_field')
|
||||||
[nav_background(option), nav_icon(option), nav_icon_active(option), nav_text(option), nav_text_active(option), nav_avatar_border(option), nav_badge(option), logo_background(option)]
|
[nav_background(option), nav_icon(option), nav_icon_active(option), nav_text(option), nav_text_active(option), nav_avatar_border(option), nav_badge(option), logo_background(option)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_watermarks(option = 'text_field')
|
def all_watermarks(option = 'text_field')
|
||||||
[window_title_color(option)]
|
[window_title_color(option)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_colors(array, color = 'random')
|
def all_colors(array, color = 'random')
|
||||||
array.each do |x|
|
array.each do |x|
|
||||||
x.send_keys(color) if color != 'random'
|
x.send_keys(color) if color != 'random'
|
||||||
x.send_keys(random_hex_color) if color == 'random'
|
x.send_keys(random_hex_color) if color == 'random'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_theme(color = 'random')
|
def create_theme(color = 'random')
|
||||||
click_global_branding
|
click_global_branding
|
||||||
all_colors(all_global_branding, color)
|
all_colors(all_global_branding, color)
|
||||||
|
|
||||||
|
@ -167,4 +167,5 @@ def create_theme(color = 'random')
|
||||||
|
|
||||||
click_watermarks_and_other_images
|
click_watermarks_and_other_images
|
||||||
all_colors(all_watermarks, color)
|
all_colors(all_watermarks, color)
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -0,0 +1,30 @@
|
||||||
|
module UsersCommon
|
||||||
|
def add_user(opts={})
|
||||||
|
f(".add_user_link").click
|
||||||
|
name = opts[:name] ? opts[:name] : "user1"
|
||||||
|
email = opts[:email] ? opts[:email] : "user1@test.com"
|
||||||
|
sortable_name = opts[:sortable_name] ? opts[:sortable_name] : name
|
||||||
|
confirmation = opts[:confirmation] ? opts[:confirmation] : 1
|
||||||
|
short_name = opts[:short_name] ? opts[:short_name] : name
|
||||||
|
|
||||||
|
replace_content f("#user_short_name"), short_name unless short_name.eql? name
|
||||||
|
|
||||||
|
replace_content f("#user_sortable_name"), sortable_name unless sortable_name.eql? name
|
||||||
|
|
||||||
|
expect(is_checked("#pseudonym_send_confirmation")).to be_truthy
|
||||||
|
if confirmation == 0
|
||||||
|
f("#pseudonym_send_confirmation").click
|
||||||
|
expect(is_checked("#pseudonym_send_confirmation")).to be_falsey
|
||||||
|
end
|
||||||
|
f("#add_user_form #user_name").send_keys name
|
||||||
|
f("#pseudonym_unique_id").send_keys email
|
||||||
|
submit_form("#add_user_form")
|
||||||
|
wait_for_ajax_requests
|
||||||
|
user = User.where(:name => name).first
|
||||||
|
expect(user).to be_present
|
||||||
|
expect(user.sortable_name).to eq sortable_name
|
||||||
|
expect(user.short_name).to eq short_name
|
||||||
|
expect(user.email).to eq email
|
||||||
|
user
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,5 +1,6 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
|
|
||||||
|
module WikiAndTinyCommon
|
||||||
def clear_wiki_rce
|
def clear_wiki_rce
|
||||||
wiki_page_body = driver.find_element(:css, 'textarea.body')
|
wiki_page_body = driver.find_element(:css, 'textarea.body')
|
||||||
wiki_page_body.clear
|
wiki_page_body.clear
|
||||||
|
@ -187,3 +188,4 @@ require File.expand_path(File.dirname(__FILE__) + '/../common')
|
||||||
f("[aria-label=\'#{button_aria}\'] .mce-open").click
|
f("[aria-label=\'#{button_aria}\'] .mce-open").click
|
||||||
f("div[data-mce-color=\'#{mce_color}\']").click
|
f("div[data-mce-color=\'#{mce_color}\']").click
|
||||||
end
|
end
|
||||||
|
end
|
|
@ -5,7 +5,7 @@ describe "student interactions report" do
|
||||||
|
|
||||||
context "as a student" do
|
context "as a student" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in(:active_all => true)
|
course_with_teacher_logged_in(:active_all => true)
|
||||||
@student1 = student_in_course(:active_all => true).user
|
@student1 = student_in_course(:active_all => true).user
|
||||||
@student2 = student_in_course(:active_all => true, :name => "zzz student").user
|
@student2 = student_in_course(:active_all => true, :name => "zzz student").user
|
||||||
|
@ -67,5 +67,5 @@ describe "student interactions report" do
|
||||||
wait_for_ajaximations
|
wait_for_ajaximations
|
||||||
expect(ths[5]).not_to have_class("header")
|
expect(ths[5]).not_to have_class("header")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -3,8 +3,9 @@ require 'thread'
|
||||||
|
|
||||||
describe "manage groups students" do
|
describe "manage groups students" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include ManageGroupsCommon
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
skip
|
skip
|
||||||
#course_with_teacher_logged_in
|
#course_with_teacher_logged_in
|
||||||
#Account.default.settings[:enable_manage_groups2] = false
|
#Account.default.settings[:enable_manage_groups2] = false
|
||||||
|
|
|
@ -3,8 +3,9 @@ require 'thread'
|
||||||
|
|
||||||
describe "manage groups" do
|
describe "manage groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include ManageGroupsCommon
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,16 @@ require 'thread'
|
||||||
|
|
||||||
describe "manage groups" do
|
describe "manage groups" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include GroupsCommon
|
||||||
|
include ManageGroupsCommon
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Remove this whole section after new UI becomes default
|
# TODO: Remove this whole section after new UI becomes default
|
||||||
context "with old UI" do
|
context "with old UI" do
|
||||||
before :each do
|
before(:each) do
|
||||||
#TODO: Remove this setting once made the default behavior
|
#TODO: Remove this setting once made the default behavior
|
||||||
account = Account.default
|
account = Account.default
|
||||||
account.settings[:enable_manage_groups2] = false
|
account.settings[:enable_manage_groups2] = false
|
||||||
|
|
|
@ -2,11 +2,13 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/outcome_common')
|
||||||
|
|
||||||
describe "outcomes" do
|
describe "outcomes" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
let(:who_to_login) { 'teacher' }
|
let(:who_to_login) { 'teacher' }
|
||||||
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
||||||
|
|
||||||
describe "course outcomes" do
|
describe "course outcomes" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/outcome_common')
|
||||||
|
|
||||||
describe "outcomes as a student" do
|
describe "outcomes as a student" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
let(:who_to_login) { 'student' }
|
let(:who_to_login) { 'student' }
|
||||||
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/outcome_common')
|
||||||
|
|
||||||
describe "outcomes as a teacher" do
|
describe "outcomes as a teacher" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include OutcomeCommon
|
||||||
|
|
||||||
let(:who_to_login) { 'teacher' }
|
let(:who_to_login) { 'teacher' }
|
||||||
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
let(:outcome_url) { "/courses/#{@course.id}/outcomes" }
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ require_relative "../helpers/quiz_questions_common"
|
||||||
|
|
||||||
describe 'taking a quiz one question at a time' do
|
describe 'taking a quiz one question at a time' do
|
||||||
include_context 'in-process server selenium tests'
|
include_context 'in-process server selenium tests'
|
||||||
include_context 'quiz question selenium tests'
|
include QuizQuestionsCommon
|
||||||
|
|
||||||
before(:each) do
|
before(:once) do
|
||||||
create_oqaat_quiz(publish: true)
|
create_oqaat_quiz(publish: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ describe 'taking a quiz one question at a time' do
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@quiz.update_attribute(:cant_go_back, false)
|
@quiz.update_attribute(:cant_go_back, false)
|
||||||
take_the_quiz
|
begin_quiz
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'allows going back to previous questions', priority: "1", test_id: 140611 do
|
it 'allows going back to previous questions', priority: "1", test_id: 140611 do
|
||||||
|
|
|
@ -7,7 +7,6 @@ describe 'drag and drop reordering' do
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
@last_quiz = start_quiz_question
|
|
||||||
resize_screen_to_normal
|
resize_screen_to_normal
|
||||||
quiz_with_new_questions
|
quiz_with_new_questions
|
||||||
create_question_group
|
create_question_group
|
||||||
|
@ -26,9 +25,11 @@ describe 'drag and drop reordering' do
|
||||||
|
|
||||||
it 'should add questions to a group', priority: "1", test_id: 140588 do
|
it 'should add questions to a group', priority: "1", test_id: 140588 do
|
||||||
resize_screen_to_default
|
resize_screen_to_default
|
||||||
# drag it into the group
|
create_question_group
|
||||||
click_questions_tab
|
drag_question_into_group(@quest1.id, @group.id)
|
||||||
drag_question_into_group @quest1.id, @group.id
|
drag_question_into_group(@quest2.id, @group.id)
|
||||||
|
click_save_settings_button
|
||||||
|
|
||||||
refresh_page
|
refresh_page
|
||||||
group_should_contain_question(@group, @quest1)
|
group_should_contain_question(@group, @quest1)
|
||||||
end
|
end
|
||||||
|
@ -45,6 +46,7 @@ describe 'drag and drop reordering' do
|
||||||
|
|
||||||
it 'should reorder questions within a group', priority: "1", test_id: 201952 do
|
it 'should reorder questions within a group', priority: "1", test_id: 201952 do
|
||||||
resize_screen_to_default
|
resize_screen_to_default
|
||||||
|
create_question_group
|
||||||
drag_question_into_group @quest1.id, @group.id
|
drag_question_into_group @quest1.id, @group.id
|
||||||
drag_question_into_group @quest2.id, @group.id
|
drag_question_into_group @quest2.id, @group.id
|
||||||
data = get_question_data_for_group @group.id
|
data = get_question_data_for_group @group.id
|
||||||
|
@ -60,7 +62,6 @@ describe 'drag and drop reordering' do
|
||||||
|
|
||||||
it 'should reorder groups and questions', priority: "1", test_id: 206020 do
|
it 'should reorder groups and questions', priority: "1", test_id: 206020 do
|
||||||
click_questions_tab
|
click_questions_tab
|
||||||
|
|
||||||
old_data = get_question_data
|
old_data = get_question_data
|
||||||
drag_group_to_top @group.id
|
drag_group_to_top @group.id
|
||||||
refresh_page
|
refresh_page
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/helpers/rubrics_common')
|
require File.expand_path(File.dirname(__FILE__) + '/helpers/rubrics_common')
|
||||||
|
|
||||||
|
|
||||||
describe "teacher shared rubric specs" do
|
describe "teacher shared rubric specs" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include RubricsCommon
|
||||||
|
|
||||||
let(:rubric_url) { "/courses/#{@course.id}/rubrics" }
|
let(:rubric_url) { "/courses/#{@course.id}/rubrics" }
|
||||||
let(:who_to_login) { 'teacher' }
|
let(:who_to_login) { 'teacher' }
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
resize_screen_to_normal
|
resize_screen_to_normal
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
@ -39,6 +40,7 @@ end
|
||||||
|
|
||||||
describe "course rubrics" do
|
describe "course rubrics" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include RubricsCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/gradebook2_common')
|
||||||
describe "speed grader" do
|
describe "speed grader" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include SpeedGraderCommon
|
||||||
|
|
||||||
before(:once) do
|
before(:once) do
|
||||||
stub_kaltura
|
stub_kaltura
|
||||||
|
|
|
@ -9,6 +9,9 @@ describe 'Speedgrader' do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include QuizzesCommon
|
include QuizzesCommon
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include GroupsCommon
|
||||||
|
include AssignmentsCommon
|
||||||
|
include SpeedGraderCommon
|
||||||
|
|
||||||
let(:rubric_data) do
|
let(:rubric_data) do
|
||||||
[
|
[
|
||||||
|
|
|
@ -7,6 +7,7 @@ describe "speed grader" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include QuizzesCommon
|
include QuizzesCommon
|
||||||
include Gradebook2Common
|
include Gradebook2Common
|
||||||
|
include SpeedGraderCommon
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
stub_kaltura
|
stub_kaltura
|
||||||
|
|
|
@ -2,8 +2,9 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/speed_grader_common'
|
||||||
|
|
||||||
describe "speed grader submissions" do
|
describe "speed grader submissions" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include SpeedGraderCommon
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
stub_kaltura
|
stub_kaltura
|
||||||
|
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
|
|
|
@ -3,6 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/assignments_common')
|
||||||
|
|
||||||
describe "assignments" do
|
describe "assignments" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include AssignmentsCommon
|
||||||
|
|
||||||
def click_away_accept_alert
|
def click_away_accept_alert
|
||||||
f('#section-tabs .home').click
|
f('#section-tabs .home').click
|
||||||
|
@ -16,7 +17,7 @@ describe "assignments" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "as a student" do
|
context "as a student" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_student_logged_in
|
course_with_student_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -78,5 +79,4 @@ describe "assignments" do
|
||||||
expect(f('#tool_content')).to be_displayed
|
expect(f('#tool_content')).to be_displayed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -5,6 +5,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/color_common')
|
||||||
describe 'Theme Editor' do
|
describe 'Theme Editor' do
|
||||||
include_context 'in-process server selenium tests'
|
include_context 'in-process server selenium tests'
|
||||||
include ColorCommon
|
include ColorCommon
|
||||||
|
include ThemeEditorCommon
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
course_with_admin_logged_in
|
course_with_admin_logged_in
|
||||||
|
|
|
@ -3,6 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Tiny MCE editor functions" do
|
describe "Tiny MCE editor functions" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Tiny MCE editor plugins" do
|
describe "Tiny MCE editor plugins" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
it "should load all folders for the image plugin", priority: "1", test_id: 420486 do
|
it "should load all folders for the image plugin", priority: "1", test_id: 420486 do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
|
|
|
@ -2,9 +2,10 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "wiki and tiny files as a student" do
|
context "wiki and tiny files as a student" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course(:active_all => true, :name => 'wiki course')
|
course(:active_all => true, :name => 'wiki course')
|
||||||
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
||||||
@teacher = user_with_pseudonym(:active_user => true, :username => 'teacher@example.com', :name => 'teacher@example.com', :password => 'asdfasdf')
|
@teacher = user_with_pseudonym(:active_user => true, :username => 'teacher@example.com', :name => 'teacher@example.com', :password => 'asdfasdf')
|
||||||
|
@ -25,7 +26,7 @@ describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "wiki sidebar files and locking/hiding" do
|
context "wiki sidebar files and locking/hiding" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher(:active_all => true, :name => 'wiki course')
|
course_with_teacher(:active_all => true, :name => 'wiki course')
|
||||||
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
||||||
@course.enroll_student(@student).accept
|
@course.enroll_student(@student).accept
|
||||||
|
@ -119,7 +120,7 @@ describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "wiki sidebar images and locking/hiding" do
|
context "wiki sidebar images and locking/hiding" do
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher(:active_all => true, :name => 'wiki course')
|
course_with_teacher(:active_all => true, :name => 'wiki course')
|
||||||
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
||||||
@course.enroll_student(@student).accept
|
@course.enroll_student(@student).accept
|
||||||
|
|
|
@ -2,10 +2,11 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor Images" do
|
describe "Wiki pages and Tiny WYSIWYG editor Images" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "wiki and tiny images as a student" do
|
context "wiki and tiny images as a student" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course(:active_all => true, :name => 'wiki course')
|
course(:active_all => true, :name => 'wiki course')
|
||||||
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
@student = user_with_pseudonym(:active_user => true, :username => 'student@example.com', :name => 'student@example.com', :password => 'asdfasdf')
|
||||||
@teacher = user_with_pseudonym(:active_user => true, :username => 'teacher@example.com', :name => 'teacher@example.com', :password => 'asdfasdf')
|
@teacher = user_with_pseudonym(:active_user => true, :username => 'teacher@example.com', :name => 'teacher@example.com', :password => 'asdfasdf')
|
||||||
|
|
|
@ -2,6 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor" do
|
describe "Wiki pages and Tiny WYSIWYG editor" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "as a student" do
|
context "as a student" do
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,11 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
describe "Wiki pages and Tiny WYSIWYG editor Files" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "wiki and tiny files as a teacher" do
|
context "wiki and tiny files as a teacher" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_relative "helpers/quizzes_common"
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor Images" do
|
describe "Wiki pages and Tiny WYSIWYG editor Images" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include QuizzesCommon
|
include QuizzesCommon
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "wiki and tiny images as a teacher" do
|
context "wiki and tiny images as a teacher" do
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,11 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor" do
|
describe "Wiki pages and Tiny WYSIWYG editor" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "as a teacher" do
|
context "as a teacher" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/wiki_and_tiny_common
|
||||||
|
|
||||||
describe "Wiki pages and Tiny WYSIWYG editor features" do
|
describe "Wiki pages and Tiny WYSIWYG editor features" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
equation_button_selector = "div[aria-label='Insert Math Equation'] button"
|
equation_button_selector = "div[aria-label='Insert Math Equation'] button"
|
||||||
|
|
||||||
context "WYSIWYG generic as a teacher" do
|
context "WYSIWYG generic as a teacher" do
|
||||||
|
|
||||||
before (:each) do
|
before(:each) do
|
||||||
course_with_teacher_logged_in
|
course_with_teacher_logged_in
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ require File.expand_path(File.dirname(__FILE__) + '/helpers/files_common')
|
||||||
describe "Wiki Pages" do
|
describe "Wiki Pages" do
|
||||||
include_context "in-process server selenium tests"
|
include_context "in-process server selenium tests"
|
||||||
include FilesCommon
|
include FilesCommon
|
||||||
|
include WikiAndTinyCommon
|
||||||
|
|
||||||
context "Navigation" do
|
context "Navigation" do
|
||||||
before do
|
before do
|
||||||
|
|
Loading…
Reference in New Issue