fix(snjs): subscription id increments - run e2e
This commit is contained in:
@@ -12,6 +12,7 @@ describe('files', function () {
|
|||||||
let context
|
let context
|
||||||
let fileService
|
let fileService
|
||||||
let itemManager
|
let itemManager
|
||||||
|
let subscriptionId = 1001
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
localStorage.clear()
|
localStorage.clear()
|
||||||
@@ -39,7 +40,7 @@ describe('files', function () {
|
|||||||
if (subscription) {
|
if (subscription) {
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 1,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
@@ -84,7 +85,7 @@ describe('files', function () {
|
|||||||
|
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 1,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PLUS_PLAN',
|
subscriptionName: 'PLUS_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() - 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() - 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ describe('settings service', function () {
|
|||||||
|
|
||||||
let application
|
let application
|
||||||
let context
|
let context
|
||||||
|
let subscriptionId = 2001
|
||||||
|
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
localStorage.clear()
|
localStorage.clear()
|
||||||
@@ -118,7 +119,7 @@ describe('settings service', function () {
|
|||||||
it('reads a subscription setting', async () => {
|
it('reads a subscription setting', async () => {
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 1,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
@@ -143,7 +144,7 @@ describe('settings service', function () {
|
|||||||
|
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 42,
|
subscriptionId: subscriptionId,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
@@ -173,7 +174,7 @@ describe('settings service', function () {
|
|||||||
|
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_EXPIRED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_EXPIRED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 42,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
offline: false,
|
offline: false,
|
||||||
@@ -186,7 +187,7 @@ describe('settings service', function () {
|
|||||||
|
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 43,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ describe('subscriptions', function () {
|
|||||||
let application
|
let application
|
||||||
let context
|
let context
|
||||||
let subscriptionManager
|
let subscriptionManager
|
||||||
|
let subscriptionId
|
||||||
|
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
await Factory.safeDeinit(application)
|
await Factory.safeDeinit(application)
|
||||||
@@ -32,7 +33,7 @@ describe('subscriptions', function () {
|
|||||||
|
|
||||||
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
await Factory.publishMockedEvent('SUBSCRIPTION_PURCHASED', {
|
||||||
userEmail: context.email,
|
userEmail: context.email,
|
||||||
subscriptionId: 1,
|
subscriptionId: subscriptionId++,
|
||||||
subscriptionName: 'PRO_PLAN',
|
subscriptionName: 'PRO_PLAN',
|
||||||
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
subscriptionExpiresAt: (new Date().getTime() + 3_600_000) * 1_000,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
|||||||
Reference in New Issue
Block a user