chore: running paid subscription e2e tests on both self-hosted and home-server setup (#2355)
* chore: add activating paid subscription in e2e on both self-hosted and home-server setup * chore: fix activating premium features on e2e test suites * chore: remove unnecessary sleep duplication * chore: add defining the subscription expires at date in e2e
This commit is contained in:
16
packages/snjs/mocha/lib/HomeServer.js
Normal file
16
packages/snjs/mocha/lib/HomeServer.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as Defaults from './Defaults.js'
|
||||
|
||||
export async function activatePremiumFeatures(username, subscriptionPlanName, endsAt) {
|
||||
await fetch(`${Defaults.getDefaultHost()}/e2e/activate-premium`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
username,
|
||||
subscriptionPlanName,
|
||||
endsAt,
|
||||
}),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user