@ossy/consultancy 3.10.0 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/consultancy",
|
|
3
3
|
"description": "Consultancy feature package — schemas for employees, contracts, opportunities, and proposals",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.11.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"module": "./src/index.js",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@ossy/router-react": "*",
|
|
31
31
|
"react": "*"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "53ff8456920e09151c9d88df4a6c3ee958d811eb"
|
|
34
34
|
}
|
package/src/Overview.jsx
CHANGED
|
@@ -56,7 +56,12 @@ export const Overview = () => {
|
|
|
56
56
|
: '—'
|
|
57
57
|
|
|
58
58
|
return (
|
|
59
|
-
<View
|
|
59
|
+
<View
|
|
60
|
+
data-consultancy="overview"
|
|
61
|
+
layout="row-wrap"
|
|
62
|
+
gap="m"
|
|
63
|
+
style={{ alignItems: 'stretch' }}
|
|
64
|
+
>
|
|
60
65
|
<View style={{ flex: '1 1 280px', minWidth: 0 }}>
|
|
61
66
|
<SectionPanel title={t('consultancy.overview.fiscalYears')}>
|
|
62
67
|
<View gap="s" inset="m">
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import signUpFlow from '@ossy/authentication/sign-up.flow.js'
|
|
2
|
+
import { ConsultancySchema, location } from '@ossy/consultancy'
|
|
3
|
+
import { CreateResource, CreateDocumentForm } from '@ossy/resources'
|
|
4
|
+
|
|
5
|
+
export const metadata = {
|
|
6
|
+
id: '@ossy/consultancy/flows/create-company',
|
|
7
|
+
feature: 'consultancy',
|
|
8
|
+
requires: ['server', 'database'],
|
|
9
|
+
timeout: 120_000,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Happy path for issue #5 — consultancy empty state to company-basic-info ready.
|
|
14
|
+
*/
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Create company',
|
|
17
|
+
description:
|
|
18
|
+
'Signed-in user sees consultancy empty, creates company-basic-info via create-document, then sees the ready overview',
|
|
19
|
+
steps: [
|
|
20
|
+
...signUpFlow.steps,
|
|
21
|
+
{ page: '@consultancy/home' },
|
|
22
|
+
{ result: { selector: '[data-consultancy-status="empty"]', timeout: 15000 } },
|
|
23
|
+
{
|
|
24
|
+
page: '@create-document',
|
|
25
|
+
search: {
|
|
26
|
+
location,
|
|
27
|
+
category: 'Consultancy',
|
|
28
|
+
schemaId: ConsultancySchema.companyBasicInfo,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{ result: { selector: '[data-flow-stage="create-document"]', timeout: 15000 } },
|
|
32
|
+
{
|
|
33
|
+
result: {
|
|
34
|
+
selector: `[data-schema-id="${ConsultancySchema.companyBasicInfo}"]`,
|
|
35
|
+
timeout: 10000,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{ result: { action: CreateResource, timeout: 10000 } },
|
|
39
|
+
{ form: CreateDocumentForm, fields: { name: 'e2e-company' } },
|
|
40
|
+
{ action: CreateResource },
|
|
41
|
+
{ result: { page: '@storage/home', timeout: 20000 } },
|
|
42
|
+
{ page: '@consultancy/home' },
|
|
43
|
+
{ result: { selector: '[data-consultancy-status="ready"]', timeout: 15000 } },
|
|
44
|
+
{ result: { selector: '[data-consultancy="overview"]', timeout: 10000 } },
|
|
45
|
+
],
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import createCompanyFlow from './create-company.flow.js'
|
|
2
|
+
import { location } from '@ossy/consultancy'
|
|
3
|
+
import { DeleteResource } from '@ossy/resources'
|
|
4
|
+
|
|
5
|
+
export const metadata = {
|
|
6
|
+
id: '@ossy/consultancy/flows/delete-company',
|
|
7
|
+
feature: 'consultancy',
|
|
8
|
+
requires: ['server', 'database'],
|
|
9
|
+
timeout: 150_000,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* After creating company-basic-info, open it in storage and delete it.
|
|
14
|
+
* Consultancy home should return to the empty state.
|
|
15
|
+
*/
|
|
16
|
+
export default {
|
|
17
|
+
title: 'Delete company',
|
|
18
|
+
description:
|
|
19
|
+
'Signed-in user creates a company, deletes it from storage, and sees consultancy empty again',
|
|
20
|
+
steps: [
|
|
21
|
+
...createCompanyFlow.steps,
|
|
22
|
+
{ page: '@storage/home', search: { location } },
|
|
23
|
+
{ result: { selector: '[data-resource-name="e2e-company"]', timeout: 20000 } },
|
|
24
|
+
{ click: { selector: '[data-resource-name="e2e-company"]' } },
|
|
25
|
+
{ result: { action: DeleteResource, timeout: 15000 } },
|
|
26
|
+
{ action: DeleteResource },
|
|
27
|
+
{
|
|
28
|
+
result: {
|
|
29
|
+
selector: '[data-resource-name="e2e-company"]',
|
|
30
|
+
hidden: true,
|
|
31
|
+
timeout: 20000,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{ page: '@consultancy/home' },
|
|
35
|
+
{ result: { selector: '[data-consultancy-status="empty"]', timeout: 15000 } },
|
|
36
|
+
],
|
|
37
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import enableConsultancyFlow from './enable-consultancy.flow.js'
|
|
2
|
+
import { DisableService, EnableService } from '@ossy/workspaces'
|
|
3
|
+
|
|
4
|
+
const CONSULTANCY = '@ossy/consultancy'
|
|
5
|
+
|
|
6
|
+
export const metadata = {
|
|
7
|
+
id: '@ossy/consultancy/flows/disable-consultancy',
|
|
8
|
+
feature: 'consultancy',
|
|
9
|
+
requires: ['server', 'database'],
|
|
10
|
+
timeout: 120_000,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* After enabling consultancy, disable from the package catalog detail toggle.
|
|
15
|
+
* Consultancy has no sales home — assert EnableService returns on the catalog.
|
|
16
|
+
*/
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Disable consultancy',
|
|
19
|
+
description:
|
|
20
|
+
'Signed-in user enables consultancy, disables it from the package catalog, and sees Enable again',
|
|
21
|
+
steps: [
|
|
22
|
+
...enableConsultancyFlow.steps,
|
|
23
|
+
{ page: '@packages/detail', params: { packageSlug: 'consultancy' } },
|
|
24
|
+
{
|
|
25
|
+
result: {
|
|
26
|
+
action: { ...DisableService, service: CONSULTANCY },
|
|
27
|
+
timeout: 15000,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
result: {
|
|
32
|
+
selector: `[data-package-service="${CONSULTANCY}"][data-service-enabled="true"]`,
|
|
33
|
+
timeout: 10000,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{ action: { ...DisableService, service: CONSULTANCY } },
|
|
37
|
+
{
|
|
38
|
+
result: {
|
|
39
|
+
action: { ...EnableService, service: CONSULTANCY },
|
|
40
|
+
timeout: 20000,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
result: {
|
|
45
|
+
selector: `[data-package-service="${CONSULTANCY}"][data-service-enabled="false"]`,
|
|
46
|
+
timeout: 10000,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import signUpFlow from '@ossy/authentication/sign-up.flow.js'
|
|
2
|
+
import { DisableService, EnableService } from '@ossy/workspaces'
|
|
3
|
+
|
|
4
|
+
const CONSULTANCY = '@ossy/consultancy'
|
|
5
|
+
|
|
6
|
+
export const metadata = {
|
|
7
|
+
id: '@ossy/consultancy/flows/enable-consultancy',
|
|
8
|
+
feature: 'consultancy',
|
|
9
|
+
requires: ['server', 'database'],
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Consultancy has no sales home — enable from the package catalog detail toggle.
|
|
14
|
+
* Uses live workspace entitlements (not app-test `devEntitlements` sidebar overlay).
|
|
15
|
+
*/
|
|
16
|
+
export default {
|
|
17
|
+
title: 'Enable consultancy',
|
|
18
|
+
description:
|
|
19
|
+
'New user registers, opens the consultancy package detail, and enables the workspace service',
|
|
20
|
+
steps: [
|
|
21
|
+
...signUpFlow.steps,
|
|
22
|
+
{ page: '@packages/detail', params: { packageSlug: 'consultancy' } },
|
|
23
|
+
{
|
|
24
|
+
result: {
|
|
25
|
+
action: { ...EnableService, service: CONSULTANCY },
|
|
26
|
+
timeout: 15000,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
result: {
|
|
31
|
+
selector: `[data-package-service="${CONSULTANCY}"][data-service-enabled="false"]`,
|
|
32
|
+
timeout: 10000,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{ action: { ...EnableService, service: CONSULTANCY } },
|
|
36
|
+
{
|
|
37
|
+
result: {
|
|
38
|
+
action: { ...DisableService, service: CONSULTANCY },
|
|
39
|
+
timeout: 20000,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
result: {
|
|
44
|
+
selector: `[data-package-service="${CONSULTANCY}"][data-service-enabled="true"]`,
|
|
45
|
+
timeout: 10000,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
}
|