diff --git a/Gemfile.lock b/Gemfile.lock index b8e3e9d9a9f25fc15cb662d2df668660a1659028..cd985fdaf5630a184069f03ad40116d8c2385b3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,60 +20,60 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + actioncable (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailbox (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (>= 2.7.1) - actionmailer (6.1.4.4) - actionpack (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailer (6.1.4.6) + actionpack (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.4) - actionview (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionpack (6.1.4.6) + actionview (= 6.1.4.6) + activesupport (= 6.1.4.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.4) - actionpack (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actiontext (6.1.4.6) + actionpack (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) nokogiri (>= 1.8.5) - actionview (6.1.4.4) - activesupport (= 6.1.4.4) + actionview (6.1.4.6) + activesupport (= 6.1.4.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.4) - activesupport (= 6.1.4.4) + activejob (6.1.4.6) + activesupport (= 6.1.4.6) globalid (>= 0.3.6) - activemodel (6.1.4.4) - activesupport (= 6.1.4.4) - activerecord (6.1.4.4) - activemodel (= 6.1.4.4) - activesupport (= 6.1.4.4) - activestorage (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activesupport (= 6.1.4.4) + activemodel (6.1.4.6) + activesupport (= 6.1.4.6) + activerecord (6.1.4.6) + activemodel (= 6.1.4.6) + activesupport (= 6.1.4.6) + activestorage (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activesupport (= 6.1.4.6) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.4) + activesupport (6.1.4.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -87,7 +87,7 @@ GEM autoprefixer-rails (10.4.2.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.553.0) + aws-partitions (1.554.0) aws-sdk-core (3.126.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) @@ -139,7 +139,7 @@ GEM countries (~> 4.2) sort_alphabetical (~> 1.1) crass (1.0.6) - curation (1.7) + curation (1.8) metainspector nokogiri delayed_job (4.1.10) @@ -253,7 +253,7 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -291,7 +291,7 @@ GEM pg (1.3.1) popper_js (2.9.3) public_suffix (4.0.6) - puma (5.6.1) + puma (5.6.2) nio4r (~> 2.0) racc (1.6.0) rack (2.2.3) @@ -301,32 +301,32 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.4) - actioncable (= 6.1.4.4) - actionmailbox (= 6.1.4.4) - actionmailer (= 6.1.4.4) - actionpack (= 6.1.4.4) - actiontext (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activemodel (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + rails (6.1.4.6) + actioncable (= 6.1.4.6) + actionmailbox (= 6.1.4.6) + actionmailer (= 6.1.4.6) + actionpack (= 6.1.4.6) + actiontext (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activemodel (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) bundler (>= 1.15.0) - railties (= 6.1.4.4) + railties (= 6.1.4.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - rails-i18n (7.0.1) + rails-i18n (7.0.2) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + railties (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) method_source rake (>= 0.13) thor (~> 1.0) @@ -335,7 +335,7 @@ GEM rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.2.0) + regexp_parser (2.2.1) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 8c4e704ff29727c72354d0466dcc9ff534667c4e..0fe69de516019d9ac6cefa81b45c6467b1f512e8 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -27,6 +27,7 @@ class ApplicationRecord < ActiveRecord::Base # https://github.com/rails/rails/blob/b961af3345fe2f9e492ba1e5424c2ceb75ac6ead/actiontext/lib/action_text/attribute.rb#L4 # https://github.com/rails/rails/blob/b961af3345fe2f9e492ba1e5424c2ceb75ac6ead/actiontext/lib/action_text/content.rb#L121 def self.has_summernote(name) + # https://dalibornasevic.com/posts/16-ruby-class_eval-__file__-and-__line__-arguments class_eval <<-CODE, __FILE__, __LINE__ + 1 serialize :#{name}, ActionText::Content CODE diff --git a/app/views/admin/communication/website/pages/show.html.erb b/app/views/admin/communication/website/pages/show.html.erb index 2f584359bcbc76d661e5acbca8851aa991aa21ee..31208877fccdacc4a3afaaa61595c6b82d827653 100644 --- a/app/views/admin/communication/website/pages/show.html.erb +++ b/app/views/admin/communication/website/pages/show.html.erb @@ -75,6 +75,11 @@ </div> <% end %> +<% content_for :preview do %> + <%= @page.text.to_s %> +<% end %> + <% content_for :action_bar_right do %> + <%= preview_link %> <%= edit_link @page %> <% end %> diff --git a/app/views/admin/education/program/roles/_form.html.erb b/app/views/admin/education/program/roles/_form.html.erb index 54d99730bb0f75ceb39daa2b09be65eb3fe51a9c..071666536428eb62160bb0deac3476508931a2b8 100644 --- a/app/views/admin/education/program/roles/_form.html.erb +++ b/app/views/admin/education/program/roles/_form.html.erb @@ -8,7 +8,7 @@ <h5 class="card-title mb-0"><%= t('admin.infos') %></h5> </div> <div class="card-body"> - <%= f.input :description %> + <%= f.input :description, as: :string %> </div> </div> </div> diff --git a/app/views/admin/education/program/roles/index.html.erb b/app/views/admin/education/program/roles/index.html.erb index fa4e8a5493acf50486e09e7e5389558adbfad9bf..9efa6d56e14ba8f10e242c7b5c1f5a30f897031b 100644 --- a/app/views/admin/education/program/roles/index.html.erb +++ b/app/views/admin/education/program/roles/index.html.erb @@ -2,5 +2,7 @@ <%= render 'admin/education/program/roles/list', roles: @roles %> <% content_for :action_bar_right do %> - <%= link_to t('add'), new_admin_education_program_role_path(program_id: @program.id), class: button_classes if can? :create, University::Role %> + <%= link_to t('create'), + new_admin_education_program_role_path(program_id: @program.id), + class: button_classes if can? :create, University::Role %> <% end %> diff --git a/app/views/admin/education/program/teachers/_form.html.erb b/app/views/admin/education/program/teachers/_form.html.erb index b77505dfdb3e19597b8ccde8c8765dfaa5c4278a..08f8fcb78e879a85c064151faad55a602f8e685d 100644 --- a/app/views/admin/education/program/teachers/_form.html.erb +++ b/app/views/admin/education/program/teachers/_form.html.erb @@ -11,7 +11,7 @@ <%= f.association :person, collection: @available_people %> </div> <div class="col-md-6"> - <%= f.input :description %> + <%= f.input :description, as: :string %> </div> </div> </div> diff --git a/app/views/admin/education/program/teachers/index.html.erb b/app/views/admin/education/program/teachers/index.html.erb index f37281009002c9944136ec4e9d76b43ee96b9d5c..2c4ebc71137a21df10684b9591117206134b2da1 100644 --- a/app/views/admin/education/program/teachers/index.html.erb +++ b/app/views/admin/education/program/teachers/index.html.erb @@ -2,5 +2,7 @@ <%= render 'admin/education/program/teachers/list', involvements: @involvements %> <% content_for :action_bar_right do %> - <%= link_to t('add'), new_admin_education_program_teacher_path(program_id: @program.id), class: button_classes %> + <%= link_to t('create'), + new_admin_education_program_teacher_path(program_id: @program.id), + class: button_classes %> <% end %> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 09f89481c6c33e3ec4c3012178351871bc79f29c..bf523772252d6995f2ac6bc24dfcdccfb0f1ea35 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -54,8 +54,8 @@ :contacts, :accessibility, :other - ].each_with_index do |prop, index| %> - <%= render 'admin/application/property/text', object: @program, property: prop %> + ].each_with_index do |property, index| %> + <%= render 'admin/application/property/text', object: @program, property: property %> <% end %> </div> </div> @@ -78,8 +78,8 @@ :evaluation, :opportunities, :results - ].each do |prop| %> - <%= render 'admin/application/property/text', object: @program, property: prop %> + ].each do |property| %> + <%= render 'admin/application/property/text', object: @program, property: property %> <% end %> </div> </div> @@ -115,6 +115,27 @@ </div> <% end %> +<% content_for :preview do %> + <% [ + :registration, + :pricing, + :duration, + :contacts, + :accessibility, + :other, + :objectives, + :content, + :prerequisites, + :pedagogy, + :evaluation, + :opportunities, + :results + ].each do |property| %> + <%= @program.send(property).to_s %> + <% end %> +<% end %> + <% content_for :action_bar_right do %> + <%= preview_link %> <%= edit_link @program %> <% end %> diff --git a/docs/communication/wysiwyg.md b/docs/communication/wysiwyg.md index 83b220e7b053da0a7386f2fe681d771ddb2ed9ef..75926052b305941a76b1fec50a3df880808403f6 100644 --- a/docs/communication/wysiwyg.md +++ b/docs/communication/wysiwyg.md @@ -88,10 +88,10 @@ A l'enregistrement, la balise est vidée. Etapes normales : -[x] A l'import d'une image, ajouter l'action-text-attachement autour +-[x] A la suppression d'une image dans l'éditeur, supprimer l'action-text-attachement autour -[x] A l'enregistrement, déshydrater les action-text-attachements -[x] A l'édition, réhydrater les action-text-attachements -[x] Après l'enregistrement mettre à jour les blobs attachés à l'objet parent (le post, par exemple) --[x] A la suppression d'une image dans l'éditeur, bien supprimer l'élément <figure data-trix-attachment="..."></figure> Si un programme a 5 champs summernote avec 3 images dans chaque champ, cela fait 15 attachments à lier au programme. Si on enlève une image d'un champ, il faut mettre à jour la liste pour avoir les 14 bons attachments. diff --git a/test/fixtures/communication/website.yml b/test/fixtures/communication/website.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e9fc04572143c27e0ac3edf2cca2755f6bfe8f1 --- /dev/null +++ b/test/fixtures/communication/website.yml @@ -0,0 +1,3 @@ +test: + university: test + name: Site de test diff --git a/test/fixtures/communication/website/github_files.yml b/test/fixtures/communication/website/github_files.yml deleted file mode 100644 index f62b00bd44515d0bd25111210b6ec85cdedca846..0000000000000000000000000000000000000000 --- a/test/fixtures/communication/website/github_files.yml +++ /dev/null @@ -1,30 +0,0 @@ -# == Schema Information -# -# Table name: communication_website_github_files -# -# id :uuid not null, primary key -# about_type :string not null -# github_path :string -# manifest_identifier :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid not null -# website_id :uuid not null -# -# Indexes -# -# index_communication_website_github_files_on_about (about_type,about_id) -# index_communication_website_github_files_on_website_id (website_id) -# -# Foreign Keys -# -# fk_rails_... (website_id => communication_websites.id) -# - -one: - github_path: MyString - about: one - -two: - github_path: MyString - about: two diff --git a/test/fixtures/communication/website/post.yml b/test/fixtures/communication/website/post.yml new file mode 100644 index 0000000000000000000000000000000000000000..acb62a96a95f0fcedbffa49bef57dd388b1d0e8e --- /dev/null +++ b/test/fixtures/communication/website/post.yml @@ -0,0 +1,5 @@ +test: + university: test + website: test + title: Test + slug: test diff --git a/test/fixtures/education/program/members.yml b/test/fixtures/education/program/members.yml deleted file mode 100644 index ddb1da3fb54bb6a9f75f56328c46965f9b3fc4de..0000000000000000000000000000000000000000 --- a/test/fixtures/education/program/members.yml +++ /dev/null @@ -1,31 +0,0 @@ -# == Schema Information -# -# Table name: education_program_members -# -# id :uuid not null, primary key -# role :string -# created_at :datetime not null -# updated_at :datetime not null -# member_id :uuid not null -# program_id :uuid not null -# -# Indexes -# -# index_education_program_members_on_member_id (member_id) -# index_education_program_members_on_program_id (program_id) -# -# Foreign Keys -# -# fk_rails_... (member_id => university_people.id) -# fk_rails_... (program_id => education_programs.id) -# - -one: - role: MyString - member: one - program: one - -two: - role: MyString - member: two - program: two diff --git a/test/fixtures/education/program/role/people.yml b/test/fixtures/education/program/role/people.yml deleted file mode 100644 index 50a25e47a89ea4b3a4cda4a15f37db6331820438..0000000000000000000000000000000000000000 --- a/test/fixtures/education/program/role/people.yml +++ /dev/null @@ -1,31 +0,0 @@ -# == Schema Information -# -# Table name: education_program_role_people -# -# id :uuid not null, primary key -# position :integer -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# role_id :uuid not null -# -# Indexes -# -# index_education_program_role_people_on_person_id (person_id) -# index_education_program_role_people_on_role_id (role_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (role_id => education_program_roles.id) -# - -one: - position: 1 - person: one - role: one - -two: - position: 1 - person: two - role: two diff --git a/test/fixtures/education/program/roles.yml b/test/fixtures/education/program/roles.yml deleted file mode 100644 index cce31b11fc8609374f9656de9c9803efd0d48ec9..0000000000000000000000000000000000000000 --- a/test/fixtures/education/program/roles.yml +++ /dev/null @@ -1,34 +0,0 @@ -# == Schema Information -# -# Table name: education_program_roles -# -# id :uuid not null, primary key -# position :integer -# title :string -# created_at :datetime not null -# updated_at :datetime not null -# program_id :uuid not null -# university_id :uuid not null -# -# Indexes -# -# index_education_program_roles_on_program_id (program_id) -# index_education_program_roles_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_... (program_id => education_programs.id) -# fk_rails_... (university_id => universities.id) -# - -one: - title: MyString - position: 1 - program: one - university: one - -two: - title: MyString - position: 1 - program: two - university: two diff --git a/test/fixtures/education/program/teachers.yml b/test/fixtures/education/program/teachers.yml deleted file mode 100644 index 1029c55daa2461be96d5eea5193efb06bea66597..0000000000000000000000000000000000000000 --- a/test/fixtures/education/program/teachers.yml +++ /dev/null @@ -1,31 +0,0 @@ -# == Schema Information -# -# Table name: education_program_teachers -# -# id :uuid not null, primary key -# description :text -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# program_id :uuid not null -# -# Indexes -# -# index_education_program_teachers_on_person_id (person_id) -# index_education_program_teachers_on_program_id (program_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (program_id => education_programs.id) -# - -one: - description: MyText - program: one - person: one - -two: - description: MyText - program: two - person: two diff --git a/test/fixtures/education/school/administrators.yml b/test/fixtures/education/school/administrators.yml deleted file mode 100644 index 2e5542621d8a3cb262c0eb722b87255fc495dc53..0000000000000000000000000000000000000000 --- a/test/fixtures/education/school/administrators.yml +++ /dev/null @@ -1,31 +0,0 @@ -# == Schema Information -# -# Table name: education_school_administrators -# -# id :uuid not null, primary key -# description :text -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# school_id :uuid not null -# -# Indexes -# -# index_education_school_administrators_on_person_id (person_id) -# index_education_school_administrators_on_school_id (school_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (school_id => education_schools.id) -# - -one: - description: MyText - school: one - person: one - -two: - description: MyText - school: two - person: two diff --git a/test/fixtures/research/laboratories.yml b/test/fixtures/research/laboratories.yml deleted file mode 100644 index 39a78ada0a853b429337db92bbbbdfb694263b61..0000000000000000000000000000000000000000 --- a/test/fixtures/research/laboratories.yml +++ /dev/null @@ -1,38 +0,0 @@ -# == Schema Information -# -# Table name: research_laboratories -# -# id :uuid not null, primary key -# address :string -# city :string -# country :string -# name :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_laboratories_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_f61d27545f (university_id => universities.id) -# - -one: - university: one - name: MyString - address: MyString - zipcode: MyString - city: MyString - country: MyString - -two: - university: two - name: MyString - address: MyString - zipcode: MyString - city: MyString - country: MyString diff --git a/test/fixtures/research/laboratory/axes.yml b/test/fixtures/research/laboratory/axes.yml deleted file mode 100644 index 51a668b6624c3851ba74e0016f84ffd54a5f5247..0000000000000000000000000000000000000000 --- a/test/fixtures/research/laboratory/axes.yml +++ /dev/null @@ -1,38 +0,0 @@ -# == Schema Information -# -# Table name: research_laboratory_axes -# -# id :uuid not null, primary key -# description :text -# name :string -# position :integer -# short_name :string -# created_at :datetime not null -# updated_at :datetime not null -# research_laboratory_id :uuid not null, indexed -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_laboratory_axes_on_research_laboratory_id (research_laboratory_id) -# index_research_laboratory_axes_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_ad2cb9a562 (research_laboratory_id => research_laboratories.id) -# fk_rails_d334f832b4 (university_id => universities.id) -# - -one: - university: one - research_laboratory: one - name: MyString - description: MyText - position: 1 - -two: - university: two - research_laboratory: two - name: MyString - description: MyText - position: 1 diff --git a/test/fixtures/research/theses.yml b/test/fixtures/research/theses.yml deleted file mode 100644 index c7cd5783ba0e9d8cbe0ae07ef980725ad038a5d9..0000000000000000000000000000000000000000 --- a/test/fixtures/research/theses.yml +++ /dev/null @@ -1,53 +0,0 @@ -# == Schema Information -# -# Table name: research_theses -# -# id :uuid not null, primary key -# abstract :text -# completed :boolean default(FALSE) -# completed_at :date -# started_at :date -# title :string -# created_at :datetime not null -# updated_at :datetime not null -# author_id :uuid not null, indexed -# director_id :uuid not null, indexed -# research_laboratory_id :uuid not null, indexed -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_theses_on_author_id (author_id) -# index_research_theses_on_director_id (director_id) -# index_research_theses_on_research_laboratory_id (research_laboratory_id) -# index_research_theses_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_1e42972d90 (author_id => university_people.id) -# fk_rails_44b431f9e5 (university_id => universities.id) -# fk_rails_8d223fdbaf (director_id => university_people.id) -# fk_rails_b3380066dc (research_laboratory_id => research_laboratories.id) -# - -one: - university: one - research_laboratory: one - author: one - director: one - title: MyString - abstract: MyText - started_at: 2022-01-20 - completed: false - completed_at: 2022-01-20 - -two: - university: two - research_laboratory: two - author: two - director: two - title: MyString - abstract: MyText - started_at: 2022-01-20 - completed: false - completed_at: 2022-01-20 diff --git a/test/fixtures/university.yml b/test/fixtures/university.yml new file mode 100644 index 0000000000000000000000000000000000000000..0ef3e762f353b857b6a82e0e390b29bbf8ad422a --- /dev/null +++ b/test/fixtures/university.yml @@ -0,0 +1,2 @@ +test: + name: Université de test diff --git a/test/fixtures/university/person/involvements.yml b/test/fixtures/university/person/involvements.yml deleted file mode 100644 index 3673a2c923f39dd6b3ed8db53e4d4ef0cf68fe28..0000000000000000000000000000000000000000 --- a/test/fixtures/university/person/involvements.yml +++ /dev/null @@ -1,42 +0,0 @@ -# == Schema Information -# -# Table name: university_person_involvements -# -# id :uuid not null, primary key -# description :text -# kind :integer -# position :integer -# target_type :string not null, indexed => [target_id] -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null, indexed -# target_id :uuid not null, indexed => [target_type] -# university_id :uuid not null, indexed -# -# Indexes -# -# index_university_person_involvements_on_person_id (person_id) -# index_university_person_involvements_on_target (target_type,target_id) -# index_university_person_involvements_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_407e2a671c (person_id => university_people.id) -# fk_rails_5c704f6338 (university_id => universities.id) -# - -one: - university: one - person: one - kind: 1 - target: one - description: MyText - position: 1 - -two: - university: two - person: two - kind: 1 - target: two - description: MyText - position: 1 diff --git a/test/fixtures/university/roles.yml b/test/fixtures/university/roles.yml deleted file mode 100644 index d3001160f12234a6ee6620ee1a383824724d2dcf..0000000000000000000000000000000000000000 --- a/test/fixtures/university/roles.yml +++ /dev/null @@ -1,34 +0,0 @@ -# == Schema Information -# -# Table name: university_roles -# -# id :uuid not null, primary key -# description :text -# position :integer -# target_type :string indexed => [target_id] -# created_at :datetime not null -# updated_at :datetime not null -# target_id :uuid indexed => [target_type] -# university_id :uuid not null, indexed -# -# Indexes -# -# index_university_roles_on_target (target_type,target_id) -# index_university_roles_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_8e52293a38 (university_id => universities.id) -# - -one: - university: one - target: one - description: MyText - position: 1 - -two: - university: two - target: two - description: MyText - position: 1 diff --git a/test/integration/summernote_test.rb b/test/integration/summernote_test.rb new file mode 100644 index 0000000000000000000000000000000000000000..43cef8518107b3fda71fbb281c2114fd5cbc0122 --- /dev/null +++ b/test/integration/summernote_test.rb @@ -0,0 +1,22 @@ +require "test_helper" + +class SummernoteTest < ActiveSupport::TestCase + HTML_HYDRATED = "<action-text-attachment sgid=\"sgid\" content-type=\"image/jpeg\" url=\"http://localhost:3000/dan-gold.jpeg\" filename=\"test.jpg\" filesize=\"352931\" width=\"588\" height=\"746\" previewable=\"true\" presentation=\"gallery\"><figure class=\"attachment attachment--preview\">\n <img width=\"588\" height=\"746\" src=\"http://localhost:3000/dan-gold.jpeg\">\n</figure></action-text-attachment>\n" + HTML_DEHYDRATED = "<action-text-attachment sgid=\"sgid\" content-type=\"image/jpeg\" url=\"http://localhost:3000/dan-gold.jpeg\" filename=\"test.jpg\" filesize=\"352931\" width=\"588\" height=\"746\" previewable=\"true\" presentation=\"gallery\"></action-text-attachment>" + + test "dehydrate actiontext" do + post = communication_website_post(:test) + post.text_new = HTML_HYDRATED + post.save + post.reload + assert_equal HTML_DEHYDRATED, post.text_new_before_type_cast + end + + test "rehydrate actiontext" do + post = communication_website_post(:test) + post.text_new = HTML_DEHYDRATED + post.save + post.reload + assert_equal HTML_HYDRATED, communication_website_post(:test).text_new.to_s + end + end diff --git a/test/models/variant_service_test.rb b/test/integration/variant_service_test.rb similarity index 100% rename from test/models/variant_service_test.rb rename to test/integration/variant_service_test.rb diff --git a/test/models/wordpress_test.rb b/test/integration/wordpress_test.rb similarity index 100% rename from test/models/wordpress_test.rb rename to test/integration/wordpress_test.rb diff --git a/test/integration/.keep b/test/models/.keep similarity index 100% rename from test/integration/.keep rename to test/models/.keep diff --git a/test/models/communication/website/github_file_test.rb b/test/models/communication/website/github_file_test.rb deleted file mode 100644 index 72374f59d14999ee55f3516ed13be3eefa558f26..0000000000000000000000000000000000000000 --- a/test/models/communication/website/github_file_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -# == Schema Information -# -# Table name: communication_website_github_files -# -# id :uuid not null, primary key -# about_type :string not null -# github_path :string -# manifest_identifier :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid not null -# website_id :uuid not null -# -# Indexes -# -# index_communication_website_github_files_on_about (about_type,about_id) -# index_communication_website_github_files_on_website_id (website_id) -# -# Foreign Keys -# -# fk_rails_... (website_id => communication_websites.id) -# -require "test_helper" - -class Communication::Website::GithubFileTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/education/program/member_test.rb b/test/models/education/program/member_test.rb deleted file mode 100644 index 824cc97edbb20e766f3a0e310082b2d315322535..0000000000000000000000000000000000000000 --- a/test/models/education/program/member_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# == Schema Information -# -# Table name: education_program_members -# -# id :uuid not null, primary key -# role :string -# created_at :datetime not null -# updated_at :datetime not null -# member_id :uuid not null -# program_id :uuid not null -# -# Indexes -# -# index_education_program_members_on_member_id (member_id) -# index_education_program_members_on_program_id (program_id) -# -# Foreign Keys -# -# fk_rails_... (member_id => university_people.id) -# fk_rails_... (program_id => education_programs.id) -# -require "test_helper" - -class Education::Program::MemberTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/education/program/role/person_test.rb b/test/models/education/program/role/person_test.rb deleted file mode 100644 index a257dd899084f03b9b60d8a932b174c47621aed8..0000000000000000000000000000000000000000 --- a/test/models/education/program/role/person_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# == Schema Information -# -# Table name: education_program_role_people -# -# id :uuid not null, primary key -# position :integer -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# role_id :uuid not null -# -# Indexes -# -# index_education_program_role_people_on_person_id (person_id) -# index_education_program_role_people_on_role_id (role_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (role_id => education_program_roles.id) -# -require "test_helper" - -class Education::Program::Role::PersonTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/education/program/role_test.rb b/test/models/education/program/role_test.rb deleted file mode 100644 index 2b9d81195b5c96bec871bf57ea9e4b6caab9b05a..0000000000000000000000000000000000000000 --- a/test/models/education/program/role_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -# == Schema Information -# -# Table name: education_program_roles -# -# id :uuid not null, primary key -# position :integer -# title :string -# created_at :datetime not null -# updated_at :datetime not null -# program_id :uuid not null -# university_id :uuid not null -# -# Indexes -# -# index_education_program_roles_on_program_id (program_id) -# index_education_program_roles_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_... (program_id => education_programs.id) -# fk_rails_... (university_id => universities.id) -# -require "test_helper" - -class Education::Program::RoleTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/education/program/teacher_test.rb b/test/models/education/program/teacher_test.rb deleted file mode 100644 index 7806b4fcbda0ece1feda5af3d5b0edbfd585e95d..0000000000000000000000000000000000000000 --- a/test/models/education/program/teacher_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# == Schema Information -# -# Table name: education_program_teachers -# -# id :uuid not null, primary key -# description :text -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# program_id :uuid not null -# -# Indexes -# -# index_education_program_teachers_on_person_id (person_id) -# index_education_program_teachers_on_program_id (program_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (program_id => education_programs.id) -# -require "test_helper" - -class Education::Program::TeacherTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/education/school/administrator_test.rb b/test/models/education/school/administrator_test.rb deleted file mode 100644 index bdf223d6db7b2ae4bf2e3898d934c14310cc7024..0000000000000000000000000000000000000000 --- a/test/models/education/school/administrator_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# == Schema Information -# -# Table name: education_school_administrators -# -# id :uuid not null, primary key -# description :text -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null -# school_id :uuid not null -# -# Indexes -# -# index_education_school_administrators_on_person_id (person_id) -# index_education_school_administrators_on_school_id (school_id) -# -# Foreign Keys -# -# fk_rails_... (person_id => university_people.id) -# fk_rails_... (school_id => education_schools.id) -# -require "test_helper" - -class Education::School::AdministratorTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/research/laboratory/axis_test.rb b/test/models/research/laboratory/axis_test.rb deleted file mode 100644 index 909fb0dd87343a26630336b64b75ee32b03c67cf..0000000000000000000000000000000000000000 --- a/test/models/research/laboratory/axis_test.rb +++ /dev/null @@ -1,31 +0,0 @@ -# == Schema Information -# -# Table name: research_laboratory_axes -# -# id :uuid not null, primary key -# description :text -# name :string -# position :integer -# short_name :string -# created_at :datetime not null -# updated_at :datetime not null -# research_laboratory_id :uuid not null, indexed -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_laboratory_axes_on_research_laboratory_id (research_laboratory_id) -# index_research_laboratory_axes_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_ad2cb9a562 (research_laboratory_id => research_laboratories.id) -# fk_rails_d334f832b4 (university_id => universities.id) -# -require "test_helper" - -class Research::Laboratory::AxisTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/research/laboratory_test.rb b/test/models/research/laboratory_test.rb deleted file mode 100644 index 54066f43146b3719162356c70762fcc8097ba425..0000000000000000000000000000000000000000 --- a/test/models/research/laboratory_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -# == Schema Information -# -# Table name: research_laboratories -# -# id :uuid not null, primary key -# address :string -# city :string -# country :string -# name :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_laboratories_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_f61d27545f (university_id => universities.id) -# -require "test_helper" - -class Research::LaboratoryTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/research/thesis_test.rb b/test/models/research/thesis_test.rb deleted file mode 100644 index 436839fedd2f1528ba703a6eb56d29623fc40199..0000000000000000000000000000000000000000 --- a/test/models/research/thesis_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -# == Schema Information -# -# Table name: research_theses -# -# id :uuid not null, primary key -# abstract :text -# completed :boolean default(FALSE) -# completed_at :date -# started_at :date -# title :string -# created_at :datetime not null -# updated_at :datetime not null -# author_id :uuid not null, indexed -# director_id :uuid not null, indexed -# research_laboratory_id :uuid not null, indexed -# university_id :uuid not null, indexed -# -# Indexes -# -# index_research_theses_on_author_id (author_id) -# index_research_theses_on_director_id (director_id) -# index_research_theses_on_research_laboratory_id (research_laboratory_id) -# index_research_theses_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_1e42972d90 (author_id => university_people.id) -# fk_rails_44b431f9e5 (university_id => universities.id) -# fk_rails_8d223fdbaf (director_id => university_people.id) -# fk_rails_b3380066dc (research_laboratory_id => research_laboratories.id) -# -require "test_helper" - -class Research::ThesisTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/university/person/involvement_test.rb b/test/models/university/person/involvement_test.rb deleted file mode 100644 index 90ea6f5dac2f126bdf3dd2a8b51c3d1637ae0f82..0000000000000000000000000000000000000000 --- a/test/models/university/person/involvement_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -# == Schema Information -# -# Table name: university_person_involvements -# -# id :uuid not null, primary key -# description :text -# kind :integer -# position :integer -# target_type :string not null, indexed => [target_id] -# created_at :datetime not null -# updated_at :datetime not null -# person_id :uuid not null, indexed -# target_id :uuid not null, indexed => [target_type] -# university_id :uuid not null, indexed -# -# Indexes -# -# index_university_person_involvements_on_person_id (person_id) -# index_university_person_involvements_on_target (target_type,target_id) -# index_university_person_involvements_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_407e2a671c (person_id => university_people.id) -# fk_rails_5c704f6338 (university_id => universities.id) -# -require "test_helper" - -class University::Person::InvolvementTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/university/role_test.rb b/test/models/university/role_test.rb deleted file mode 100644 index a0c47a9a421e1b609cf3d72ec012a3b18dc51ea5..0000000000000000000000000000000000000000 --- a/test/models/university/role_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -# == Schema Information -# -# Table name: university_roles -# -# id :uuid not null, primary key -# description :text -# position :integer -# target_type :string indexed => [target_id] -# created_at :datetime not null -# updated_at :datetime not null -# target_id :uuid indexed => [target_type] -# university_id :uuid not null, indexed -# -# Indexes -# -# index_university_roles_on_target (target_type,target_id) -# index_university_roles_on_university_id (university_id) -# -# Foreign Keys -# -# fk_rails_8e52293a38 (university_id => universities.id) -# -require "test_helper" - -class University::RoleTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/system/communication/website/pages_test.rb b/test/system/communication/website/pages_test.rb deleted file mode 100644 index 8d302d5a5e0a47023c138301bef9dab9afd70173..0000000000000000000000000000000000000000 --- a/test/system/communication/website/pages_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require "application_system_test_case" - -class Communication::Website::PagesTest < ApplicationSystemTestCase - setup do - @communication_website_page = communication_website_pages(:one) - end - - test "visiting the index" do - visit communication_website_pages_url - assert_selector "h1", text: "Communication/Website/Pages" - end - - test "creating a Page" do - visit communication_website_pages_url - click_on "New Communication/Website/Page" - - fill_in "About", with: @communication_website_page.about_id - fill_in "Communication website", with: @communication_website_page.communication_website_id - fill_in "Description", with: @communication_website_page.description - fill_in "Kind", with: @communication_website_page.kind - fill_in "Title", with: @communication_website_page.title - fill_in "University", with: @communication_website_page.university_id - click_on "Create Page" - - assert_text "Page was successfully created" - click_on "Back" - end - - test "updating a Page" do - visit communication_website_pages_url - click_on "Edit", match: :first - - fill_in "About", with: @communication_website_page.about_id - fill_in "Communication website", with: @communication_website_page.communication_website_id - fill_in "Description", with: @communication_website_page.description - fill_in "Kind", with: @communication_website_page.kind - fill_in "Title", with: @communication_website_page.title - fill_in "University", with: @communication_website_page.university_id - click_on "Update Page" - - assert_text "Page was successfully updated" - click_on "Back" - end - - test "destroying a Page" do - visit communication_website_pages_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Page was successfully destroyed" - end -end diff --git a/test/system/communication/website/posts_test.rb b/test/system/communication/website/posts_test.rb deleted file mode 100644 index cbd0d35c7b3491e166337ec2e0e6e0a7dabfbebf..0000000000000000000000000000000000000000 --- a/test/system/communication/website/posts_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -require "application_system_test_case" - -class Communication::Website::PostsTest < ApplicationSystemTestCase - setup do - @communication_website_post = communication_website_posts(:one) - end - - test "visiting the index" do - visit communication_website_posts_url - assert_selector "h1", text: "Communication/Website/Posts" - end - - test "creating a Post" do - visit communication_website_posts_url - click_on "New Communication/Website/Post" - - fill_in "Description", with: @communication_website_post.description - fill_in "Published", with: @communication_website_post.published - fill_in "Published at", with: @communication_website_post.published_at - fill_in "Text", with: @communication_website_post.text - fill_in "Title", with: @communication_website_post.title - fill_in "University", with: @communication_website_post.university_id - fill_in "Website", with: @communication_website_post.website_id - click_on "Create Post" - - assert_text "Post was successfully created" - click_on "Back" - end - - test "updating a Post" do - visit communication_website_posts_url - click_on "Edit", match: :first - - fill_in "Description", with: @communication_website_post.description - fill_in "Published", with: @communication_website_post.published - fill_in "Published at", with: @communication_website_post.published_at - fill_in "Text", with: @communication_website_post.text - fill_in "Title", with: @communication_website_post.title - fill_in "University", with: @communication_website_post.university_id - fill_in "Website", with: @communication_website_post.website_id - click_on "Update Post" - - assert_text "Post was successfully updated" - click_on "Back" - end - - test "destroying a Post" do - visit communication_website_posts_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Post was successfully destroyed" - end -end diff --git a/test/system/features/websites/sites_test.rb b/test/system/features/websites/sites_test.rb deleted file mode 100644 index b6e665bad81430226382a7aec8ff8324beb25f1a..0000000000000000000000000000000000000000 --- a/test/system/features/websites/sites_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "application_system_test_case" - -class Features::Websites::SitesTest < ApplicationSystemTestCase - setup do - @features_websites_site = features_websites_sites(:one) - end - - test "visiting the index" do - visit features_websites_sites_url - assert_selector "h1", text: "Features/Websites/Sites" - end - - test "creating a Site" do - visit features_websites_sites_url - click_on "New Features/Websites/Site" - - fill_in "Domain", with: @features_websites_site.domain - fill_in "Name", with: @features_websites_site.name - click_on "Create Site" - - assert_text "Site was successfully created" - click_on "Back" - end - - test "updating a Site" do - visit features_websites_sites_url - click_on "Edit", match: :first - - fill_in "Domain", with: @features_websites_site.domain - fill_in "Name", with: @features_websites_site.name - click_on "Update Site" - - assert_text "Site was successfully updated" - click_on "Back" - end - - test "destroying a Site" do - visit features_websites_sites_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Site was successfully destroyed" - end -end diff --git a/test/system/languages_test.rb b/test/system/languages_test.rb deleted file mode 100644 index b5d0360f238a800d57fc746952a7fb03f40e7918..0000000000000000000000000000000000000000 --- a/test/system/languages_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "application_system_test_case" - -class LanguagesTest < ApplicationSystemTestCase - setup do - @language = languages(:one) - end - - test "visiting the index" do - visit languages_url - assert_selector "h1", text: "Languages" - end - - test "creating a Language" do - visit languages_url - click_on "New Language" - - fill_in "Iso code", with: @language.iso_code - fill_in "Name", with: @language.name - click_on "Create Language" - - assert_text "Language was successfully created" - click_on "Back" - end - - test "updating a Language" do - visit languages_url - click_on "Edit", match: :first - - fill_in "Iso code", with: @language.iso_code - fill_in "Name", with: @language.name - click_on "Update Language" - - assert_text "Language was successfully updated" - click_on "Back" - end - - test "destroying a Language" do - visit languages_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Language was successfully destroyed" - end -end diff --git a/test/system/programs_test.rb b/test/system/programs_test.rb deleted file mode 100644 index 13b7a3193690992ab098b2696b4ac16715cafb08..0000000000000000000000000000000000000000 --- a/test/system/programs_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -require "application_system_test_case" - -class ProgramsTest < ApplicationSystemTestCase - setup do - @program = programs(:one) - end - - test "visiting the index" do - visit programs_url - assert_selector "h1", text: "Programs" - end - - test "creating a Program" do - visit programs_url - click_on "New Program" - - fill_in "Accessibility", with: @program.accessibility - fill_in "Capacity", with: @program.capacity - check "Continuing" if @program.continuing - fill_in "Duration", with: @program.duration - fill_in "Ects", with: @program.ects - fill_in "Evaluation", with: @program.evaluation - fill_in "Level", with: @program.level - fill_in "Name", with: @program.name - fill_in "Objectives", with: @program.objectives - fill_in "Pedagogy", with: @program.pedagogy - fill_in "Prerequisites", with: @program.prerequisites - fill_in "Registration", with: @program.registration - fill_in "University", with: @program.university_id - click_on "Create Program" - - assert_text "Program was successfully created" - click_on "Back" - end - - test "updating a Program" do - visit programs_url - click_on "Edit", match: :first - - fill_in "Accessibility", with: @program.accessibility - fill_in "Capacity", with: @program.capacity - check "Continuing" if @program.continuing - fill_in "Duration", with: @program.duration - fill_in "Ects", with: @program.ects - fill_in "Evaluation", with: @program.evaluation - fill_in "Level", with: @program.level - fill_in "Name", with: @program.name - fill_in "Objectives", with: @program.objectives - fill_in "Pedagogy", with: @program.pedagogy - fill_in "Prerequisites", with: @program.prerequisites - fill_in "Registration", with: @program.registration - fill_in "University", with: @program.university_id - click_on "Update Program" - - assert_text "Program was successfully updated" - click_on "Back" - end - - test "destroying a Program" do - visit programs_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Program was successfully destroyed" - end -end diff --git a/test/system/qualiopi/criterions_test.rb b/test/system/qualiopi/criterions_test.rb deleted file mode 100644 index 9185df996ca9ceba2957833f3d96549b77d323b9..0000000000000000000000000000000000000000 --- a/test/system/qualiopi/criterions_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "application_system_test_case" - -class Qualiopi::CriterionsTest < ApplicationSystemTestCase - setup do - @qualiopi_criterion = qualiopi_criterions(:one) - end - - test "visiting the index" do - visit qualiopi_criterions_url - assert_selector "h1", text: "Qualiopi/Criterions" - end - - test "creating a Criterion" do - visit qualiopi_criterions_url - click_on "New Qualiopi/Criterion" - - fill_in "Description", with: @qualiopi_criterion.description - fill_in "Name", with: @qualiopi_criterion.name - fill_in "Number", with: @qualiopi_criterion.number - click_on "Create Criterion" - - assert_text "Criterion was successfully created" - click_on "Back" - end - - test "updating a Criterion" do - visit qualiopi_criterions_url - click_on "Edit", match: :first - - fill_in "Description", with: @qualiopi_criterion.description - fill_in "Name", with: @qualiopi_criterion.name - fill_in "Number", with: @qualiopi_criterion.number - click_on "Update Criterion" - - assert_text "Criterion was successfully updated" - click_on "Back" - end - - test "destroying a Criterion" do - visit qualiopi_criterions_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Criterion was successfully destroyed" - end -end diff --git a/test/system/qualiopi/indicators_test.rb b/test/system/qualiopi/indicators_test.rb deleted file mode 100644 index 08133e726a769cc8dfd8c2bc24c7978fc40d4ee2..0000000000000000000000000000000000000000 --- a/test/system/qualiopi/indicators_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -require "application_system_test_case" - -class Qualiopi::IndicatorsTest < ApplicationSystemTestCase - setup do - @qualiopi_indicator = qualiopi_indicators(:one) - end - - test "visiting the index" do - visit qualiopi_indicators_url - assert_selector "h1", text: "Qualiopi/Indicators" - end - - test "creating a Indicator" do - visit qualiopi_indicators_url - click_on "New Qualiopi/Indicator" - - fill_in "Criterion", with: @qualiopi_indicator.criterion_id - fill_in "Level expected", with: @qualiopi_indicator.level_expected - fill_in "Name", with: @qualiopi_indicator.name - fill_in "Non conformity", with: @qualiopi_indicator.non_conformity - fill_in "Number", with: @qualiopi_indicator.number - fill_in "Proof", with: @qualiopi_indicator.proof - fill_in "Requirement", with: @qualiopi_indicator.requirement - click_on "Create Indicator" - - assert_text "Indicator was successfully created" - click_on "Back" - end - - test "updating a Indicator" do - visit qualiopi_indicators_url - click_on "Edit", match: :first - - fill_in "Criterion", with: @qualiopi_indicator.criterion_id - fill_in "Level expected", with: @qualiopi_indicator.level_expected - fill_in "Name", with: @qualiopi_indicator.name - fill_in "Non conformity", with: @qualiopi_indicator.non_conformity - fill_in "Number", with: @qualiopi_indicator.number - fill_in "Proof", with: @qualiopi_indicator.proof - fill_in "Requirement", with: @qualiopi_indicator.requirement - click_on "Update Indicator" - - assert_text "Indicator was successfully updated" - click_on "Back" - end - - test "destroying a Indicator" do - visit qualiopi_indicators_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Indicator was successfully destroyed" - end -end diff --git a/test/system/research/journal/articles_test.rb b/test/system/research/journal/articles_test.rb deleted file mode 100644 index f3ec7b46e2abced666eae18e482b09225f85dece..0000000000000000000000000000000000000000 --- a/test/system/research/journal/articles_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require "application_system_test_case" - -class Research::Journal::ArticlesTest < ApplicationSystemTestCase - setup do - @research_journal_article = research_journal_articles(:one) - end - - test "visiting the index" do - visit research_journal_articles_url - assert_selector "h1", text: "Research/Journal/Articles" - end - - test "creating a Article" do - visit research_journal_articles_url - click_on "New Research/Journal/Article" - - fill_in "Published at", with: @research_journal_article.published_at - fill_in "Research journal", with: @research_journal_article.research_journal_id - fill_in "Research journal volume", with: @research_journal_article.research_journal_volume_id - fill_in "Text", with: @research_journal_article.text - fill_in "Title", with: @research_journal_article.title - fill_in "University", with: @research_journal_article.university_id - click_on "Create Article" - - assert_text "Article was successfully created" - click_on "Back" - end - - test "updating a Article" do - visit research_journal_articles_url - click_on "Edit", match: :first - - fill_in "Published at", with: @research_journal_article.published_at - fill_in "Research journal", with: @research_journal_article.research_journal_id - fill_in "Research journal volume", with: @research_journal_article.research_journal_volume_id - fill_in "Text", with: @research_journal_article.text - fill_in "Title", with: @research_journal_article.title - fill_in "University", with: @research_journal_article.university_id - click_on "Update Article" - - assert_text "Article was successfully updated" - click_on "Back" - end - - test "destroying a Article" do - visit research_journal_articles_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Article was successfully destroyed" - end -end diff --git a/test/system/research/journal/volumes_test.rb b/test/system/research/journal/volumes_test.rb deleted file mode 100644 index 85d50549bc7d167f5808982131598f255d31608b..0000000000000000000000000000000000000000 --- a/test/system/research/journal/volumes_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "application_system_test_case" - -class Research::Journal::VolumesTest < ApplicationSystemTestCase - setup do - @research_journal_volume = research_journal_volumes(:one) - end - - test "visiting the index" do - visit research_journal_volumes_url - assert_selector "h1", text: "Research/Journal/Volumes" - end - - test "creating a Volume" do - visit research_journal_volumes_url - click_on "New Research/Journal/Volume" - - fill_in "Number", with: @research_journal_volume.number - fill_in "Published at", with: @research_journal_volume.published_at - fill_in "Title", with: @research_journal_volume.title - click_on "Create Volume" - - assert_text "Volume was successfully created" - click_on "Back" - end - - test "updating a Volume" do - visit research_journal_volumes_url - click_on "Edit", match: :first - - fill_in "Number", with: @research_journal_volume.number - fill_in "Published at", with: @research_journal_volume.published_at - fill_in "Title", with: @research_journal_volume.title - click_on "Update Volume" - - assert_text "Volume was successfully updated" - click_on "Back" - end - - test "destroying a Volume" do - visit research_journal_volumes_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Volume was successfully destroyed" - end -end diff --git a/test/system/research/journals_test.rb b/test/system/research/journals_test.rb deleted file mode 100644 index 3c83334e62fc4c8dd7216d7c634a5b1e8a584457..0000000000000000000000000000000000000000 --- a/test/system/research/journals_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "application_system_test_case" - -class Research::JournalsTest < ApplicationSystemTestCase - setup do - @research_journal = research_journals(:one) - end - - test "visiting the index" do - visit research_journals_url - assert_selector "h1", text: "Research/Journals" - end - - test "creating a Journal" do - visit research_journals_url - click_on "New Research/Journal" - - fill_in "Description", with: @research_journal.description - fill_in "Title", with: @research_journal.title - click_on "Create Journal" - - assert_text "Journal was successfully created" - click_on "Back" - end - - test "updating a Journal" do - visit research_journals_url - click_on "Edit", match: :first - - fill_in "Description", with: @research_journal.description - fill_in "Title", with: @research_journal.title - click_on "Update Journal" - - assert_text "Journal was successfully updated" - click_on "Back" - end - - test "destroying a Journal" do - visit research_journals_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Journal was successfully destroyed" - end -end diff --git a/test/system/research/researchers_test.rb b/test/system/research/researchers_test.rb deleted file mode 100644 index f31cb48aa1271486b207056e872e28628e5be66f..0000000000000000000000000000000000000000 --- a/test/system/research/researchers_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "application_system_test_case" - -class Research::ResearchersTest < ApplicationSystemTestCase - setup do - @research_researcher = research_researchers(:one) - end - - test "visiting the index" do - visit research_researchers_url - assert_selector "h1", text: "Research/Researchers" - end - - test "creating a Researcher" do - visit research_researchers_url - click_on "New Research/Researcher" - - fill_in "Biography", with: @research_researcher.biography - fill_in "First name", with: @research_researcher.first_name - fill_in "Last name", with: @research_researcher.last_name - fill_in "User", with: @research_researcher.user_id - click_on "Create Researcher" - - assert_text "Researcher was successfully created" - click_on "Back" - end - - test "updating a Researcher" do - visit research_researchers_url - click_on "Edit", match: :first - - fill_in "Biography", with: @research_researcher.biography - fill_in "First name", with: @research_researcher.first_name - fill_in "Last name", with: @research_researcher.last_name - fill_in "User", with: @research_researcher.user_id - click_on "Update Researcher" - - assert_text "Researcher was successfully updated" - click_on "Back" - end - - test "destroying a Researcher" do - visit research_researchers_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "Researcher was successfully destroyed" - end -end diff --git a/test/system/universities_test.rb b/test/system/universities_test.rb deleted file mode 100644 index bc8e1af7929d70b46bdc6b07734dbbb2d964c0c4..0000000000000000000000000000000000000000 --- a/test/system/universities_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require "application_system_test_case" - -class UniversitiesTest < ApplicationSystemTestCase - setup do - @university = universities(:one) - end - - test "visiting the index" do - visit universities_url - assert_selector "h1", text: "Universities" - end - - test "creating a University" do - visit universities_url - click_on "New University" - - fill_in "Address", with: @university.address - fill_in "City", with: @university.city - fill_in "Country", with: @university.country - fill_in "Name", with: @university.name - check "Private" if @university.private - fill_in "Zipcode", with: @university.zipcode - click_on "Create University" - - assert_text "University was successfully created" - click_on "Back" - end - - test "updating a University" do - visit universities_url - click_on "Edit", match: :first - - fill_in "Address", with: @university.address - fill_in "City", with: @university.city - fill_in "Country", with: @university.country - fill_in "Name", with: @university.name - check "Private" if @university.private - fill_in "Zipcode", with: @university.zipcode - click_on "Update University" - - assert_text "University was successfully updated" - click_on "Back" - end - - test "destroying a University" do - visit universities_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "University was successfully destroyed" - end -end diff --git a/test/system/university/schools_test.rb b/test/system/university/schools_test.rb deleted file mode 100644 index 3055e119d1ed67d5ef2008ac5d96f69da11d84a9..0000000000000000000000000000000000000000 --- a/test/system/university/schools_test.rb +++ /dev/null @@ -1,57 +0,0 @@ -require "application_system_test_case" - -class University::SchoolsTest < ApplicationSystemTestCase - setup do - @university_school = university_schools(:one) - end - - test "visiting the index" do - visit university_schools_url - assert_selector "h1", text: "University/Schools" - end - - test "creating a School" do - visit university_schools_url - click_on "New University/School" - - fill_in "Address", with: @university_school.address - fill_in "City", with: @university_school.city - fill_in "Country", with: @university_school.country - fill_in "Latitude", with: @university_school.latitude - fill_in "Longitude", with: @university_school.longitude - fill_in "Name", with: @university_school.name - fill_in "University", with: @university_school.university_id - fill_in "Zipcode", with: @university_school.zipcode - click_on "Create School" - - assert_text "School was successfully created" - click_on "Back" - end - - test "updating a School" do - visit university_schools_url - click_on "Edit", match: :first - - fill_in "Address", with: @university_school.address - fill_in "City", with: @university_school.city - fill_in "Country", with: @university_school.country - fill_in "Latitude", with: @university_school.latitude - fill_in "Longitude", with: @university_school.longitude - fill_in "Name", with: @university_school.name - fill_in "University", with: @university_school.university_id - fill_in "Zipcode", with: @university_school.zipcode - click_on "Update School" - - assert_text "School was successfully updated" - click_on "Back" - end - - test "destroying a School" do - visit university_schools_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "School was successfully destroyed" - end -end diff --git a/test/system/users_test.rb b/test/system/users_test.rb deleted file mode 100644 index 06f7377f621b4477ad231a08d7ee271bfb55e520..0000000000000000000000000000000000000000 --- a/test/system/users_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -require "application_system_test_case" - -class UsersTest < ApplicationSystemTestCase - setup do - @user = users(:one) - end - - test "visiting the index" do - visit users_url - assert_selector "h1", text: "Users" - end - - test "creating a User" do - visit users_url - click_on "New User" - - fill_in "First name", with: @user.first_name - fill_in "Last name", with: @user.last_name - fill_in "Role", with: @user.role - click_on "Create User" - - assert_text "User was successfully created" - click_on "Back" - end - - test "updating a User" do - visit users_url - click_on "Edit", match: :first - - fill_in "First name", with: @user.first_name - fill_in "Last name", with: @user.last_name - fill_in "Role", with: @user.role - click_on "Update User" - - assert_text "User was successfully updated" - click_on "Back" - end - - test "destroying a User" do - visit users_url - page.accept_confirm do - click_on "Destroy", match: :first - end - - assert_text "User was successfully destroyed" - end -end