Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7506717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:20:16+00:00 2026-05-29T22:20:16+00:00

Inside my app I’m using a jQuery plugin, FullCalendar – it is a jQuery

  • 0

Inside my app I’m using a jQuery plugin, FullCalendar – it is a jQuery calendar that looks like Google Calendar.

I would like to write a functional test (CalendarControllerTest < ActionController::TestCase) that tests the calendar is being displayed (CalendarController#index).

That would be easy if the calendar was regular HTML, instead it is written in JavaScript so inside my HTML page I have:

<script src="fullcalendar.js" type="text/javascript"></script>
<script src="calendar.js" type="text/javascript"></script>
[...]
<div id="calendar"></div>

Inside calendar.js (scaffolding from Rails 3.1 – CalendarController + calendar.js + calendar.css + CalendarControllerTest) I load FullCalendar:

$('#calendar').fullCalendar();

Thus inside my functional test (CalendarControllerTest) this won’t work:

# Checks <div class="fc-content"> is present i.e the calendar is being displayed
assert_select '.fc-content', count: 1

I tried to use assert_select_jquery without success:

assert_select_jquery :html, '#calendar' do
  assert_select '.fc-content', count: 1
end

I know about Webrat/Capybara but from what I see it is used for integration tests not functional tests.

How would you do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:20:17+00:00Added an answer on May 29, 2026 at 10:20 pm

    Answering to myself…
    I use default Rails test framework to test model and controllers (directories test/unit and test/functionnal).
    assert_select_jquery is used with functionnal tests (controller) when you have unobstrusive JavaScript like a create.js.erb or destroy.js.erb.
    I don’t fully test JavaScript inside functionnal tests, for that I use Capybara within directory test/integration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyway to access the BlackBerry PIN inside my app? I would like
I figured out that I can reuse my app's launcher icon inside my app,
Is it possible to send messages from inside an app, using MessageUI framwork on
I have a style for a textblock that is set inside my app.xaml this
I have all my javascript methods inside an app object so it works like
I'm looking at using openUDID inside my app for registration purposes. However its still
i looking for a manual way of manipulate div element inside uibinder using jquery
I am trying to install an app inside of another web app. I have
I try to create 2 buttons inside my app case WM_CREATE:{ hWnd =CreateWindowEx(NULL, LBUTTON,
I want to be able to use the iPhones Mail.app inside my application so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.