This fixes a nondeterministic test failure for me.
The first message sent in the test suite appears to get dropped. I don't know
why this is, and I'm pretty sure it was an existing bug. This message used to
be the one disabling the tutorial, which might explain why that didn't always
work.
Regardless, this commit at least makes the test suite usable, and we can work
on fixing that bug later.
(imported from commit 063e40871b9883e3a6dab93a4e0a51c5b2dae4b7)
I think my previous commit causes the tutorial to run more regularly
in the test suite, so we, in turn, need to be more systematic
about disabling it.
(imported from commit c3805438b0564874a358526d3592b86d147547c0)
Otherwise we're by default testing the phone size layout, which
probably isn't what we want the default test setup to be.
(imported from commit a76b2d51c18824b0a5f6342cce848aca87dda15a)
This cuts about 6 seconds off of the test startup time on my laptop.
The other startup costs are about 1 second for the server to come up
and about half a second for casperjs to begin executing tests.
generate-fixtures now takes a '--force' option that can be use to
force a regeneration of the test database.
(imported from commit 1f473507502f0edf159b2638abb392d9357eb46f)
Previously, using e.g. the search box would be problematic because the
compose box closing event might fire, blurring the search box, in the
middle of whatever you were doing.
(imported from commit cc045f5a6a7b7fbf72848da14b6fcd3df39cab05)
I don't actually have this problem, but Jessica et al tell me that the
tutorial bot's messages sometimes arrive too late for them and it
interferes with the test suite's ability to run correctly.
I add a delay which should hopefully reduce the occurrence
of this issue.
(imported from commit 0f41610ada7dd49d71f0deef034e014164357197)
Waiting for text "Waseemio" to appear isn't reliable, because the "create
stream" modal already contains that text. Instead, do a more specific check
for a .subscription_name element.
(imported from commit 54689aeb9d243c3fb62d1765b2b4fb93d3bb40db)
The fact that the user sees a change (the button changes or a row
appears) makes it obvious that the operation was a success. The
success messages were only serving to make the page scroll
confusingly when you couldn't see the top.
(imported from commit 471b9304f71bb8533c98d208b855d4d75c04a886)
Previously it wouldn't work due to using the wrong port numbers.
This commit also has the side effect of fixing the fact that our
frontend tests would send real emails and log events to the real
message log.
(imported from commit f2cf400e6061c089627acba2759d588981ecf5bb)
We apparently cannot rely on Iago to consistently be subscribed to
"Denmark", so make this determination some other way.
(imported from commit 2a75b345c2d82097ab44538942af89536aac09ed)
So, I got annoyed that our test suite was taking forever to run:
real 2m13.443s
user 1m32.630s
sys 0m3.748s
Some quick profiling determined that the test suite is spending all of
its time loading the fixtures files (zephyr/fixtures/messages.json)
that it loads for each test case (3s to load that for each test case).
To improve this situation, I cut out from the test database used by
the test suite most of the users, subscriptions, etc. that aren't
being used directly by the test cases. The impact is a quite
significant speedup:
real 0m15.176s
user 0m9.161s
sys 0m0.508s
We're still spending over a quarter of a second per test, which isn't
great -- but this is at least no longer unbearable.
This commit doesn't make any changes to the populate_db output if you
don't pass the new --test-suite option.
(imported from commit 2334ba5399b33edab3d29ff269fde4ea77ccd48e)
Apparently after you call waitForText, if you don't specify
a callback function, you need to put the next stuff after
a casper.then() -- not doing so caused some tests to fail
if, e.g. the subscription list did not load super-promptly
(because we checked for the text even before the waitFor
expired; in other words, we were not blocking on it.)
(imported from commit c71d543db0aba0c27b5136b92bb6e28e63278ac5)
Run this script on an existing realm to create or change default
streams, which new users will get upon account creation.
(imported from commit 8938dcbd3520d97d25b4c6ca783d35c9aef52df0)
One way this can happen is if run-dev.py --test is already running. In that
case the one we launch will die with "Address already in use", and we should
alert the user that test results may not be accurate.
(imported from commit 078091cace2cff777b444668b03f96dc208f22fc)
Previously we bypassed the big buttons on the left bar and clicked on
the anchor tag inside the compose box. This bypassed the
compose.start() call.
(imported from commit 2b627825596c8d3c21441e58db895b8e488e624b)
Personals are now just private messages between two people (which
sometimes manifests as a private message with one recipient). The
new message type on the send path is 'private'. Note that the receive
path still has 'personal' and 'huddle' message types.
(imported from commit 97a438ef5c0b3db4eb3e6db674ea38a081265dd3)