Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial

Admin message

Do not update/delete: Banner broadcast message test data

Admin message

Do not update/delete: Notification broadcast message test data

  • GitLab.org GitLab.org
  • GitLab FOSS GitLab FOSS
  • Issues
  • #24753

Replace HAML fixtures by dynamicly generated HTML fixtures

As mentioned in !6059 (merged) already, the current HAML fixtures have several disadvantages. Namely:

  • can not be parsed by JavaScript (because of inline Ruby)
    • requires Rails though tests are run by JavaScript only
    • more difficult to modify fixture files from JavaScript
  • are translated into HTML when running tests (solved by #26226 (closed))
    • slows down tests (probably no significant impact)
    • overhead for rerunning tests
    • more difficult to look into HTML
    • HTML can not be downloaded from CI to reproduce errors locally
  • overhead of keeping fixtures in sync with application
    • additional effort to update fixtures after app has changed
    • forgetting to update fixture may lead to mistakenly passing tests
    • more necessary work for new tests (decreases motivation for writing tests)
  • each fixture correspond to one HAML file
    • many files
    • much duplication (e.g. open issue, closed issue)

Therefore !6059 (merged) introduced a mechanism to generate fixtures using RSpec independently from the testing that happens afterwards.

The following files still need to be translated:

$ bundle exec rspec --format documentation spec/javascripts/fixtures/static_fixtures.rb | grep '\.html\.raw' | sed 's|  static/|- [ ] |'
  • abuse_reports.html.haml (!7644 (merged))
  • ajax_loading_spinner.html.haml
  • application.html.haml (!7318 (merged))
  • awards_handler.html.haml (!7661 (merged))
  • balsamiq_viewer.html.raw
  • behaviors/quick_submit.html.haml ( !9086 (merged))
  • behaviors/requires_input.html.haml (!9162 (merged))
  • build.html.haml (!7589 (merged))
  • comments.html.haml (!7683 (merged))
  • dashboard.html.haml (no longer there in 5388f5ee)
  • emoji_menu.js (no longer there in 5388f5ee)
  • environments/element.html.haml
  • environments/environments.html.haml
  • environments/environments_folder_view.html.haml
  • environments/metrics.html.haml (no longer there in 5388f5ee)
  • environments/table.html.haml
  • event_filter.html.haml
  • gl_dropdown.html.haml
  • gl_field_errors.html.haml
  • graph.html.raw
  • header.html.haml (!9174 (merged))
  • issuable.html.haml (!7685 (merged))
  • issuable_filter.html.haml
  • issue_note.html.haml (!7683 (merged))
  • issue_sidebar_label.html.haml (!7688 (closed))
  • issues_show.html.haml (!6059 (merged))
  • line_highlighter.html.haml
  • linked_tabs.html.haml
  • merge_requests_show.html.haml
  • merge_request_tabs.html.haml (!9172 (merged))
  • mini_dropdown_graph.html.haml
  • new_branch.html.haml (!9131 (merged))
  • notebook_viewer.html.haml
  • oauth_remember_me.html.raw
  • pdf_viewer.html.raw
  • pipeline_graph.html.haml
  • pipelines.html.haml
  • pipelines_table.html.haml (no longer there in 5388f5ee)
  • project_branches.json (no longer there in 5388f5ee)
  • projects.json (no longer there in 5388f5ee)
  • project_select_combo_button.html.raw
  • project_title.html.haml (!9175 (merged))
  • right_sidebar.html.haml (!7687 (merged))
  • search_autocomplete.html.haml
  • signin_tabs.html.haml
  • sketch_viewer.html.raw
  • target_branch_dropdown.html.haml (no longer there in 5388f5ee)
  • todos.json (!9211 (merged))
  • u2f/authenticate.html.haml (!8426 (merged))
  • u2f/register.html.haml (!8426 (merged))
  • zen_mode.html.haml (!7686 (merged))
Edited Aug 10, 2017 by Winnie Hellmann
Assignee
Assign to
Time tracking