Commit Graph

42807 Commits

Author SHA1 Message Date
Steve Howell b543116193 node tests: Eliminate redundant "social" sub. 2021-05-19 15:55:03 -04:00
Steve Howell 62eca19b86 node tests: Eliminate sloppy_$ for compose tests. 2021-05-19 15:55:03 -04:00
Steve Howell 967506bbc7 node tests: Simplify rtl testing. 2021-05-19 15:55:03 -04:00
Steve Howell 394c4b32cf minor: Sort zrequire statements. 2021-05-19 15:55:03 -04:00
Steve Howell 7eece8a80e node tests: Remove sloppy_$ for compose_validate. 2021-05-19 15:55:03 -04:00
Steve Howell 48e5077201 node tests: Extract compose_validate.js
This is pretty much a verbatim code move,
except that I inlined noop and reset_jquery
in the new file.

Also, in the last test, I no longer reset
the compose state.
2021-05-19 15:55:03 -04:00
Steve Howell 338d2dc29a node tests: Localize overrides for compose test. 2021-05-19 15:55:03 -04:00
akshatdalton 9554514d3c refactor: Merge `markdown_katex.js` test file with `markdown.js`.
We split them in the commit: c50dbf8297
because at that time we thought markdown_katex was gonna
require rewireproxy magic in the later commits.
But we later removed the rewiremock dependency in the
commit: 30c7108955.

So now, we can safely merge `markdown_katex.js` test file
with `markdown.js` test file.
2021-05-19 11:59:28 -07:00
akshatdalton 769cd06ab6 refactor: Extract linkifier non-settings logic from `markdown.js`.
The extracted logic is in linkifier.js.
We have decided to name it linkifier.js instead of realm_linkifier.js
because in future when we will add stream-level linkifiers, we'll
likely want them to be managed by this same file.
2021-05-19 11:59:28 -07:00
Abhijeet Prasad Bodas 0ec905ed52 custom_check: Enforce use of assert_length helper. 2021-05-19 11:55:56 -07:00
Abhijeet Prasad Bodas 352634a851 tests: Consistently use assert_length helper.
This helper does some nice things like printing out
the data structure incase of failure.
2021-05-19 11:55:56 -07:00
Abhijeet Prasad Bodas 4d45b45640 test_classes: Generalize assert_length helper.
Make it so that `assert_length` can be used for not
just lists but all `Collections`.

This is prep for using this helper consistently for
all tests.
2021-05-19 11:55:56 -07:00
Aman Agrawal ddfb9b5200 tippy: Increase font size from 12 to 13px.
Increasing the font size for clear visibility.
2021-05-19 11:20:49 -07:00
sahil839 48761208f0 css: Change width of upgrade-tip and to max-content.
We change the width of upgrade-tip to be max-content
such that it matches with the other elements in
settings overlay like dropdown, which are not of full
width.
2021-05-19 11:04:32 -07:00
sahil839 cf23a09532 giphy: Fix live update of giphy icon when API key is empty.
We fix the code to show giphy icon live update only if the
updated setting is not disabled and API key has been added.
Though the dropdown is disabled,the setting can still be
changed using API, so this change is necessary.

Previously, we were not checking whether API key is there or
not and icon was shown on live update even if API key was
not there and then it went off on reload.
2021-05-19 11:04:32 -07:00
sahil839 cf6fc3456f giphy: Disable giphy settings dropdown if API key is not present. 2021-05-19 11:04:32 -07:00
Steve Howell ef4446204d node tests: Add test wrapper for message_list_view. 2021-05-19 11:20:23 -04:00
Steve Howell 664afd2a1c node tests: Clean up electron_bridge test.
We use with_field to avoid leaks and then
just organize things better.
2021-05-19 11:06:18 -04:00
Tim Abbott 3b181968aa settings: Fix setting JITSI_SERVER_URL to None.
This fixes a bug introduced in
55a23754c3, that resulted in Zulip
crashing on startup if JITSI_SERVER_URL=None.

