-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathindex.e2e-spec.ts
More file actions
36 lines (29 loc) · 855 Bytes
/
index.e2e-spec.ts
File metadata and controls
36 lines (29 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import assert from 'assert';
import { EinsteinBots } from './index.js';
describe(EinsteinBots.name, function () {
this.timeout('10m');
let plugin: EinsteinBots;
before(() => {
plugin = new EinsteinBots(global.browserforce);
});
const configEnabled = {
enabled: true,
};
const configDisabled = {
enabled: false,
};
it('should enable Einstein Bots', async () => {
await plugin.run(configEnabled);
});
it('should verify Einstein Bots is enabled', async () => {
const res = await plugin.retrieve();
assert.deepStrictEqual(res, configEnabled);
});
it('should disable Einstein Bots', async () => {
await plugin.run(configDisabled);
});
it('should verify Einstein Bots is disabled', async () => {
const res = await plugin.retrieve();
assert.deepStrictEqual(res, configDisabled);
});
});