Skip to content

Commit 4babfe7

Browse files
fix(commerce): change status to pending. fixes #411 (#414)
1 parent 41cb1be commit 4babfe7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/base-commerce-cli-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BaseCommerceCliCommand extends Command {
4040
}
4141

4242
formatStatus (status) {
43-
return status === 'CREATING' ? 'Starting' : status[0].toUpperCase() + status.slice(1).toLowerCase()
43+
return status === 'PENDING' ? 'Starting' : status[0].toUpperCase() + status.slice(1).toLowerCase()
4444
}
4545
}
4646

test/commands/commerce/bin-magento/maintenance/status.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ test('maintenance:status', async () => {
6767
})
6868
})
6969

70-
expect.assertions(8)
70+
expect.assertions(11)
7171

7272
const runResult = MaintenanceStatusCommand.run(['--programId', '5', '10'])
7373
await expect(runResult instanceof Promise).toBeTruthy()
@@ -86,6 +86,9 @@ test('maintenance:status', async () => {
8686
})
8787
await expect(mockSdk.getCommerceCommandExecution).toHaveBeenCalledWith('5', '10', '5000')
8888
await expect(mockSdk.getCommerceCommandExecution).toHaveBeenCalledTimes(3)
89+
await expect(cli.action.start.mock.calls[0][0]).toEqual('Starting maintenance:status')
90+
await expect(cli.action.start.mock.calls[1][0]).toEqual('Starting maintenance:status')
91+
await expect(cli.action.start.mock.calls[2][0]).toEqual('Running maintenance:status')
8992
await expect(cli.action.stop.mock.calls[0][0]).toEqual('maintenance enabled')
9093
})
9194

0 commit comments

Comments
 (0)