Commit graph

1153 commits

Author SHA1 Message Date
Brian Gough
3bbd49c7eb Merge pull request #377 from sharelatex/bg-add-project-structure-version-number
add project structure version number
2018-03-05 08:41:14 +00:00
Alasdair Smith
68d85f03c2 Clean up frontend stub 2018-03-02 10:41:58 +00:00
Brian Gough
af494dedf2 check project structure version in unit tests 2018-03-01 12:32:09 +00:00
Brian Gough
e6020e2e9b update acceptance tests to include project structure version
this tests the version sent to the docupdater
2018-03-01 12:32:09 +00:00
Brian Gough
389f2d64ef prepare tests for versioning 2018-03-01 12:32:09 +00:00
Brian Gough
792c0135a0 update acceptance tests helper to include version 2018-03-01 12:32:09 +00:00
Brian Gough
f7e70e8228 add acceptance tests 2018-03-01 12:32:09 +00:00
Brian Gough
67d784a74a increment project version on every structure change 2018-03-01 12:32:08 +00:00
James Allen
becb76d69b Don't allow backslashes in file names 2018-03-01 11:42:44 +00:00
Alasdair Smith
1f450085e9 Fix mocha complaining about returning Promise-like object 2018-02-27 15:57:40 +00:00
Alasdair Smith
f11f208772 Revert "Revert "Upgrade to mocha 5.0.1"" 2018-02-27 15:03:21 +00:00
Alasdair Smith
315587605c Revert "Upgrade to mocha 5.0.1" 2018-02-27 12:25:42 +00:00
Alasdair Smith
2a2eb23c78 Fix bug where tests from new ES code being included in requirejs wrapped code 2018-02-26 16:56:04 +00:00
Alasdair Smith
19cec9451d Switch to using scoped variable instead of variables on context
Changes to mocha mean that a new context is passed to each describe block
instead of it persisting between them.

This means that this test cannot be parallelised, however this was the case
beforehand (subsequent tests are dependent on earlier tests).
2018-02-26 15:31:41 +00:00
Alasdair Smith
3217a3fbf0 Fix mocha complaining about returning Promise-like object 2018-02-26 15:31:34 +00:00
Alasdair Smith
46ac74a160 Fix incorrectly scoped variable 2018-02-26 14:26:04 +00:00
Alasdair Smith
2247e4d465 Fix scoping issues where stubs were defined in wrong describe blocks 2018-02-26 14:21:14 +00:00
Alasdair Smith
abf53625fe Fix scope not being applied through callback 2018-02-26 14:02:08 +00:00
Alasdair Smith
136fd84810 Fix module stub in incorrect scope 2018-02-26 13:52:58 +00:00
Alasdair Smith
be6fa346d5 Fix bug where incorrect variable was used 2018-02-26 13:37:17 +00:00
Alasdair Smith
ec7237b7e8 Fix callback stub being defined in wrong scope 2018-02-26 12:33:48 +00:00
Alasdair Smith
2529ed756a Fix callback being defined in wrong describe block 2018-02-26 12:27:54 +00:00
Alasdair Smith
fd8c61985f Fix bug where stubs were attached to undefined variables 2018-02-26 12:19:56 +00:00
Alasdair Smith
5d017beac5 Fix stub incorrectly overriding top level beforeEach 2018-02-26 11:46:06 +00:00
Alasdair Smith
cfc9dbdbb3 Fix bad scoping of user agent 2018-02-26 11:34:08 +00:00
Alasdair Smith
34b53726d4 Fix error not being defined in wrong describe block 2018-02-26 11:19:52 +00:00
Alasdair Smith
192eb8b44f Fix error not being defined in wrong describe block 2018-02-26 11:16:04 +00:00
Alasdair Smith
d79e226a20 Fix callback defined in wrong describe block scope 2018-02-26 10:58:20 +00:00
Alasdair Smith
29410b7aab Fix applyAsync from not evaluating expression in tests
See https://github.com/angular/angular.js/issues/10788#issuecomment-70376834
which explains that applyAsync is scheduled to evaluate in the next tick, but
this is managed by $browser. Therefore we can manually flush the trigger
2018-02-22 13:28:16 +00:00
Alasdair Smith
791c126df6 Fix test to match implementation 2018-02-22 12:09:51 +00:00
Alasdair Smith
eae8b5a592 Merge pull request #330 from sharelatex/as-karma-tests
Karma tests
2018-02-22 11:06:56 +00:00
Hayden Faulds
adc90b68e7 use gauge not inc 2018-02-21 13:25:25 +00:00
Alasdair Smith
00f1450b94 Rename test files to match source directory and name 2018-02-20 14:01:50 +00:00
Alasdair Smith
c7957b8ad4 Convert existing frontend tests to run in karma 2018-02-20 14:01:50 +00:00
Alasdair Smith
3faa0556e8 Add test for cmEditor directive 2018-02-20 14:01:50 +00:00
Alasdair Smith
89c9475d29 Configure karma to load angular, requirejs and test/source files
Use test-main.js file to configure requirejs so that AMD loader can be
used
2018-02-20 14:01:02 +00:00
Alasdair Smith
0b77e97df2 Added angular mocks for testing and stub out globals 2018-02-20 14:01:02 +00:00
Hayden Faulds
d924dbd1ed improve metrics 2018-02-20 13:58:09 +00:00
Hayden Faulds
e50c3837bc add extra metrics around locking 2018-02-19 12:15:02 +00:00
Hayden Faulds
23c7ab0529 add locking tests 2018-02-16 16:57:12 +00:00
Hayden Faulds
dd582d1b2e type-check ProjectGetter.getProject and getProjectWithoutLock arguments 2018-02-16 14:44:21 +00:00
Hayden Faulds
693c8e8c60 move where lock keys are defined 2018-02-16 14:44:21 +00:00
Hayden Faulds
66cd5cd24b use ProjectGetter.getProject in other ProjectGetter methods 2018-02-16 14:44:21 +00:00
Hayden Faulds
95b82a3c9d use ProjectGetter in ProjectLocator.findElementByPath 2018-02-16 14:44:21 +00:00
Hayden Faulds
cbc6fb232d add mongo transaction lock when getting or updating projects 2018-02-16 14:44:21 +00:00
Brian Gough
fc1e94b14a Merge pull request #343 from sharelatex/bg-block-javascript-property-names
block javascript property names being used as file names
2018-02-16 14:07:12 +00:00
Hayden Faulds
eb198cd8c3 make getSafePathname a method in CompileController rather than Project 2018-02-16 13:10:48 +00:00
Brian Gough
8a10e98b56 block javascript property names being used as file names 2018-02-16 10:31:47 +00:00
Hayden Faulds
304a6bc332 use ProjectGetter rather than Project directly 2018-02-16 08:55:09 +00:00
Hayden Faulds
aa89b7e70b Merge pull request #327 from sharelatex/hof-entity-refactoring
Refactor ProjectEntityHandler
2018-02-14 13:28:41 +00:00