Fixes #18512.
2021-05-18 19:16:47 -07:00
Tim Abbott 9126ed33c9 puppeteer: Remove failing linkifier tests.
I'm not sure that settings UI is particularly worth having puppeteer
tests for, so it's possible we shouldn't bring these back at all.  But
in any case, it's worth disabling them as they've been failing for
some time.
2021-05-18 19:16:47 -07:00
Riken Shah e4bbfe5eb7 puppeteer_test: Add wait call for linkifier table to get updated.
This commit solves a rare flake, where the `realm
_linkifier.ts` test was failing because there was no
appropriate wait call for the table
(`#admin_linkifiers_table`) to get updated after editing
the pattern.
2021-05-18 18:46:17 -07:00
Riken Shah 2015d55a17 puppeteer_test: Use edit linkifier modal's id to check if it's closed. 2021-05-18 18:46:17 -07:00
Vishnu KS 5ad50b19cb billing: Show billing email in /billing page. 2021-05-18 17:46:38 -07:00
Tim Abbott 80a30c83e5 home: Remove unused root_domain_uri parameter. 2021-05-18 17:36:55 -07:00
Tim Abbott e1c885aeb9 home: Remove unused has_mobile_devices parameter.
This parameter has never been used, and causes an unnecessary database
query.

We keep the num_push_devices_for_user function, since we may have uses
for it down the line.

Fixes part of #14166.
2021-05-18 17:36:55 -07:00
Nikhil Maske 1428310973 muted_user_settings: Add table-sticky-headers class to table header.
table-sticky-headers class is used to make the header of the
table fix at the top.
2021-05-18 17:36:13 -07:00
PIG208 4e8dd43841 devtools: Improve the appearance of dev_panel. 2021-05-18 17:35:29 -07:00
rht aa3cdfa2e9 Fix typos using codespell.
The command:
codespell --skip='./locale,*.svg,./docs/translating,postgresql.conf.template.erb,.*fixtures,./yarn.lock,./docs/THIRDPARTY,./tools/setup/emoji/emoji_names.py,./tools/setup/emoji/emoji_map.json,./zerver/management/data/unified_reactions.json' --ignore-words=codespell_ignore_words.txt .

The content of codespell_ignore_words:
```
te
ans
pullrequest
ist
cros
wit
nwe
circularly
ned
ba
ressemble
ser
sur
hel
fpr
alls
nd
ot
```
2021-05-18 17:33:51 -07:00
Aman Agrawal d1c385f425 docs: Clarify how to set GIPHY API key in settings. 2021-05-18 17:32:55 -07:00
akshatdalton 9e5f2f841f rendered_markdown: Add support for rendering of user group silent mention.
Earlier, the text in silently mentioned user group was rendered
as: `@user-group`

which is fixed by this commit and now it rendered as: `user-group`.
2021-05-18 17:31:25 -07:00
akshatdalton 18203d8af3 markdown: Silence user group mention inside blockquotes. 2021-05-18 17:31:25 -07:00
akshatdalton 0245b590e9 markdown: Add support for user group silent mention.
Prior to this, we only supported direct mention to
the user groups. This commit extends that support
to silent mention for the user groups.
A related test case is also added.

Fixes: #11711.
2021-05-18 17:31:25 -07:00
akshatdalton f56fca308a mention: Refactor `USER_GROUP_MENTIONS_RE` and simplify its related code path.
Earlier, USER_GROUP_MENTIONS_RE was:
r"(?<![^\s\'\"\(,:<])@(\*[^\*]+\*)"

For the syntax: *foo*, this was unnecessarily capturing it as
*foo* and the extraction of `foo` was done using another helper
function: `extract_user_group`.

This is now changed as:
r"(?<![^\s\'\"\(,:<])@(\*(?P<match>[^\*]+)\*)"

and extraction of `foo` can be done just by using the named capture
group `match`.

