Commit graph

83 commits

Author SHA1 Message Date
Audric Ackermann
6c2aefbe11
fix unit tests: remove not used count in scrolldown view and assert svg
present
2020-01-29 13:35:26 +11:00
Beaudan
ccfc9046b4 Fix tests 2019-08-07 14:58:32 +10:00
Mikunj
12ce0140de Left pane changes.
Merge commit 'b3ac1373fa64117fe2a9ccfddf3712f1826c06d9' into signal-1.23

# Conflicts:
#	_locales/en/messages.json
#	background.html
#	js/background.js
#	js/conversation_controller.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/views/conversation_list_item_view.js
#	js/views/conversation_list_view.js
#	js/views/conversation_search_view.js
#	js/views/inbox_view.js
#	libtextsecure/account_manager.js
#	package.json
#	stylesheets/_global.scss
#	stylesheets/_index.scss
#	stylesheets/_modules.scss
#	test/_test.js
#	test/index.html
#	test/models/conversations_test.js
#	test/views/conversation_search_view_test.js
#	ts/components/ConversationListItem.tsx
#	ts/components/MainHeader.tsx
#	ts/components/conversation/ConversationHeader.tsx
#	ts/components/conversation/ResetSessionNotification.tsx
2019-04-17 16:42:09 +10:00
Mikunj
e343a04eea Merge commit '18b5b7c046436f2defab2e20407e22da180bf97b' into signal-1.22
# Conflicts:
#	app/sql.js
#	background.html
#	config/default.json
#	js/background.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/modules/data.js
#	js/signal_protocol_store.js
#	js/views/conversation_search_view.js
#	libtextsecure/message_receiver.js
#	libtextsecure/sendmessage.js
#	main.js
#	package.json
#	preload.js
#	test/index.html
#	ts/components/Avatar.tsx
#	ts/components/conversation/ConversationHeader.md
#	ts/components/conversation/ConversationHeader.tsx
2019-04-17 11:59:54 +10:00
Scott Nonnenberg
b3ac1373fa Move left pane entirely to React 2019-03-12 17:44:14 -07:00
Scott Nonnenberg
5b54c9554e Remove groups table, conversation is single source of truth 2019-02-13 16:04:58 -08:00
Mikunj
6bd2d3962e Linted files 2019-01-16 16:18:08 +11:00
Beaudan
eb7a0dbb3a Fix failing tests except for problematic spellcheck package 2018-12-05 15:19:24 +11:00
Beaudan
d8a410cc69 Linting of the test flies 2018-12-05 15:19:24 +11:00
Mikunj
0a88f337d5 Merge branch 'sig-development' into merge/signal 2018-11-12 10:06:34 +11:00
Scott Nonnenberg
dbf0be2db5 eslintify all test files 2018-11-07 16:34:38 -08:00
Scott Nonnenberg
884bc9333d Make timestamp test a bit more forgiving 2018-11-07 16:34:20 -08:00
Mikunj
1a4adf2281 Merge branch 'development' into merge/signal 2018-11-08 07:23:27 +11:00
Mikunj
f589fdac5c Merge signal changes into branch. 2018-11-07 15:26:37 +11:00
Mikunj
4e6df71999 Fix up tests. 2018-11-07 12:15:22 +11:00
Scott Nonnenberg
0297279084 Eliminate some conversation fields which are no longer used 2018-11-01 17:00:24 -07:00
Scott Nonnenberg
cd60bdd08a Move conversations to SQLCipher 2018-10-01 18:18:37 -07:00
Scott Nonnenberg
61f7b8360b Conversation: store lastMessage/lastMessageStatus in memory only 2018-07-27 10:55:10 -07:00
Scott Nonnenberg
3c69886320 Finish new Message component, integrate into application
Also:
- New schema version 8 with video/image thumbnails, screenshots, sizes
- Upgrade messages not at current schema version when loading messages
  to show in conversation
