Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ RSpec/DescribeClass:
Exclude:
- 'spec/integration/feed_importing_spec.rb'

# Offense count: 68
# Offense count: 70
# Configuration parameters: Max, CountAsOne.
RSpec/ExampleLength:
Exclude:
Expand All @@ -138,6 +138,7 @@ RSpec/ExampleLength:
- 'spec/system/feed_show_spec.rb'
- 'spec/system/feeds_index_spec.rb'
- 'spec/system/good_job_spec.rb'
- 'spec/system/import_spec.rb'
- 'spec/system/keyboard_shortcuts_spec.rb'
- 'spec/system/starred_spec.rb'
- 'spec/system/stories_index_spec.rb'
Expand Down
7 changes: 0 additions & 7 deletions app/javascript/controllers/auto_submit_controller.ts

This file was deleted.

3 changes: 0 additions & 3 deletions app/javascript/controllers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

import {application} from "./application";

import AutoSubmitController from "./auto_submit_controller";
application.register("auto-submit", AutoSubmitController);

import DialogController from "./dialog_controller";
application.register("dialog", DialogController);

Expand Down
5 changes: 3 additions & 2 deletions app/views/imports/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
</p>
<hr />

<%= form_with(url: "/feeds/import", id: "import", multipart: true, data: { controller: "auto-submit" }) do %>
<input id="opml_file" name="opml_file" type="file" title="<%= t('import.fields.import') %>" aria-label="<%= t('import.fields.import') %>" class="btn-primary" data-action="change->auto-submit#submit" />
<%= form_with(url: "/feeds/import", id: "import", multipart: true) do %>
<input id="opml_file" name="opml_file" type="file" title="<%= t('import.fields.choose_file') %>" aria-label="<%= t('import.fields.choose_file') %>" required />
<%= submit_tag(t('import.fields.import'), class: "btn btn-primary") %>
<a href="/setup/tutorial" id="skip" class="btn float-end"><%= t('import.fields.not_now') %></a>
<% end %>
</div>
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ en:
import:
description: Import your feeds from another service.
fields:
choose_file: Choose file
import: Import
not_now: Not now
subtitle: Let's setup your feeds.
Expand Down
38 changes: 0 additions & 38 deletions spec/javascript/controllers/auto_submit_controller_spec.ts

This file was deleted.

3 changes: 3 additions & 0 deletions spec/system/import_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
file_path = Rails.root.join("spec/fixtures/feeds.opml")

attach_file("opml_file", file_path, visible: false)
within("#import") { click_on("Import") }

expect(page).to have_text("We're getting you some stories to read")
end
Expand All @@ -26,13 +27,15 @@
file_path = Rails.root.join("spec/fixtures/invalid.opml")

attach_file("opml_file", file_path, visible: false)
within("#import") { click_on("Import") }

expect(page).to have_text("We're getting you some stories to read")
end

def import_grouped_opml
file_path = Rails.root.join("spec/fixtures/feeds.opml")
attach_file("opml_file", file_path, visible: false)
within("#import") { click_on("Import") }
expect(page).to have_text("We're getting you some stories to read")
end

Expand Down
Loading