mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
feat(settings): add pagination to imports and exports pages (#598)
* feat(settings): split imports and exports * feat(security): sanitize pagination params to prevent abuse * fix(settings): fix syntax in settings nav * feat(settings): internationalize family_exports and imports UI strings * fix(settings): fix coderabbit review * fix(settings): fix coderabbit review * fix(settings): fix coderabbit review * Change default per_page value from 20 to 10 Signed-off-by: Juan José Mata <jjmata@jjmata.com> * Add `/family_export` to navigation * Consistency with old defaults * Align `safe_per_page` even if not DRY --------- Signed-off-by: Julien Orain <julien.orain@gmail.com> Signed-off-by: Juan José Mata <jjmata@jjmata.com> Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: JulienOrain <your-github-email@example.com> Co-authored-by: Juan José Mata <jjmata@jjmata.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
|
||||
post family_exports_path
|
||||
end
|
||||
|
||||
assert_redirected_to imports_path
|
||||
assert_redirected_to family_exports_path
|
||||
assert_equal "Export started. You'll be able to download it shortly.", flash[:notice]
|
||||
|
||||
export = @family.family_exports.last
|
||||
@@ -67,7 +67,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
|
||||
export = @family.family_exports.create!(status: "processing")
|
||||
|
||||
get download_family_export_path(export)
|
||||
assert_redirected_to imports_path
|
||||
assert_redirected_to family_exports_path
|
||||
assert_equal "Export not ready for download", flash[:alert]
|
||||
end
|
||||
|
||||
@@ -78,7 +78,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
|
||||
delete family_export_path(export)
|
||||
end
|
||||
|
||||
assert_redirected_to imports_path
|
||||
assert_redirected_to family_exports_path
|
||||
assert_equal "Export deleted successfully", flash[:notice]
|
||||
end
|
||||
|
||||
@@ -95,7 +95,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
|
||||
delete family_export_path(export)
|
||||
end
|
||||
|
||||
assert_redirected_to imports_path
|
||||
assert_redirected_to family_exports_path
|
||||
assert_equal "Export deleted successfully", flash[:notice]
|
||||
end
|
||||
|
||||
@@ -112,7 +112,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTest
|
||||
delete family_export_path(export)
|
||||
end
|
||||
|
||||
assert_redirected_to imports_path
|
||||
assert_redirected_to family_exports_path
|
||||
assert_equal "Export deleted successfully", flash[:notice]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user