- New MessageDetail react component
- New ConversationHeader react component
2018-07-17 15:58:07 -07:00
Scott Nonnenberg
cfe0bd0e79 Move to npm for several dependencies
mustache
jQuery
underscore
backbone
mocha
chai
intl-tel-input
2018-05-23 16:26:48 -07:00
Daniel Gasienica
95321e5d3e Remove Vim mode lines 2018-04-30 16:53:34 -04:00
Daniel Gasienica
1dd87ad197 Format all source code using Prettier 2018-04-30 16:53:34 -04:00
Daniel Gasienica
41fe50553f Replace Backbone saveFile with Attachment.save 2018-04-27 16:31:42 -04:00
Scott Nonnenberg
c02860af5c
Responding to pull request review feedback
- messages.getQuoteObjectUrl: early return
- backup.js: explaining variables for long if statement
- types/messages.js: Log if thumbnail has neither data nor path
- sendmessage.js:
  - remove extraneous logging
  - fix indentation
  - upload attachments and thumbnails in parallel
- preload: don't load fs for tests, just fse
- _conversation.scss: split two selectors into two lines, 0px -> 0
- backup_test.js: use fse.existsSync and comment twoSlashes regex
- network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
2018-04-23 15:36:47 -07:00
Scott Nonnenberg
3abaeb807d
Prevent infinite repeated errors on leaving electron tests open 2018-04-20 15:24:03 -07:00
colefranz
234411cb29 issue-2023: introduce unit tests for inbox view
There were no unit tests for the file at all so I added some simple ones
mostly focused on my changes.
2018-04-04 15:42:13 -04:00
Daniel Gasienica
9c7afab21b Clear database before message view tests 2018-04-03 11:45:11 -04:00
Daniel Gasienica
d6ea158e46 Avoid dangerouslyCreateAndAdd in MessageView test 2018-03-27 19:52:18 -04:00
Daniel Gasienica
83c979fb84 Rename createTemporary to dangerouslyCreateAndAdd
Class: `ConversationController`.

This function should not be used in application code as it creates potentially
invalid `Conversation` instances in our global conversation collection. We keep
making it available for testing purposes.
2018-03-27 19:52:17 -04:00
Scott Nonnenberg
426dab85a2
New design for import/install, 'light' import (#2053)
- A new design for the import flow. It features:
  - Icons at the top of every screen
  - Gray background, blue buttons, thinner text
  - Simpler copy
- A new design for the install flow. It features:
  - Immediate entry into the QR code screen
  - Animated dots to show that we're loading the QR code from the server
  - Fewer screens: 1) QR 2) device name 3) sync-in-progress
