276 Commits
Author SHA1 Message Date
Ian Denhardt 1c4af63960 Add missing import of run_xfail. 2022-04-10 20:16:01 -04:00
Ian Denhardt fdbaa99c61 tests/README.md: suggest opening issues/linking for xfail tests. 2022-04-10 19:02:12 -04:00
Ian Denhardt bf6036ceca Mark other known test failures as xfail. 2022-04-10 18:51:08 -04:00
Ian Denhardt 5864b8be39 Link to an open issue about demo test failures. 2022-04-10 18:50:41 -04:00
Ian Denhardt 87650fcaf2 Document and generalize DISABLE_DEMO as RUN_XFAIL.
I want to use this for a few other longstanding known failures.

This patch:

- Changes the variable names from disable demo to run xfail, for the
  sake of being general and avoiding double negatives everywhere.
- Changes the way the check is made to be consistent with SHOW_BROWSER
- Documents the variable in tests/README.md
2022-04-10 18:38:01 -04:00
Ian Denhardt 8ccebdcebf Fold functionality for web-publishing test into test-app.
Rather than depending on the external repository at
https://github.com/jparyani/sandstorm-test-app/tree/web-publishing.

The relevant test still fails in the same way as before, but this
puts us in a better position to work on fixing it.
2022-04-10 17:15:29 -04:00
Kenton Varda 83f59729f1 Merge pull request #3558 from zenhack/remove-stale-phantomjs-refs
Remove remaining references to phantomjs
2021-10-02 16:38:42 -05:00
Jim Garrison dc9ff4ba45 Improve docs regarding test suite
- Add instructions for installing xvfb
- Add instructions for installing test dependencies on Fedora
- Mention tests/README.md in docs/install.md
2021-09-20 20:27:50 -04:00
Ian Denhardt 3df7337b19 Remove remaining references to phantomjs
We haven't atually used phantomjs in a long time, but apparently we
never actually removed these bits.
2021-09-05 00:47:38 -04:00
Kenton Varda 816a6a6ae8 tests: Update firefox-profile to work on node 14
I'm a little confused what we use this package for since we don't test against Firefox...
2021-09-04 13:32:36 -05:00
Kenton Varda d68ad52f3e tests: meteor npm update --save 2021-09-04 12:24:36 -05:00
Jacob Weisz 63551e2356 Artifacts from failing tests get valid filenames 2021-08-12 16:40:48 -05:00
Kenton Varda 46da78eedb Merge pull request #3463 from troyjfarrell/issue-3428
Add pathname and hash support for shared URLs
2021-01-23 18:24:15 -06:00
Kenton Varda 69d8b672d0 Merge pull request #3492 from troyjfarrell/fix-grain-tests
Fix tests/grain.js tests using Chromium 80 and Debian 10
2021-01-23 18:20:27 -06:00
Troy J. Farrell 83e8d8bfff Assert that the sharing link is present 2021-01-19 13:45:31 -05:00
Troy J. Farrell 1778bb6305 Add a test for the startSharing API changes 2021-01-19 01:04:26 -05:00
Troy J. Farrell 4d1e5dbfe9 Fix tests/grain.js tests on Debian 10
Use the old wire protocol with ChromeDriver (set w3c to false).  This fixes
some Chrome misbehaviors, including failing to switch browser windows.  Tested
with Chromium 80.
2021-01-15 16:41:59 -05:00
Ian Denhardt 31851ba4c1 Fix a typo in a comment in the test script. 2020-12-26 15:58:58 -05:00
Drew Fisher 59afdce21f Merge pull request #3351 from sandstorm-io/zarvox-fix-upload-meteor-test-app
Make uploadMeteorTestApp.js navigate to a canonical URL
2020-05-28 17:53:10 -07:00
Drew Fisher b2d7844eaf Make uploadMeteorTestApp.js navigate to a canonical URL
I expect this to change the failure mode for `tests/account-settings` from
failing at line 24 of uploadMeteorTestApp.js to possibly failing somewhere else
(later in the test flow) instead.
2020-05-28 02:04:28 -07:00
Ian Denhardt 26282b2a00 tests: apps/schedule: avoid a call to .pause()
...by implementing the proper fix for the race condition described in

