mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +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:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user