Added action to add a item to a specific session#40
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
5052905 to
593c386
Compare
Coverage Report for CI Build 26218495076Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.9%) to 84.15%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
62b2b89 to
02dbf92
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGES.rst`:
- Line 14: Update the changelog entry text to fix the grammar: replace the
phrase "Added action to add a item to a specific session." with "Added action to
add an item to a specific session." in the CHANGES.rst content.
In `@src/imio/esign/browser/static/esign.css`:
- Around line 2-7: Remove the deprecated CSS property by deleting the
`word-wrap: break-word;` declaration inside the selector
`#add-to-custom-esign-session-form .sessions-table`; keep `overflow-wrap:
break-word;` and the other rules (`table-layout: fixed; width: 100%;`) unchanged
so stylelint no longer flags the deprecated property.
In `@src/imio/esign/tests/test_table.py`:
- Around line 59-63: This test mutates global registry via
set_esign_registry_seal_code and set_esign_registry_seal_email and doesn’t
restore them; update the test to capture the original values (call
get_esign_registry_seal_code/get_esign_registry_seal_email or read the registry
directly) before calling the setters and ensure restoration in a finally block
(or in tearDown) so the registry is reset after the assertions; reference the
calls to set_esign_registry_seal_code and set_esign_registry_seal_email in the
test to locate where to save and restore the originals.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 20585ff0-57e4-4ecb-8954-cda8cd291046
📒 Files selected for processing (9)
CHANGES.rstsrc/imio/esign/browser/actions.pysrc/imio/esign/browser/configure.zcmlsrc/imio/esign/browser/static/esign.csssrc/imio/esign/browser/static/esign.jssrc/imio/esign/browser/table.pysrc/imio/esign/browser/templates/add_to_custom_esign_session.ptsrc/imio/esign/tests/test_actions.pysrc/imio/esign/tests/test_table.py
| set_esign_registry_seal_code(u"PADES_SEAL") | ||
| set_esign_registry_seal_email(u"seal@example.com") | ||
| columns = table.setUpColumns() | ||
| self.assertEqual(len(columns), 6) | ||
| self.assertTrue(any(isinstance(column, SealColumn) for column in columns)) |
There was a problem hiding this comment.
Reset registry values after this test mutation.
set_esign_registry_seal_code / set_esign_registry_seal_email are changed but never restored, which can leak state into later tests on shared layers.
Suggested fix
def test_setUpColumns(self):
"""Returns 5 columns without seal; 6 with seal config set."""
+ # Keep test isolated
+ self.addCleanup(set_esign_registry_seal_code, u"")
+ self.addCleanup(set_esign_registry_seal_email, u"")
table = FilteredSessionsTable(self.folder, self.mock_view, self.request)
columns = table.setUpColumns()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/imio/esign/tests/test_table.py` around lines 59 - 63, This test mutates
global registry via set_esign_registry_seal_code and
set_esign_registry_seal_email and doesn’t restore them; update the test to
capture the original values (call
get_esign_registry_seal_code/get_esign_registry_seal_email or read the registry
directly) before calling the setters and ensure restoration in a finally block
(or in tearDown) so the registry is reset after the assertions; reference the
calls to set_esign_registry_seal_code and set_esign_registry_seal_email in the
test to locate where to save and restore the originals.
02dbf92 to
8d4b531
Compare
Summary by CodeRabbit