As expected, this shaves about 5 seconds off of each of these tests, or
about 15 seconds off of the test suite as a whole.

Note that there are two other calls to pause() in there; these are a bit
harder to eliminate, since the events they're waiting for are triggered
by things outside of any http request, so we can't easily create an
element on the page and do waitForVisible or the like, and as far as I
can tell nightwatch doesn't give us an easy way to say "wait until this
element contains this text," which is what we really want here.
2020-05-27 00:54:03 -04:00
Kenton Varda a51e821516 Revert "Fix flakiness from race condition in installApp test helper" 2020-05-02 13:40:57 -05:00
Kenton Varda b89ff1e68e Merge pull request #3294 from sandstorm-io/zarvox-fix-test-introjs-race-condition
Fix flakiness from race condition in installApp test helper
2020-05-02 12:42:53 -05:00
Ian Denhardt 81d23a989f Namespace testing funcitons on the client.
Per the comment, we can't easily turn these into es6 exports because we
call them from tests, but let's at least namespace them.
2020-04-26 00:20:51 -04:00
Drew Fisher dca04cca30 Fix flakiness from race condition in installApp test helper
When navigating to /apps, it's possible that the introjs overlay will make the
.app-list element not "visible" (because the overlay is blocking the entirety
of the page).

It's also possible that we'll win that race, but then once we navigate to the
grain list page, we'll lose a race against a different introjs overlay.

Additionally, the introjs overlay does not appear to get reactively removed
when we mark that it's no longer needed in the Session.  So we need to catch
things early.

Making the call to `disableGuidedTour()` *before* navigating to any of the
pages that feature introjs helpers should help ensure that they never render
and never cause test failures.

It's possible we should rethink how we manage introjs and testing -- perhaps we
should disable the overlays earlier for testing purpose, like in user login.
There's only two tests that actually bother interacting with the introjs
overlays, and perhaps they could use a different login method (or pass a
parameter to decline disabling all introjs overlays).

I believe this patch may fix the flakiness around `apps/collections` that we're
seeing in the checks for #3293.
2020-04-18 20:25:06 -07:00
Ian Denhardt e63072e871 tests/apps/schedule.js: wait a bit before calling runDueJobsAt.
@zarvox pointed out that there's a race condition where this happens
before the job is actually inserted into the database.

Strictly speaking, inserting a .pause here doesn't actually fix the race
condition, but (a) the test is using this technique in several other
places, and (b) If it takes 5 seconds for the job to hit the DB
something strange is going on.

It would be nice to re-work the test to avoid these pauses, if only so
that it will run faster, but if the race condition is the cause of the
issues we're seeing, this should at least get things passing again.
2020-04-18 21:54:44 -04:00
Kenton Varda 6d57b3c45d Merge pull request #3263 from zenhack/dev-shm
Mount a tmpfs at /dev/shm in the sandbox.
2020-04-11 10:18:15 -05:00
Ian Denhardt 079e3f7921 Mount a tmpfs at /dev/shm in the sandbox.
...To get shm_open() and friends working.

