NUSModsĀ and Tests

Guo Xiang

Mechanical Engineering Year 4

GSOC 2014 for Ruby on Rails

30.83%  1016B  app/favicon-114.png
34.81%   1.2K  app/favicon-120.png
42.72%   1.8K  app/favicon-144.png
45.15%   2.1K  app/favicon-150.png
44.40%   2.1K  app/favicon-152.png
------         app/favicon-16.png
46.17%   2.2K  app/favicon-160.png
48.20%   2.8K  app/favicon-196.png
56.22%   5.7K  app/favicon-310.png
------         app/favicon-32.png
------         app/favicon-57.png
 8.72%   133B  app/favicon-64.png
 6.66%   113B  app/favicon-70.png
 8.53%   152B  app/favicon-72.png
 8.77%   162B  app/favicon-76.png
15.50%   359B  app/favicon-96.png
72.89%  24.4K  app/icon.png
52.50%   6.1K  app/images/logo-white.png
19.29%   1.5K  app/images/logo.png
56.22%   5.7K  app/thumbnail.png
Total: 19.35% 172.5K

Learn Git

Learn how to test

class NusmodsTest < ActionDispatch::IntegrationTest
  # setup....

  test "User should be able to search for a module" do
    visit 'http://nusmods.com/timetable/2014-2015/sem2?CS1020E%5BLAB%5D=2&CS1020E%5BLEC%5D=1&CS1020E%5BTUT%5D=2&ME4262%5BLEC%5D=1&ME4284%5BLEC%5D=1&ME4231%5BLEC%5D=1&ME4101='

    click_link "Modules"

    click_link "ACC1002 Financial Accounting"

    assert page.has_content?("ACC1002 Financial Accounting")

    click_button "Add Timetable"
    click_link "Add to Semester 1 Timetable"

    within ".nav.navmenu-nav" do
      click_link "Timetable"
    end

    click_link "Semester 1"

    within "#timetable-page" do
      assert page.has_content?("ACC1002")
    end
  end
end

NUSMODS sharing

By tgxworld

NUSMODS sharing

  • 1,508