Repository: zulip/zulip-terminal
Pull request #1437 (2023-11-07 00:04:51)

Updated the AboutView popup with Exit confirmation setting
Tests updated.

<!-- See README for documentation, or ask in #zulip-terminal if unclear -->
### What does this PR do, and why?
Added the Exit confirmation setting to the AboutView popup.


### Outstanding aspect(s)    <!-- DELETE SECTION IF EMPTY -->
<!-- In what ways is this not fully implemented/functioning? Compared to a discussion/issue? -->
<!-- Do you not understand something? Are you unsure about a certain approach? Want feedback? -->
- [ ] 

### External discussion & connections
<!-- [x] all that apply, specifying topic and adding numbers after # for issues/PRs -->
- [ ] Discussed in **#zulip-terminal** in `topic`
- [ ] Fully fixes #
- [ ] Partially fixes issue #
- [ ] Builds upon previous unmerged work in PR #
- [x] Is a follow-up to work in PR #1432
- [ ] Requires merge of PR #
- [ ] Merge will enable work on #

### How did you test this?
<!-- [x] all that apply -->
- [ ] Manually - Behavioral changes
- [x] Manually - Visual changes
- [x] Adapting existing automated tests
- [x] Adding automated tests for new behavior (or missing tests)
- [ ] Existing automated tests should already cover this (*only a refactor of tested code*)

### Self-review checklist for each commit
- [x] It is a [minimal coherent idea](https://github.com/zulip/zulip-terminal#structuring-commits---speeding-up-reviews-merging--development)
- [x] It has a commit summary following the [documented style](https://github.com/zulip/zulip-terminal#structuring-commits---speeding-up-reviews-merging--development) (title & body)
- [ ] It has a commit summary describing the  motivation and reasoning for the change
- [x] It individually passes linting and tests
- [x] It contains test additions for any new behavior
- [x] It flows clearly from a previous branch commit, and/or prepares for the next commit



rsashank: I think I might require some guidance here, I'm uncertain about the reason for the failure. I successfully run all tests on my local Pop!_OS machine.

Additionally, my forked repository is encountering issues with the `GitHub CodeQL/Analyse (push)` despite having being synced.
rsashank: @zulipbot add PR needs review
rsashank: @zulipbot help
rsashank: @zulipbot add "PR needs review"
neiljp: @rsashank Thanks for this update following the other PR - this looks great to merge :+1:

Patch:
diff --git a/zulipterminal/core.py b/zulipterminal/core.py
index 2799210..ddc7e89 100644
--- a/zulipterminal/core.py
+++ b/zulipterminal/core.py
@@ -307,6 +307,7 @@ class Controller:
                 notify_enabled=self.notify_enabled,
                 autohide_enabled=self.autohide,
                 maximum_footlinks=self.maximum_footlinks,
+                exit_confirmation_enabled=self.exit_confirmation,
             ),
             "area:help",
         )
diff --git a/zulipterminal/ui_tools/views.py b/zulipterminal/ui_tools/views.py
index 463478b..fcb1164 100644
--- a/zulipterminal/ui_tools/views.py
+++ b/zulipterminal/ui_tools/views.py
@@ -1086,6 +1086,7 @@ class AboutView(PopUpView):
         autohide_enabled: bool,
         maximum_footlinks: int,
         notify_enabled: bool,
+        exit_confirmation_enabled: bool,
     ) -> None:
         self.feature_level_content = (
             [("Feature level", str(server_feature_level))]
@@ -1103,6 +1104,10 @@ class AboutView(PopUpView):
                     ("Maximum footlinks", str(maximum_footlinks)),
                     ("Color depth", str(color_depth)),
                     ("Notifications", "enabled" if notify_enabled else "disabled"),
+                    (
+                        "Exit confirmation",
+                        "enabled" if exit_confirmation_enabled else "disabled",
+                    ),
                 ],
             ),
             (


Test patch:
diff --git a/tests/ui_tools/test_popups.py b/tests/ui_tools/test_popups.py
index e525397..be9ee49 100644
--- a/tests/ui_tools/test_popups.py
+++ b/tests/ui_tools/test_popups.py
@@ -200,6 +200,7 @@ class TestAboutView:
             notify_enabled=False,
             autohide_enabled=False,
             maximum_footlinks=3,
+            exit_confirmation_enabled=False,
         )
 
     @pytest.mark.parametrize(
@@ -241,6 +242,7 @@ class TestAboutView:
             notify_enabled=False,
             autohide_enabled=False,
             maximum_footlinks=3,
+            exit_confirmation_enabled=False,
         )
 
         assert len(about_view.feature_level_content) == (