This change also helps to simplify its related code path.
2021-05-18 17:31:25 -07:00
akshatdalton d5a36ac5e2 mention: Refactor `MENTIONS_RE` and simplify its related code path.
Earlier, MENTIONS_RE was:
r"(?<![^\s\'\"\(,:<])@(?P<silent>_?)(?P<match>\*\*[^\*]+\*\*)"

For the syntax: **foo**, this was unnecessarily capturing it as
**foo** and adding extra operation for the extraction of `foo`.

This is now changed as:
r"(?<![^\s\'\"\(,:<])@(?P<silent>_?)(\*\*(?P<match>[^\*]+)\*\*)"

and extraction of `foo` can be done just by using the named capture
group `match`.

This change also helps to simplify its related code path.
2021-05-18 17:31:25 -07:00
akshatdalton 738a676534 mention: Remove deprecated wildcard mention pattern from `MENTIONS_RE`.
Earlier wildcard mentions were used as: @all, @everyone, @stream.
This syntax is deprecated and we will no longer support
this syntax in future. See the commits:

1. 7a4c3c1a5c
2. b650b6b38c

When we started to use these syntaxes for wildcard mentions.
2021-05-18 17:31:25 -07:00
akshatdalton a9d89b3c56 minor: Convert `unicode_emoji_regex` to uppercase.
Following the convention, we use uppercase for
regex. Also, `unicode_emoji_regex` is given a
conventional name ending with `*_RE`: `UNICODE_EMOJI_RE`.
2021-05-18 17:31:25 -07:00
akshatdalton ffc4724287 minor: Convert `emoticon_regex` to uppercase.
Following the convention, we use uppercase for
regex. Also, `emoticon_regex` is given a
conventional name ending with `*_RE`: `EMOTICON_RE`.
2021-05-18 17:31:25 -07:00
akshatdalton 9f6e6709d3 minor: Convert `user_group_mentions` to uppercase.
Following the convention, we use uppercase for
regex. Also, `user_group_mentions` is given a
conventional name ending with `*_RE`: `USER_GROUP_MENTIONS_RE`.
2021-05-18 17:31:25 -07:00
akshatdalton 0a01b1b28e minor: Convert `find_mentions` to uppercase.
Following the convention, we use uppercase for
regex. Also, `find_mentions` is given a
conventional name ending with `*_RE`: `MENTIONS_RE`.
2021-05-18 17:31:25 -07:00
Steve Howell bdb2fa707c node tests: Use override for insert_or_move. 2021-05-18 18:34:17 -04:00
Steve Howell 1246970c23 node tests: Tweak test for first/prev/next. 2021-05-18 18:34:17 -04:00
Steve Howell eb46ac408d node tests: Add activity.clear_for_testing(). 2021-05-18 18:34:17 -04:00
Steve Howell fb0ba995c3 node tests: Use real version of keydown_util. 2021-05-18 18:34:17 -04:00
Steve Howell 5cbeaf1728 node test: Simplify presence statuses.
The test() wrapper makes a new map every time
with only "mark" as the idle user.
2021-05-18 18:34:17 -04:00
Steve Howell 2d02297f43 node tests: Use test() wrapper consistently.
The diff is slightly noisy due to some lexical
code moves, but otherwise it's search/replace.
2021-05-18 18:34:17 -04:00
Steve Howell 36077774fc node tests: Use override for fill_screen_with_content. 2021-05-18 18:34:17 -04:00
Steve Howell 7a9d0a505d node tests: Avoid rewiring client_is_active. 2021-05-18 18:34:17 -04:00
Steve Howell 7a3ba26c78 zjquery: Support $(...)[i] syntax. 2021-05-18 18:34:17 -04:00
Steve Howell 976374ed04 buddy_list: Localize overrides for buddy_list. 2021-05-18 18:34:17 -04:00
Steve Howell b7a188fde8 node tests: Deepen filter_user_ids test.
We now test that activity.build_user_sidebar
integrates with the user_search code.
2021-05-18 18:34:17 -04:00