Transition from SFJS to SNJS
This commit is contained in:
@@ -4,14 +4,14 @@ import '../vendor/chai-as-promised-built.js';
|
||||
import '../../../vendor/assets/javascripts/lodash/lodash.custom.js';
|
||||
|
||||
import LocalStorageManager from './localStorageManager.js';
|
||||
const sf_default = new StandardFile();
|
||||
const sf_default = new StandardNotes();
|
||||
SFItem.AppDomain = "org.standardnotes.sn";
|
||||
|
||||
var _globalStorageManager = null;
|
||||
var _globalHttpManager = null;
|
||||
var _globalAuthManager = null;
|
||||
var _globalModelManager = null;
|
||||
var _globalStandardFile = null;
|
||||
var _globalStandardNotes = null;
|
||||
|
||||
export default class Factory {
|
||||
|
||||
@@ -47,9 +47,9 @@ export default class Factory {
|
||||
return _globalModelManager;
|
||||
}
|
||||
|
||||
static globalStandardFile() {
|
||||
if(_globalStandardFile == null) { _globalStandardFile = new StandardFile(); }
|
||||
return _globalStandardFile;
|
||||
static globalStandardNotes() {
|
||||
if(_globalStandardNotes == null) { _globalStandardNotes = new StandardNotes(); }
|
||||
return _globalStandardNotes;
|
||||
}
|
||||
|
||||
static createModelManager() {
|
||||
@@ -62,7 +62,7 @@ export default class Factory {
|
||||
|
||||
static createItemParams() {
|
||||
var params = {
|
||||
uuid: SFJS.crypto.generateUUIDSync(),
|
||||
uuid: SNJS.crypto.generateUUIDSync(),
|
||||
content_type: "Note",
|
||||
content: {
|
||||
title: "hello",
|
||||
@@ -9,7 +9,7 @@ var expect = chai.expect;
|
||||
|
||||
const getNoteParams = () => {
|
||||
var params = {
|
||||
uuid: SFJS.crypto.generateUUIDSync(),
|
||||
uuid: SNJS.crypto.generateUUIDSync(),
|
||||
content_type: "Note",
|
||||
content: {
|
||||
title: "hello",
|
||||
@@ -22,7 +22,7 @@ const getNoteParams = () => {
|
||||
const createRelatedNoteTagPair = () => {
|
||||
let noteParams = getNoteParams();
|
||||
let tagParams = {
|
||||
uuid: SFJS.crypto.generateUUIDSync(),
|
||||
uuid: SNJS.crypto.generateUUIDSync(),
|
||||
content_type: "Tag",
|
||||
content: {
|
||||
title: "thoughts",
|
||||
@@ -441,8 +441,8 @@ describe("syncing", () => {
|
||||
var totalItemCount = 0;
|
||||
|
||||
beforeEach((done) => {
|
||||
var email = Factory.globalStandardFile().crypto.generateUUIDSync();
|
||||
var password = Factory.globalStandardFile().crypto.generateUUIDSync();
|
||||
var email = Factory.globalStandardNotes().crypto.generateUUIDSync();
|
||||
var password = Factory.globalStandardNotes().crypto.generateUUIDSync();
|
||||
Factory.globalStorageManager().clearAllData().then(() => {
|
||||
Factory.newRegisteredUser(email, password).then((user) => {
|
||||
done();
|
||||
Reference in New Issue
Block a user