refactor: optimize delay between batches on mobile to allow UI interactivity during load (#2129)

This commit is contained in:
Mo
2023-01-04 13:31:45 -06:00
committed by GitHub
parent 69b2af7612
commit 59fc68296b
32 changed files with 171 additions and 67 deletions

View File

@@ -21,7 +21,9 @@ describe('app models', () => {
beforeEach(async function () {
this.expectedItemCount = BaseItemCounts.DefaultItems
this.application = await Factory.createInitAppWithFakeCrypto()
this.context = await Factory.createAppContext()
this.application = this.context.application
await this.context.launch()
})
afterEach(async function () {

View File

@@ -13,6 +13,7 @@ describe('importing', function () {
let application
let email
let password
let context
beforeEach(function () {
localStorage.clear()
@@ -20,11 +21,16 @@ describe('importing', function () {
const setup = async ({ fakeCrypto }) => {
expectedItemCount = BaseItemCounts.DefaultItems
if (fakeCrypto) {
application = await Factory.createInitAppWithFakeCrypto()
context = await Factory.createAppContext()
} else {
application = await Factory.createInitAppWithRealCrypto()
context = await Factory.createAppContextWithRealCrypto()
}
await context.launch()
application = context.application
email = UuidGenerator.GenerateUuid()
password = UuidGenerator.GenerateUuid()
Factory.handlePasswordChallenges(application, password)

View File

@@ -9,7 +9,9 @@ const expect = chai.expect
describe('model manager mapping', () => {
beforeEach(async function () {
this.expectedItemCount = BaseItemCounts.DefaultItems
this.application = await Factory.createInitAppWithFakeCrypto()
this.context = await Factory.createAppContext()
await this.context.launch()
this.application = this.context.application
})
afterEach(async function () {

View File

@@ -14,7 +14,9 @@ describe('notes and tags', () => {
beforeEach(async function () {
this.expectedItemCount = BaseItemCounts.DefaultItems
this.application = await Factory.createInitAppWithFakeCrypto()
this.context = await Factory.createAppContext()
await this.context.launch()
this.application = this.context.application
})
afterEach(async function () {

View File

@@ -7,7 +7,9 @@ const expect = chai.expect
describe('tags as folders', () => {
beforeEach(async function () {
this.application = await Factory.createInitAppWithFakeCrypto()
this.context = await Factory.createAppContext()
await this.context.launch()
this.application = this.context.application
})
afterEach(async function () {