chore: activate paid subscriptions for revisions e2e suites (#2693)

This commit is contained in:
Karol Sójko
2023-12-12 11:47:14 +01:00
committed by GitHub
parent 3d8746bee4
commit db6151e253
2 changed files with 22 additions and 0 deletions

View File

@@ -238,6 +238,12 @@ describe('history manager', () => {
await context.launch()
await context.register()
/**
* Free user revisions are limited to 1 per day. This is to ensure that
* we don't hit that limit during testing.
*/
await context.activatePaidSubscriptionForUser()
})
afterEach(async function () {

View File

@@ -17,6 +17,12 @@ describe('shared vault revisions', function () {
await context.launch()
await context.register()
/**
* Free user revisions are limited to 1 per day. This is to ensure that
* we don't hit that limit during testing.
*/
await context.activatePaidSubscriptionForUser()
})
afterEach(async function () {
@@ -35,6 +41,8 @@ describe('shared vault revisions', function () {
await Collaboration.createSharedVaultWithAcceptedInviteAndNote(context)
deinitContactContextFunction = deinitContactContext
await contactContext.activatePaidSubscriptionForUser()
await Factory.sleep(Factory.ServerRevisionFrequency)
await context.changeNoteTitleAndSync(note, 'new title 1')
@@ -77,6 +85,8 @@ describe('shared vault revisions', function () {
await Collaboration.createSharedVaultWithAcceptedInviteAndNote(context)
deinitContactContextFunction = deinitContactContext
await contactContext.activatePaidSubscriptionForUser()
await Factory.sleep(Factory.ServerRevisionFrequency)
const contactNote = contactContext.items.findItem(note.uuid)
@@ -103,6 +113,8 @@ describe('shared vault revisions', function () {
await Collaboration.createSharedVaultWithAcceptedInviteAndNote(context)
deinitContactContextFunction = deinitContactContext
await contactContext.activatePaidSubscriptionForUser()
await Factory.sleep(Factory.ServerRevisionFrequency)
await context.changeNoteTitleAndSync(note, 'new title 1')
@@ -135,6 +147,8 @@ describe('shared vault revisions', function () {
await Collaboration.createSharedVaultWithAcceptedInviteAndNote(context)
deinitContactContextFunction = deinitContactContext
await contactContext.activatePaidSubscriptionForUser()
await Factory.sleep(Factory.ServerRevisionFrequency)
await context.changeNoteTitleAndSync(note, 'new title 1')
@@ -164,6 +178,8 @@ describe('shared vault revisions', function () {
await Collaboration.createSharedVaultWithAcceptedInviteAndNote(context)
deinitContactContextFunction = deinitContactContext
await contactContext.activatePaidSubscriptionForUser()
await Factory.sleep(Factory.ServerRevisionFrequency)
await context.changeNoteTitleAndSync(note, 'new title 1')