Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@adobe/aio-lib-env": "^3",
"@adobe/aio-lib-ims": "^8",
"@oclif/core": "^4.0.0",
"hyperlinker": "^1.0.0",
"js-yaml": "^4.1.0",
"open": "^10.2.0"
},
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/api/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ListCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const enabledServices = await this.consoleCLI.getEnabledServicesForOrg(orgId)
aioConsoleLogger.debug(`Enabled services: ${JSON.stringify(enabledServices.map(s => s.code))}`)

Expand Down
36 changes: 0 additions & 36 deletions src/commands/console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ const LibConsoleCLI = require('@adobe/aio-cli-lib-console')
const { CLI } = require('@adobe/aio-lib-ims/src/context')
const { getCliEnv } = require('@adobe/aio-lib-env')
const yaml = require('js-yaml')
const hyperlinker = require('hyperlinker')
const { CONFIG_KEYS, API_KEYS } = require('../../config')

const DEV_TERMS_URL = 'https://www.adobe.com/go/developer-terms'

class ConsoleCommand extends Command {
async run () {
const help = new Help(this.config)
Expand Down Expand Up @@ -92,39 +89,6 @@ class ConsoleCommand extends Command {
LibConsoleCLI.cleanStdOut()
}

/**
* Ensure the Developer Terms of Service have been accepted for the given org.
* Mirrors the flow in @adobe/aio-cli-plugin-app's `app init` command so that
* `console` subcommands surface a CLI-native prompt instead of leaking a raw
* 451 "use POST /console/services/ims/organizations/:orgId/terms" message
* from the underlying SDK.
*
* @param {object} consoleCLI initialised @adobe/aio-cli-lib-console instance (this.consoleCLI)
* @param {string} orgId organization id to check
* @param {boolean} [skipPrompts] when true, fail fast instead of prompting (default false)
* @returns {Promise<void>}
*/
async ensureDevTermAccepted (consoleCLI, orgId, skipPrompts = false) {
const isTermAccepted = await consoleCLI.checkDevTermsForOrg(orgId)
if (isTermAccepted) {
return
}
if (skipPrompts) {
this.error('Developer Terms of Service have not been accepted for this organization. Please re-run this command without `--json`/`--yml`, or run `aio app init` to accept the terms first.')
}
const terms = await consoleCLI.getDevTermsForOrg()
const termsText = terms.text ? terms.text.trim() : ''
const confirmDevTerms = await consoleCLI.prompt.promptConfirm(`${termsText}\n\nYou have not accepted the Developer Terms of Service. Go to ${hyperlinker(DEV_TERMS_URL, DEV_TERMS_URL)} to view the terms. Do you accept the terms? (y/n):`)
if (!confirmDevTerms) {
this.error('The Developer Terms of Service were declined')
}
const accepted = await consoleCLI.acceptDevTermsForOrg(orgId)
if (!accepted) {
this.error('The Developer Terms of Service could not be accepted')
}
this.log(`The Developer Terms of Service were successfully accepted for org ${orgId}`)
}

/**
* Set console config
*
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/project/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class CreateCommand extends ConsoleCommand {

await this.initSdk()
try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
// check name is not already in use
const projects = await this.consoleCLI.getProjects(orgId)
if (projects.find(project => project.name === projectDetails.name)) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/project/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ListCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const projects = await this.getConsoleOrgProjects(orgId)

if (flags.json) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/project/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class SelectCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId)
const project = await this.selectProjectInteractive(orgId, args.projectIdOrName)

this.setConfig(CONFIG_KEYS.PROJECT, project)
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/publickey/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class DeleteCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId)
const consoleConfig = await this.consoleCLI.getWorkspaceConfig(orgId, projectId, workspaceId)

const project = consoleConfig.project
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/publickey/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class ListCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const consoleConfig = await this.consoleCLI.getWorkspaceConfig(orgId, projectId, workspaceId)

const project = consoleConfig.project
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/publickey/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class UploadAndBindCommand extends ConsoleCommand {

await this.initSdk()
try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const consoleConfig = await this.consoleCLI.getWorkspaceConfig(orgId, projectId, workspaceId)

const project = consoleConfig.project
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/api/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ class AddCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const projects = await this.consoleCLI.getProjects(orgId)
const project = projects.find(p => p.name === flags.projectName)
if (!project) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/api/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class ListCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const projects = await this.consoleCLI.getProjects(orgId)
const project = projects.find(p => p.name === flags.projectName)
if (!project) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class CreateCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
// resolve project by name to project id
const projects = await this.consoleCLI.getProjects(orgId)
const project = projects.find(p => p.name === flags.projectName)
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class DownloadCommand extends ConsoleCommand {

await this.initSdk()
try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId)
const consoleConfig = await this.consoleCLI.getWorkspaceConfig(orgId, projectId, workspaceId)

let fileName = 'console.json'
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class ListCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId, flags.json || flags.yml)
const workspaces = await this.getConsoleProjectWorkspaces(orgId, projectId)

if (flags.json) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/console/workspace/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class SelectCommand extends ConsoleCommand {
await this.initSdk()

try {
await this.ensureDevTermAccepted(this.consoleCLI, orgId)
const workspace = await this.selectWorkspaceInteractive(orgId, projectId, args.workspaceIdOrName)

const obj = {
Expand Down
6 changes: 1 addition & 5 deletions test/commands/console/api/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ const mockEnabledServices = [
]

const mockConsoleCLIInstance = {
getEnabledServicesForOrg: jest.fn().mockResolvedValue(mockEnabledServices),
checkDevTermsForOrg: jest.fn().mockResolvedValue(true),
getDevTermsForOrg: jest.fn().mockResolvedValue({ text: 'terms' }),
acceptDevTermsForOrg: jest.fn().mockResolvedValue(true),
prompt: { promptConfirm: jest.fn().mockResolvedValue(true) }
getEnabledServicesForOrg: jest.fn().mockResolvedValue(mockEnabledServices)
}

jest.mock('@adobe/aio-cli-lib-console', () => {
Expand Down
77 changes: 0 additions & 77 deletions test/commands/console/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,81 +227,4 @@ describe('ConsoleCommand', () => {
expect(config.delete).toHaveBeenCalledWith(CONFIG_KEYS.CONSOLE)
})
})

describe('ensureDevTermAccepted', () => {
let mockConsoleCLI

beforeEach(() => {
mockConsoleCLI = {
checkDevTermsForOrg: jest.fn().mockResolvedValue(true),
getDevTermsForOrg: jest.fn().mockResolvedValue({ text: 'Developer Terms text' }),
acceptDevTermsForOrg: jest.fn().mockResolvedValue(true),
prompt: { promptConfirm: jest.fn().mockResolvedValue(true) }
}
command.error = jest.fn((msg) => { throw new Error(msg) })
command.log = jest.fn()
})

test('no-op when terms already accepted', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(true)
await command.ensureDevTermAccepted(mockConsoleCLI, 'org-1')
expect(mockConsoleCLI.checkDevTermsForOrg).toHaveBeenCalledWith('org-1')
expect(mockConsoleCLI.getDevTermsForOrg).not.toHaveBeenCalled()
expect(mockConsoleCLI.prompt.promptConfirm).not.toHaveBeenCalled()
expect(mockConsoleCLI.acceptDevTermsForOrg).not.toHaveBeenCalled()
expect(command.log).not.toHaveBeenCalled()
})

test('errors fast when terms not accepted and skipPrompts=true', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
await expect(command.ensureDevTermAccepted(mockConsoleCLI, 'org-1', true))
.rejects.toThrow(/Developer Terms of Service have not been accepted/)
expect(mockConsoleCLI.getDevTermsForOrg).not.toHaveBeenCalled()
expect(mockConsoleCLI.prompt.promptConfirm).not.toHaveBeenCalled()
})

test('errors when user declines the terms', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
mockConsoleCLI.prompt.promptConfirm.mockResolvedValue(false)
await expect(command.ensureDevTermAccepted(mockConsoleCLI, 'org-1'))
.rejects.toThrow('The Developer Terms of Service were declined')
expect(mockConsoleCLI.getDevTermsForOrg).toHaveBeenCalled()
expect(mockConsoleCLI.acceptDevTermsForOrg).not.toHaveBeenCalled()
})

test('accepts terms programmatically when user confirms', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
mockConsoleCLI.prompt.promptConfirm.mockResolvedValue(true)
mockConsoleCLI.acceptDevTermsForOrg.mockResolvedValue(true)
await command.ensureDevTermAccepted(mockConsoleCLI, 'org-1')
expect(mockConsoleCLI.acceptDevTermsForOrg).toHaveBeenCalledWith('org-1')
expect(command.log).toHaveBeenCalledWith(expect.stringContaining('successfully accepted'))
})

test('errors when accept call returns false', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
mockConsoleCLI.prompt.promptConfirm.mockResolvedValue(true)
mockConsoleCLI.acceptDevTermsForOrg.mockResolvedValue(false)
await expect(command.ensureDevTermAccepted(mockConsoleCLI, 'org-1'))
.rejects.toThrow('The Developer Terms of Service could not be accepted')
})

test('includes the terms URL in the prompt', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
mockConsoleCLI.getDevTermsForOrg.mockResolvedValue({ text: '\n Developer Terms text \n' })
await command.ensureDevTermAccepted(mockConsoleCLI, 'org-1')
const promptArg = mockConsoleCLI.prompt.promptConfirm.mock.calls[0][0]
expect(promptArg).toContain('https://www.adobe.com/go/developer-terms')
expect(promptArg).toContain('Developer Terms text')
expect(promptArg).toMatch(/^Developer Terms text\n\nYou have not accepted/)
})

test('handles missing terms text in the prompt', async () => {
mockConsoleCLI.checkDevTermsForOrg.mockResolvedValue(false)
mockConsoleCLI.getDevTermsForOrg.mockResolvedValue({})
await command.ensureDevTermAccepted(mockConsoleCLI, 'org-1')
const promptArg = mockConsoleCLI.prompt.promptConfirm.mock.calls[0][0]
expect(promptArg).toContain('You have not accepted the Developer Terms of Service.')
})
})
})
3 changes: 1 addition & 2 deletions test/commands/console/open.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ governing permissions and limitations under the License.

const TestCommand = require('../../../src/commands/console/open')
const config = require('@adobe/aio-lib-core-config')
const { PROD_ENV, STAGE_ENV } = require('@adobe/aio-lib-env')
const { STAGE_ENV } = require('@adobe/aio-lib-env')

const mockOpen = jest.fn()
jest.unstable_mockModule('open', () => ({
Expand All @@ -25,7 +25,6 @@ beforeAll(() => {
ORIGINAL_AIO_CLI_ENV = process.env.AIO_CLI_ENV
})
beforeEach(() => {
process.env.AIO_CLI_ENV = PROD_ENV
config.get.mockReset()
mockOpen.mockReset()
command = new TestCommand([])
Expand Down
7 changes: 1 addition & 6 deletions test/commands/console/project/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ const mockProject = {

const mockConsoleCLIInstance = {
getProjects: jest.fn().mockResolvedValue([]),
createProject: jest.fn().mockResolvedValue(mockProject),
checkDevTermsForOrg: jest.fn().mockResolvedValue(true),
getDevTermsForOrg: jest.fn().mockResolvedValue({ text: 'terms' }),
acceptDevTermsForOrg: jest.fn().mockResolvedValue(true),
prompt: { promptConfirm: jest.fn().mockResolvedValue(true) }
createProject: jest.fn().mockResolvedValue(mockProject)
}

jest.mock('@adobe/aio-cli-lib-console', () => ({
Expand All @@ -50,7 +46,6 @@ describe('console:project:create', () => {
mockConsoleCLIInstance.createProject = jest.fn().mockResolvedValue(mockProject)
mockConsoleCLIInstance.getProjects.mockReset()
mockConsoleCLIInstance.getProjects = jest.fn().mockResolvedValue([])
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
})

afterEach(() => {
Expand Down
13 changes: 0 additions & 13 deletions test/commands/console/project/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ const mockConsoleCLIInstance = {}
*/
function setDefaultMockConsoleCLI () {
mockConsoleCLIInstance.getProjects = jest.fn().mockResolvedValue(projects)
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.getDevTermsForOrg = jest.fn().mockResolvedValue({ text: 'terms' })
mockConsoleCLIInstance.acceptDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.prompt = { promptConfirm: jest.fn().mockResolvedValue(true) }
}
jest.mock('@adobe/aio-cli-lib-console', () => ({
init: jest.fn().mockResolvedValue(mockConsoleCLIInstance),
Expand Down Expand Up @@ -121,15 +117,6 @@ describe('console:project:list', () => {
expect(mockConsoleCLIInstance.getProjects).toHaveBeenCalledWith('1001')
})

test('should not prompt for developer terms when returning projects as json', async () => {
mockConsoleCLIInstance.checkDevTermsForOrg.mockResolvedValue(false)
command.argv = ['--orgId', '1001', '--json']

await expect(command.run()).rejects.toThrow('Developer Terms of Service have not been accepted')
expect(mockConsoleCLIInstance.prompt.promptConfirm).not.toHaveBeenCalled()
expect(mockConsoleCLIInstance.getProjects).not.toHaveBeenCalled()
})

test('should return list of projects yaml', async () => {
command.argv = ['--orgId', '1001', '--yml']
await expect(command.run()).resolves.not.toThrow()
Expand Down
4 changes: 0 additions & 4 deletions test/commands/console/project/select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ const mockConsoleCLIInstance = {}
function setDefaultMockConsoleCLI () {
mockConsoleCLIInstance.getProjects = jest.fn().mockResolvedValue(projects)
mockConsoleCLIInstance.promptForSelectProject = jest.fn().mockResolvedValue(selectedProject)
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.getDevTermsForOrg = jest.fn().mockResolvedValue({ text: 'terms' })
mockConsoleCLIInstance.acceptDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.prompt = { promptConfirm: jest.fn().mockResolvedValue(true) }
}

jest.mock('@adobe/aio-cli-lib-console', () => ({
Expand Down
4 changes: 0 additions & 4 deletions test/commands/console/publickey/delete.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ function setDefaultMockConsoleCLI () {
mockConsoleCLIInstance.getWorkspaceConfig = jest.fn().mockResolvedValue(consoleConfig)
mockConsoleCLIInstance.getBindingsForWorkspace = jest.fn().mockResolvedValue([binding1, binding2])
mockConsoleCLIInstance.deleteBindingFromWorkspace = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.getDevTermsForOrg = jest.fn().mockResolvedValue({ text: 'terms' })
mockConsoleCLIInstance.acceptDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.prompt = { promptConfirm: jest.fn().mockResolvedValue(true) }
}
jest.mock('@adobe/aio-cli-lib-console', () => ({
init: jest.fn().mockResolvedValue(mockConsoleCLIInstance),
Expand Down
4 changes: 0 additions & 4 deletions test/commands/console/publickey/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ const mockConsoleCLIInstance = {}
function setDefaultMockConsoleCLI () {
mockConsoleCLIInstance.getWorkspaceConfig = jest.fn().mockResolvedValue(consoleConfig)
mockConsoleCLIInstance.getBindingsForWorkspace = jest.fn().mockResolvedValue(bindings)
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.getDevTermsForOrg = jest.fn().mockResolvedValue({ text: 'terms' })
mockConsoleCLIInstance.acceptDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.prompt = { promptConfirm: jest.fn().mockResolvedValue(true) }
}
jest.mock('@adobe/aio-cli-lib-console', () => ({
init: jest.fn().mockResolvedValue(mockConsoleCLIInstance),
Expand Down
4 changes: 0 additions & 4 deletions test/commands/console/publickey/upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ function setDefaultMockConsoleCLI () {
mockConsoleCLIInstance.getBindingsForWorkspace = jest.fn().mockResolvedValue([binding1])
mockConsoleCLIInstance.uploadAndBindCertificateToWorkspace = jest.fn().mockResolvedValue(binding2)
mockConsoleCLIInstance.getCertificateFingerprint = jest.fn().mockResolvedValue({ certificateFingerprint: 'cf2' })
mockConsoleCLIInstance.checkDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.getDevTermsForOrg = jest.fn().mockResolvedValue({ text: 'terms' })
mockConsoleCLIInstance.acceptDevTermsForOrg = jest.fn().mockResolvedValue(true)
mockConsoleCLIInstance.prompt = { promptConfirm: jest.fn().mockResolvedValue(true) }
}
jest.mock('@adobe/aio-cli-lib-console', () => ({
init: jest.fn().mockResolvedValue(mockConsoleCLIInstance),
Expand Down
6 changes: 1 addition & 5 deletions test/commands/console/workspace/api/add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ const mockConsoleCLIInstance = {
getWorkspaces: jest.fn().mockResolvedValue([mockWorkspace]),
getEnabledServicesForOrg: jest.fn().mockResolvedValue(mockEnabledServices),
getServicePropertiesFromWorkspaceWithCredentialType: jest.fn().mockResolvedValue([]),
subscribeToServicesWithCredentialType: jest.fn().mockResolvedValue(mockSubscribeResponse),
checkDevTermsForOrg: jest.fn().mockResolvedValue(true),
getDevTermsForOrg: jest.fn().mockResolvedValue({ text: 'terms' }),
acceptDevTermsForOrg: jest.fn().mockResolvedValue(true),
prompt: { promptConfirm: jest.fn().mockResolvedValue(true) }
subscribeToServicesWithCredentialType: jest.fn().mockResolvedValue(mockSubscribeResponse)
}

jest.mock('@adobe/aio-cli-lib-console', () => ({
Expand Down
6 changes: 1 addition & 5 deletions test/commands/console/workspace/api/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ const mockConsoleCLIInstance = {
getProjects: jest.fn().mockResolvedValue([mockProject]),
getWorkspaces: jest.fn().mockResolvedValue([mockWorkspace]),
getEnabledServicesForOrg: jest.fn().mockResolvedValue(mockEnabledServices),
getServicePropertiesFromWorkspaceWithCredentialType: jest.fn().mockResolvedValue(mockSubscribedServiceProperties),
checkDevTermsForOrg: jest.fn().mockResolvedValue(true),
getDevTermsForOrg: jest.fn().mockResolvedValue({ text: 'terms' }),
acceptDevTermsForOrg: jest.fn().mockResolvedValue(true),
prompt: { promptConfirm: jest.fn().mockResolvedValue(true) }
getServicePropertiesFromWorkspaceWithCredentialType: jest.fn().mockResolvedValue(mockSubscribedServiceProperties)
}

jest.mock('@adobe/aio-cli-lib-console', () => {
Expand Down
Loading
Loading