mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) port test/home tests
Summary: This ports the useful parts of the test/home tests to test/nbrowser (a chunk of the DocMenu tests were already covered). I ripped out a chunk of test/browser code that is now no longer used. I made a few changes to unrelated tests that happened to fail. Test Plan: ported tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3888
This commit is contained in:
parent
5f9f4868ae
commit
8810aa3bd3
@ -96,7 +96,6 @@
|
||||
"moment-locales-webpack-plugin": "^1.2.0",
|
||||
"nodemon": "^2.0.4",
|
||||
"otplib": "12.0.1",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"sinon": "7.1.1",
|
||||
"source-map-loader": "^0.2.4",
|
||||
"tmp-promise": "1.0.5",
|
||||
|
@ -4,11 +4,10 @@
|
||||
import FormData from 'form-data';
|
||||
import * as fse from 'fs-extra';
|
||||
import defaults = require('lodash/defaults');
|
||||
import {WebElement} from 'mocha-webdriver';
|
||||
import {Key, WebDriver, WebElement} from 'mocha-webdriver';
|
||||
import fetch from 'node-fetch';
|
||||
import {authenticator} from 'otplib';
|
||||
import * as path from 'path';
|
||||
import { Key, WebDriver } from 'selenium-webdriver';
|
||||
|
||||
import {UserProfile} from 'app/common/LoginSessionAPI';
|
||||
import {BehavioralPrompt, UserPrefs, WelcomePopup} from 'app/common/Prefs';
|
||||
|
@ -273,6 +273,11 @@ export class TestServerMerged implements IMochaServer {
|
||||
* Returns the path to the database.
|
||||
*/
|
||||
private _getDatabaseFile(): string {
|
||||
if (process.env.TYPEORM_TYPE === 'postgres') {
|
||||
const db = process.env.TYPEORM_DATABASE;
|
||||
if (!db) { throw new Error("Missing TYPEORM_DATABASE"); }
|
||||
return db;
|
||||
}
|
||||
return path.join(this.testDir, 'landing.db');
|
||||
}
|
||||
}
|
||||
|
25
yarn.lock
25
yarn.lock
@ -5335,7 +5335,7 @@ jsprim@^1.2.2:
|
||||
json-schema "0.2.3"
|
||||
verror "1.10.0"
|
||||
|
||||
jszip@^3.1.3, jszip@^3.5.0:
|
||||
jszip@^3.5.0:
|
||||
version "3.10.1"
|
||||
resolved "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz"
|
||||
integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==
|
||||
@ -6418,7 +6418,7 @@ os-browserify@~0.3.0:
|
||||
resolved "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz"
|
||||
integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=
|
||||
|
||||
os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
|
||||
os-tmpdir@~1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz"
|
||||
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
|
||||
@ -7356,7 +7356,7 @@ reusify@^1.0.4:
|
||||
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
|
||||
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
|
||||
rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.7.1:
|
||||
rimraf@2, rimraf@^2.2.8, rimraf@^2.7.1:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz"
|
||||
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
|
||||
@ -7440,16 +7440,6 @@ schema-utils@^3.1.0, schema-utils@^3.1.1:
|
||||
ajv "^6.12.5"
|
||||
ajv-keywords "^3.5.2"
|
||||
|
||||
selenium-webdriver@3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz"
|
||||
integrity sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==
|
||||
dependencies:
|
||||
jszip "^3.1.3"
|
||||
rimraf "^2.5.4"
|
||||
tmp "0.0.30"
|
||||
xml2js "^0.4.17"
|
||||
|
||||
selenium-webdriver@^4.0.0-alpha.1:
|
||||
version "4.0.0-beta.2"
|
||||
resolved "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-beta.2.tgz"
|
||||
@ -8186,13 +8176,6 @@ tmp-promise@1.0.5:
|
||||
bluebird "^3.5.0"
|
||||
tmp "0.0.33"
|
||||
|
||||
tmp@0.0.30:
|
||||
version "0.0.30"
|
||||
resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz"
|
||||
integrity sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=
|
||||
dependencies:
|
||||
os-tmpdir "~1.0.1"
|
||||
|
||||
tmp@0.0.33:
|
||||
version "0.0.33"
|
||||
resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
|
||||
@ -9095,7 +9078,7 @@ xml-name-validator@^3.0.0:
|
||||
resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz"
|
||||
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
|
||||
|
||||
xml2js@^0.4.0, xml2js@^0.4.15, xml2js@^0.4.17, xml2js@^0.4.23:
|
||||
xml2js@^0.4.0, xml2js@^0.4.15, xml2js@^0.4.23:
|
||||
version "0.4.23"
|
||||
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
|
||||
integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
|
||||
|
Loading…
Reference in New Issue
Block a user