Fixes #3196.
2020-03-27 13:38:25 -04:00
Ian Denhardt 3d92ec6a2f Remove spacejam dependency from tests/
The tests that use this are broken anyway (#3188) and fixing them
probably means moving to a different testing framework. Meanwhile,
spacejam pulls in phantomjs, which is unmaintained and seems to be
broken on node 12, so this breaks the whole CI system.

Hopefully fixes #3277
2020-03-23 22:01:06 -04:00
Kenton Varda e331548c90 Merge pull request #3221 from zenhack/issue-3027
Implement support for AppHooks
2020-02-22 13:26:40 -06:00
Ian Denhardt d34a10bfba Factor out an uploadMeteorTestApp command.
I'd wanted to do this previously, but couldn't figure out where these
were defined. Now we know.
2020-02-16 02:25:43 -05:00
Ian Denhardt ba34fab0fb Delete some trailing whitespace. 2020-02-16 02:25:07 -05:00
Ian Denhardt cd09909fd4 appHooks test: clean up the grain window when we're done.
Same issue as #3227. This isn't actually broken currently, since there's
only one test in the file, but presumably we would hit the same problem
if we added another test.
2020-02-16 02:14:23 -05:00
Ian Denhardt fa1ed547fb Schedule tests: close the grain window when we're done.
Otherwise the next test starts navigating in the grain log window, and
ends up confused. Fixes #3226.
2020-02-16 02:03:53 -05:00
Ian Denhardt 644bd69545 Move around some parameters for the tests.
The 'schedule' call is going to do something slightly more specialized,
as I want to exercise some things the test currently doesn't.
2020-02-13 20:06:14 -05:00
Ian Denhardt 98d281da36 Fix problem where grain log wasn't opening during test.
Test still isn't passing; need to investigate.
2020-02-13 00:54:12 -05:00
Ian Denhardt fe5de50e9d First pass at a test for the appHooks stuff.
Fails currently; for some reason the grain log never opens. Need to
investigate, maybe the "you've created your first grain" modal is
blocking the click?
2020-02-09 23:35:24 -05:00
Kenton Varda 12991a7435 Merge pull request #3190 from zenhack/meteor-testapp
Meteor testapp
2020-02-02 06:00:23 +08:00
Ian Denhardt 687e1a8c90 Test suite: add an option for displaying the browser window.
Per the new section in the README, I've found this useful for debugging.
2020-01-29 20:10:39 -05:00
Ian Denhardt 4a83f1bc3e Merge remote-tracking branch 'origin/master' into meteor-testapp
This mostly merged cleanly, but there was trivially resolved conflict in
the Makefile.
2020-01-20 18:02:32 -05:00
Ian Denhardt ca7feffa74 Replace advanceTimeMillis with runDueJobsAt.
There's no real need to actually mock Date.now(); we're already passing
the date in most of the way. This is simpler and it also solves the
problem we were having with sandstorm rejecting the one-shot jobs
because they were "in the past."
2020-01-17 04:29:58 -05:00
Ian Denhardt 073697d784 Clean up & better document scheduling tests. 2020-01-17 04:10:30 -05:00
Ian Denhardt 4bc215265c (mostly) get tests working for scheduling APIs.
The one hitch is that the test for one-shot jobs only works if
the server has been restarted since the last time
advanceTimeMillis() was called. Otherwise, sandstorm rejects the app's
requested date because it is in the past relative to the mocked time,
since the C++ test app isn't using our mock. That still needs fixing.

Maybe we should just be more lenient? Without the check if an app picks
a time slightly in the past, it will just get run as soon as possible,
which seems like reasonable behavior.
2020-01-17 03:31:42 -05:00
Kenton Varda ede61d82d4 Fix tests/run-local.sh to make sure it solely uses Meteor's node due to apparent incompatibility with newer system-installed node. 2019-01-12 15:37:49 -08:00
Kenton Varda 9335d78370 Update selenium to work with JDK 11. 2018-11-19 15:54:29 -08:00
Kenton Varda 06cbeb8636 Modernize test suite.
The ancient version of Selenium we were using no longer works with the version of Firefox ESR on Debian Sid. Newer Seleniums no longer build-in Firefox support but rather require separately-installed drivers. Nightwatch also needed to be updated to work with newer Selenium. I switched to installing Selenium via npm as this seems more convenient.

For Firefox, the driver is `geckodriver`, but Nightwatch has a bug where its switchWindow() function doesn't work with `geckodriver`. The latest beta version of Nightwatch fixes this bug but seems to intorduce some other bugs. Instead, I switched to running the tests in Chrome.

Various tests needed updates to work correctly on the new version.
2018-09-22 15:53:22 -07:00
Kenton Varda 6746bde87d Fix mail-app test. 2018-08-25 23:29:29 -07:00
Kenton Varda b96667e1de Fix test. Something changed in Meteor, I guess. 2017-10-21 15:31:39 -07:00
Kenton Varda 360cb6bfb2 Use entire credential ID as identicon ID.
In some cases, like old-sharing-model grains, we use the identicon ID as the user's identity ID. But identity IDs must be 32 bytes / 64 hex digits, even though identicons themselves only use the first 16 bytes / 32 digits to generate the icon.
2017-08-26 16:51:57 -07:00
Kenton Varda 7f8359221a Fix all tests. 2017-08-13 15:32:06 -07:00