Skip to content
Snippets Groups Projects
Unverified Commit daddfc5c authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

Merge branch 'summernote' of github.com:noesya/osuny into summernote

parents 5b1519a9 cb8fd0c8
No related branches found
No related tags found
No related merge requests found
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
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
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
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
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
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
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
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
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
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
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment