Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

976 redirect to calculator page after creation #980

Conversation

DanielVajnagi
Copy link
Contributor

@DanielVajnagi DanielVajnagi commented Nov 26, 2024

Code reviewers

Second Level Review

Summary of issue

After creation, the program should transfer to the page of this calculator in the admin panel

Summary of change

Created show page for calculator on admin, added redirect

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.74%. Comparing base (f934abb) to head (93b3629).
Report is 16 commits behind head on calculators-constructor.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           calculators-constructor     #980   +/-   ##
========================================================
  Coverage                    86.74%   86.74%           
========================================================
  Files                           68       68           
  Lines                         1056     1056           
========================================================
  Hits                           916      916           
  Misses                         140      140           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DanielVajnagi DanielVajnagi changed the base branch from feature/calculator-constructor to calculators-constructor November 26, 2024 11:09
@@ -67,7 +67,8 @@
post account_calculators_path, params: { calculator: valid_attributes }
end.to change(Calculator, :count).by(1)

expect(response).to redirect_to(account_calculators_path)
calculator = Calculator.last
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну що це таке? Я вже не один раз казав, що ми НІКОЛИ не використовуємо змінні у тестах

@@ -67,7 +67,7 @@
post account_calculators_path, params: { calculator: valid_attributes }
end.to change(Calculator, :count).by(1)

expect(response).to redirect_to(account_calculators_path)
expect(response).to redirect_to(account_calculator_path(slug: Calculator.last))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use let for last calculator

Copy link
Collaborator

@loqimean loqimean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

порізолвай конфлікти

@DanielVajnagi DanielVajnagi self-assigned this Dec 2, 2024
@loqimean loqimean merged commit c2a5c9b into calculators-constructor Dec 4, 2024
7 checks passed
@loqimean loqimean deleted the 976-redirect-to-calculator-page-after-creation branch December 4, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for QA
Development

Successfully merging this pull request may close these issues.

3 participants