- When not set up, the app opens directly into the install screen, which has been streamlined. The `--import` command-line argument will cause the app to open directly into the import flow.
- Support for two different flavors of builds - the normal build will open into the standard registration flow, and the import flavor will be exactly the same except during setup it will open directly into the import flow.
- A new design for the (dev-only) standalone registration view
- When these install sequences are active, the OS File menu has entries to allow you to switch the method of setup you'd like to use. These go away as soon as the first step is taken in any of these flows.
- The device name (chosen on initial setup) is now shown in the settings panel
- At the end of a light import, we hand off to the normal device link screen, starting at the QR code. On a full import, we remove the sensitive encryption information in the export to prevent conflicts on multiple imports.
- `Whisper.Backup.exportToDirectory()` takes an options object so you can tell it to do a light export.
- `Whisper.Backup.importFromDirectory()` takes an options object so you can force it to load only the light components found on disk. It also returns an object so you can tell whether a given import was a full import or light import.
- On start of import, we build a list of all the ids present in the messages, conversations, and groups stores in IndexedDB. This can take some time if a lot of data is in the database already, but it makes the subsequent deduplicated import very fast.
- Disappearing messages are now excluded when exporting
- Remove some TODOs in the tests
2018-02-22 10:40:32 -08:00
Lilia
9c7ba87d6a Add support for Emoji 5 (#1797)
* Add support for Emoji 5

Update to latest emoji-datasource and emoji-js and switch to an up-to-date fork
of emoji-panel.

// FREEBIE

* Dark theme support for emoji-panel

Fixes #1763

// FREEBIE
2017-11-27 15:54:59 -08:00
Lilia
4449a5f110 Upgrade emoji support (#1482)
* Upgrade emoji deps and move to node_modules

Add support for Emoji 3.0 and switch from bower to yarn for managing emoji
dependencies.

// FREEBIE

* Delete old emoji deps

// FREEBIE

* Don't copy emoji on windows

It is no longer necessary since the symlinked image dir is gone.

// FREEBIE

* Update emoji test

// FREEBIE

* Fix emoji tests; remove all overrides of emoji-js functions

FREEBIE
2017-09-15 13:22:11 -07:00
Scott Nonnenberg
f84d8038c1
Remove i18n stub used in NetworkStatusView tests
FREEBIE
2017-09-14 16:53:47 -07:00
Scott Nonnenberg
a9b4109e9b
Fix NetworkStatusView tests' stubbing of window.i18n
FREEBIE
2017-09-14 16:53:46 -07:00
Scott Nonnenberg
c77554533c
Fix emoji test, since emoji image paths no longer start with /
FREEBIE
2017-09-14 16:53:46 -07:00
Scott Nonnenberg
cc6dcf67b7 Export: Limit attachment filename length, + convo date, + tests (#1439)
* Export: limit attachment names to 30 chars, tests for helper fns

Also, reintroduce last contact date in conversation dir name

FREEBIE

* MessageView tests: Fix failures during blanket coverage run

FREEBIE
2017-09-06 18:20:42 -07:00
Scott Nonnenberg
d8ce198f55 Fetch conversations once, clean up ConversationController API (#1420)
* Fetch conversations once, clean up ConversationController API

Race conditions around re-fetching have caused some problems recently,
so this removes the need to re-fetch conversations. They are fetched
once or saved once, and that is it. All interaction goes through the
ConversationController, which is the central source of truth.

We have two rules for Conversations:

1. If a conversation is in the ConversationController it doesn't need
   to be fetched, but its initial fetch/save might be in progress. You
   can wait for that fetch/save with conversation.initialPromise.
2. If a conversation is not already in the ConversationController, it's
   not yet in the database. It needs to be added to the
   ConversationController and saved to the database.

FREEBIE

* Remove Conversation.fetch() call in Message.handleDataMessage()

FREEBIE

* ConversationController.API cleanup: Fix two missing spots

FREEBIE
2017-09-01 09:10:41 -07:00
Scott Nonnenberg
01918049b4 Keep last seen indicator around for five seconds
Helps calm the user experience a little more, makes it easier to
understand what's happening when messages are coming in quickly.

FREEBIE
2017-05-25 16:41:21 -07:00
lilia
017bb56cca Fix some corner casese with last seen indicator
* Remove increment behavior
* Dismiss when new messages arrive but the window is focused
* Update the indicator when window becomes focused.

// FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg
4c7bfbe9ff Scroll down button: when scrolled up, or new non-visible message
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg
318162e74a LastSeenIndicatorView: programmatic tests, tweak to manual tests
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg
3cfac58d78 Eliminate all console errors during test run
FREEBIE
2017-05-23 11:08:23 -07:00
Scott Nonnenberg
731fcb8ecb Add test verifying that AttachmentView shows file size
FREEBIE
2017-05-09 15:14:20 -07:00
lilia
6c7e1aa283 Update tests 2017-04-18 16:27:50 -07:00
lilia
d0448ec778 Fix tests
// FREEBIE
2017-04-13 13:15:42 -07:00
Sam Vevang
ed4991974b set up a new view for displaying the network status
// FREEBIE
2017-04-08 00:10:56 -07:00
Blake Griffith
1e498294e0 Add attachment_views_test.js tests 2017-02-06 21:23:35 -08:00
lilia
7e0df07e88 Fix tests
// FREEBIE
2016-09-01 13:47:50 -07:00
lilia
67c7a06c28 Use momentjs for timestamp localization
Let momentjs handle proper pluralization of relative times. This comes
at the sacrifice of displaying 'minutes' in the conversation list
timestamp rather than 'min'. Note that we don't use moment's fromNow
instance method so as to preserve the rounding logic that matches the
Android client.

// FREEBIE
2016-08-11 12:22:32 -07:00
lilia
7b29a567b5 More consistent timestamps
* Apply the same rounding to in message bubbles and conversation list.
  Also make them consistent with Android's relative times. Fixes #682
* Show full timestamps when hovering on relative time
* Compute timestamp update delays more precisely:
  Set timestamps to self-update as soon as they are able to change
  rather than a fixed time since the last update.
* Refactor for customizable/localizable relative times
* Update timestamp tests
* Log timestamp update intervals to help debug #460
2016-04-21 12:06:39 -07:00