@genesislcap/foundation-entity-management 14.30.3 → 14.32.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.
@@ -2018,59 +2018,59 @@
2018
2018
  },
2019
2019
  {
2020
2020
  "kind": "javascript-module",
2021
- "path": "src/routes/admin/admin.template.ts",
2021
+ "path": "src/routes/demo/entity-management.template.ts",
2022
2022
  "declarations": [
2023
2023
  {
2024
2024
  "kind": "variable",
2025
- "name": "AdminTemplate",
2025
+ "name": "EntityManagementDemoTemplate",
2026
2026
  "type": {
2027
2027
  "text": "ViewTemplate"
2028
2028
  },
2029
- "default": "html<Admin>`\n <zero-tabs>\n <span slot=\"start\">Admin Entity Management</span>\n <zero-tab slot=\"tab\">Split</zero-tab>\n <zero-tab slot=\"tab\">Users</zero-tab>\n <zero-tab slot=\"tab\">Profiles</zero-tab>\n <zero-tab-panel slot=\"tabpanel\">\n <zero-error-boundary>\n <user-management :columns=${() => [...UsersColumnConfig, ...userColumns]}></user-management>\n </zero-error-boundary>\n </zero-tab-panel>\n <zero-tab-panel slot=\"tabpanel\">\n <zero-error-boundary>\n <profile-management></profile-management>\n </zero-error-boundary>\n </zero-tab-panel>\n <zero-tab-panel slot=\"tabpanel\">\n <zero-error-boundary>\n <entity-management\n resourceName=\"ALL_COUNTERPARTYS\"\n title=\"Counterparty Management\"\n updateEvent=\"EVENT_COUNTERPARTY_MODIFY\"\n deleteEvent=\"EVENT_COUNTERPARTY_DELETE\"\n createEvent=\"EVENT_COUNTERPARTY_INSERT\"\n ></entity-management>\n </zero-error-boundary>\n </zero-tab-panel>\n </zero-tabs>\n`"
2029
+ "default": "html<EntityManagementDemo>`\n <zero-tabs>\n <span slot=\"start\">Entity Management</span>\n <zero-tab data-test-id=\"profiles\" slot=\"tab\">Counterparty</zero-tab>\n <zero-tab-panel slot=\"tabpanel\">\n <zero-error-boundary>\n <entity-management\n resourceName=\"ALL_COUNTERPARTYS\"\n title=\"Counterparty Management\"\n updateEvent=\"EVENT_COUNTERPARTY_MODIFY\"\n deleteEvent=\"EVENT_COUNTERPARTY_DELETE\"\n createEvent=\"EVENT_COUNTERPARTY_INSERT\"\n ></entity-management>\n </zero-error-boundary>\n </zero-tab-panel>\n </zero-tabs>\n`"
2030
2030
  }
2031
2031
  ],
2032
2032
  "exports": [
2033
2033
  {
2034
2034
  "kind": "js",
2035
- "name": "AdminTemplate",
2035
+ "name": "EntityManagementDemoTemplate",
2036
2036
  "declaration": {
2037
- "name": "AdminTemplate",
2038
- "module": "src/routes/admin/admin.template.ts"
2037
+ "name": "EntityManagementDemoTemplate",
2038
+ "module": "src/routes/demo/entity-management.template.ts"
2039
2039
  }
2040
2040
  }
2041
2041
  ]
2042
2042
  },
2043
2043
  {
2044
2044
  "kind": "javascript-module",
2045
- "path": "src/routes/admin/admin.ts",
2045
+ "path": "src/routes/demo/entity-management.ts",
2046
2046
  "declarations": [
2047
2047
  {
2048
2048
  "kind": "class",
2049
2049
  "description": "",
2050
- "name": "Admin",
2050
+ "name": "EntityManagementDemo",
2051
2051
  "superclass": {
2052
2052
  "name": "FASTElement",
2053
2053
  "package": "@microsoft/fast-element"
2054
2054
  },
2055
- "tagName": "user-admin",
2055
+ "tagName": "entity-management-demo",
2056
2056
  "customElement": true
2057
2057
  }
2058
2058
  ],
2059
2059
  "exports": [
2060
2060
  {
2061
2061
  "kind": "js",
2062
- "name": "Admin",
2062
+ "name": "EntityManagementDemo",
2063
2063
  "declaration": {
2064
- "name": "Admin",
2065
- "module": "src/routes/admin/admin.ts"
2064
+ "name": "EntityManagementDemo",
2065
+ "module": "src/routes/demo/entity-management.ts"
2066
2066
  }
2067
2067
  },
2068
2068
  {
2069
2069
  "kind": "custom-element-definition",
2070
- "name": "user-admin",
2070
+ "name": "entity-management-demo",
2071
2071
  "declaration": {
2072
- "name": "Admin",
2073
- "module": "src/routes/admin/admin.ts"
2072
+ "name": "EntityManagementDemo",
2073
+ "module": "src/routes/demo/entity-management.ts"
2074
2074
  }
2075
2075
  }
2076
2076
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EACP,mBAAmB,EAGpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAGpE,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,cAAc,CAAC;IAE/D,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IACP,OAAO,CAAC,SAAS;IAC7B,OAAO,CAAC,OAAO;gBAHV,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACV,SAAS,EAAE,mBAAmB,EAC1C,OAAO,EAAE,OAAO;IAK5B,SAAS;IAiHT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAG/C"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EACP,mBAAmB,EAGpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAGpE,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,cAAc,CAAC;IAE/D,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IACP,OAAO,CAAC,SAAS;IAC7B,OAAO,CAAC,OAAO;gBAHV,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACV,SAAS,EAAE,mBAAmB,EAC1C,OAAO,EAAE,OAAO;IAK5B,SAAS;IAoGT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAG/C"}
@@ -0,0 +1,4 @@
1
+ import { FASTElement } from '@microsoft/fast-element';
2
+ export declare class EntityManagementDemo extends FASTElement {
3
+ }
4
+ //# sourceMappingURL=entity-management.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-management.d.ts","sourceRoot":"","sources":["../../../../src/routes/demo/entity-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAU1E,qBAmBa,oBAAqB,SAAQ,WAAW;CAAG"}
@@ -0,0 +1,3 @@
1
+ import { ViewTemplate } from '@microsoft/fast-element';
2
+ export declare const EntityManagementDemoTemplate: ViewTemplate;
3
+ //# sourceMappingURL=entity-management.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-management.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/demo/entity-management.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG7D,eAAO,MAAM,4BAA4B,EAAE,YAgB1C,CAAC"}
@@ -29,21 +29,11 @@ let MainRouterConfig = class MainRouterConfig extends RouterConfiguration {
29
29
  name: 'auth',
30
30
  title: 'Login',
31
31
  element: () => __awaiter(this, void 0, void 0, function* () {
32
- const { configure, define, defaultLoginConfig } = yield import(
32
+ const { configure, define } = yield import(
33
33
  /* webpackChunkName: "foundation-login" */
34
34
  '@genesislcap/foundation-login');
35
35
  configure(this.container, {
36
- /**
37
- * Adding the organisation field
38
- * fields: {
39
- * ...defaultLoginConfig.fields,
40
- * organisation: {
41
- * label: 'CompID',
42
- * },
43
- * },
44
- */
45
- showConnectionIndicator: true,
46
- defaultRedirectUrl: 'entity-management',
36
+ defaultRedirectUrl: 'entity-management-demo',
47
37
  });
48
38
  /**
49
39
  * You can import and return `Login` directly:
@@ -53,19 +43,16 @@ let MainRouterConfig = class MainRouterConfig extends RouterConfiguration {
53
43
  */
54
44
  return define({
55
45
  name: `entity-management-login`,
56
- /**
57
- * You can augment the template and styles here when needed.
58
- */
59
46
  });
60
47
  }),
61
48
  layout: loginLayout,
62
49
  settings: { public: true },
63
50
  childRouters: true,
64
51
  }, {
65
- path: 'entity-management',
66
- element: () => __awaiter(this, void 0, void 0, function* () { return (yield import('./admin/admin')).Admin; }),
67
- title: 'Admin',
68
- name: 'admin',
52
+ path: 'entity-management-demo',
53
+ element: () => __awaiter(this, void 0, void 0, function* () { return (yield import('./demo/entity-management')).EntityManagementDemo; }),
54
+ title: 'Entity Management Demo',
55
+ name: 'entity-management-demo',
69
56
  settings: { autoAuth: true },
70
57
  });
71
58
  const session = this.session;
@@ -3,16 +3,16 @@ import { css, customElement, FASTElement } from '@microsoft/fast-element';
3
3
  import { EntityManagement } from '../../entities';
4
4
  import { Profiles } from '../../profiles/profiles';
5
5
  import { Users } from '../../users/users';
6
- import { AdminTemplate } from './admin.template';
6
+ import { EntityManagementDemoTemplate } from './entity-management.template';
7
7
  EntityManagement;
8
8
  Users;
9
9
  Profiles;
10
- let Admin = class Admin extends FASTElement {
10
+ let EntityManagementDemo = class EntityManagementDemo extends FASTElement {
11
11
  };
12
- Admin = __decorate([
12
+ EntityManagementDemo = __decorate([
13
13
  customElement({
14
- name: 'user-admin',
15
- template: AdminTemplate,
14
+ name: 'entity-management-demo',
15
+ template: EntityManagementDemoTemplate,
16
16
  styles: css `
17
17
  zero-tabs {
18
18
  padding-top: 8px;
@@ -29,5 +29,5 @@ Admin = __decorate([
29
29
  }
30
30
  `,
31
31
  })
32
- ], Admin);
33
- export { Admin };
32
+ ], EntityManagementDemo);
33
+ export { EntityManagementDemo };
@@ -0,0 +1,18 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ export const EntityManagementDemoTemplate = html `
3
+ <zero-tabs>
4
+ <span slot="start">Entity Management</span>
5
+ <zero-tab data-test-id="profiles" slot="tab">Counterparty</zero-tab>
6
+ <zero-tab-panel slot="tabpanel">
7
+ <zero-error-boundary>
8
+ <entity-management
9
+ resourceName="ALL_COUNTERPARTYS"
10
+ title="Counterparty Management"
11
+ updateEvent="EVENT_COUNTERPARTY_MODIFY"
12
+ deleteEvent="EVENT_COUNTERPARTY_DELETE"
13
+ createEvent="EVENT_COUNTERPARTY_INSERT"
14
+ ></entity-management>
15
+ </zero-error-boundary>
16
+ </zero-tab-panel>
17
+ </zero-tabs>
18
+ `;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-entity-management",
3
3
  "description": "Genesis Foundation Entity Management",
4
- "version": "14.30.3",
4
+ "version": "14.32.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -23,57 +23,42 @@
23
23
  }
24
24
  },
25
25
  "scripts": {
26
- "build": "genx build",
27
- "build:webpack": "genx build -b webpack",
28
- "build:webpack:stats": "genx analyze -b webpack",
26
+ "build": "genx build -b ts",
27
+ "build:webpack": "genx build",
28
+ "build:webpack:stats": "genx analyze",
29
29
  "clean": "genx clean",
30
30
  "dev": "npm run dev:webpack",
31
31
  "dev:no-open": "npm run dev:webpack -- --no-open",
32
- "dev:webpack": "cross-env NODE_ENV=development API_HOST=$npm_package_config_API_HOST DEFAULT_USER=$npm_package_config_DEFAULT_USER DEFAULT_PASSWORD=$npm_package_config_DEFAULT_PASSWORD genx dev -b webpack",
32
+ "dev:webpack": "cross-env NODE_ENV=development API_HOST=$npm_package_config_API_HOST DEFAULT_USER=$npm_package_config_DEFAULT_USER DEFAULT_PASSWORD=$npm_package_config_DEFAULT_PASSWORD genx dev",
33
33
  "dev:webpack:https": "npm run dev:webpack -- --https",
34
34
  "serve": "genx serve",
35
- "test": "npm run test:unit",
36
- "test:coverage": "c8 --include=src npm run test:unit",
37
- "test:coverage:report": "npm run test:coverage && c8 report --reporter=text-lcov > coverage.lcov",
38
- "test:coverage:report:nyc": "npm run test:unit:browser -- --cov && npx nyc report --reporter=html",
39
- "test:e2e": "npx playwright test --config=./playwright.config.ts",
40
- "test:e2e:debug": "npm run test:e2e -- --debug",
41
- "test:e2e:ui": "npx playwright test --ui --config=./playwright.config.ts",
42
- "test:unit": "npm run test:unit:node",
43
- "test:unit:browser": "playwright-test \"./**/*.test.ts\" --runner uvu",
44
- "test:unit:browser:watch": "npm run test:unit:browser -- -w -d",
45
- "test:unit:node": "npm run test:unit:node:src && npm run test:unit:node:test",
46
- "test:unit:node:src": "uvu -r tsm -r esm -r ./jsdom.setup.ts ./src \".*.test.ts\"",
47
- "test:unit:node:test": "uvu -r tsm -r esm -r ./jsdom.setup.ts ./test/unit \".*.test.ts\"",
48
- "test:unit:watch": "watchlist src test -- npm run test:unit"
35
+ "test": "genx test",
36
+ "test:coverage": "genx test --coverage",
37
+ "test:coverage:browser": "genx test --coverage --browser",
38
+ "test:e2e": "genx test --e2e",
39
+ "test:e2e:debug": "genx test --e2e --debug",
40
+ "test:e2e:ui": "genx test --e2e --interactive",
41
+ "test:unit:browser": "genx test --browser",
42
+ "test:unit:browser:watch": "genx test --browser --watch",
43
+ "test:unit:watch": "genx test --watch",
44
+ "test:debug": "genx test --debug"
49
45
  },
50
46
  "devDependencies": {
51
- "@genesislcap/foundation-testing": "^14.30.3",
52
- "@genesislcap/genx": "^14.30.3",
53
- "@playwright/test": "^1.18.1",
47
+ "@genesislcap/foundation-testing": "^14.32.0",
48
+ "@genesislcap/genx": "^14.32.0",
54
49
  "bulma": "^0.9.3",
55
- "c8": "^7.11.0",
56
- "cross-env": "^7.0.3",
57
- "esm": "^3.2.25",
58
- "expect-playwright": "^0.8.0",
59
- "jsdom": "^19.0.0",
60
- "playwright-lighthouse": "^2.2.2",
61
- "playwright-test": "^8.4.0",
62
- "tsm": "^2.2.1",
63
- "typescript": "^4.5.5",
64
- "uvu": "0.5.4",
65
- "watchlist": "^0.3.1"
50
+ "cross-env": "^7.0.3"
66
51
  },
67
52
  "dependencies": {
68
- "@genesislcap/foundation-comms": "^14.30.3",
69
- "@genesislcap/foundation-errors": "^14.30.3",
70
- "@genesislcap/foundation-forms": "^14.30.3",
71
- "@genesislcap/foundation-login": "^14.30.3",
72
- "@genesislcap/foundation-ui": "^14.30.3",
73
- "@genesislcap/foundation-utils": "^14.30.3",
74
- "@genesislcap/foundation-zero": "^14.30.3",
75
- "@genesislcap/foundation-zero-grid-pro": "^14.30.3",
76
- "@genesislcap/grid-pro": "^14.30.3",
53
+ "@genesislcap/foundation-comms": "^14.32.0",
54
+ "@genesislcap/foundation-errors": "^14.32.0",
55
+ "@genesislcap/foundation-forms": "^14.32.0",
56
+ "@genesislcap/foundation-login": "^14.32.0",
57
+ "@genesislcap/foundation-ui": "^14.32.0",
58
+ "@genesislcap/foundation-utils": "^14.32.0",
59
+ "@genesislcap/foundation-zero": "^14.32.0",
60
+ "@genesislcap/foundation-zero-grid-pro": "^14.32.0",
61
+ "@genesislcap/grid-pro": "^14.32.0",
77
62
  "@microsoft/fast-components": "^2.21.3",
78
63
  "@microsoft/fast-element": "^1.7.0",
79
64
  "@microsoft/fast-foundation": "^2.33.2",
@@ -98,5 +83,5 @@
98
83
  "access": "public"
99
84
  },
100
85
  "customElements": "dist/custom-elements.json",
101
- "gitHead": "5f2858b6708b64c5ed6378fc54e09629539a563a"
86
+ "gitHead": "90c5bb2e7631cbf03d48f408f54a35b3e5a2ea2f"
102
87
  }
@@ -1,25 +1 @@
1
- import { configDefaults } from '@genesislcap/foundation-testing/e2e';
2
- import type { PlaywrightTestConfig } from '@playwright/test';
3
-
4
- /**
5
- * If this was an app level config, we might import each fixture from the mfs we're using to create a union
6
- */
7
- import type { TestFixture as EntityManagementFixture } from './test/e2e';
8
-
9
- type Fixtures = EntityManagementFixture & {}; // < and several others if this was app level
10
-
11
- const config: PlaywrightTestConfig<Fixtures> = {
12
- ...configDefaults,
13
- webServer: {
14
- command: 'npm run dev:no-open',
15
- url: 'http://localhost:5080/',
16
- timeout: 120000,
17
- reuseExistingServer: !process.env.CI,
18
- },
19
- use: {
20
- baseURL: 'http://localhost:5080/',
21
- },
22
- // reporter: [['html', { open: 'never' }]],
23
- };
24
-
25
- export default config;
1
+ export { configDefaults as default } from '@genesislcap/foundation-testing/e2e';
@@ -1,10 +1,105 @@
1
- import { expect } from '@playwright/test';
1
+ import { expect } from '@genesislcap/foundation-testing/e2e';
2
2
  import { test } from '../fixture';
3
3
 
4
- test('sample login test', async ({ loginPage, config }) => {
4
+ // TODO: use UUID service
5
+ const generateShortUuid = (length: number = 16): string => {
6
+ const chars: string = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
7
+ let result: string = '';
8
+ let count: number = 0;
9
+
10
+ while (count < length) {
11
+ const randomIndex: number = Math.floor(Math.random() * chars.length);
12
+ result += chars[randomIndex];
13
+ count += 1;
14
+ }
15
+
16
+ return result;
17
+ };
18
+
19
+ test('entity management page audit', async ({ entityManagementPage }) => {
20
+ await entityManagementPage.audit();
21
+ });
22
+
23
+ test.beforeEach(async ({ loginPage, config }) => {
5
24
  await loginPage.connect();
6
25
  await loginPage.autofill(config.DEFAULT_USER, config.DEFAULT_PASSWORD);
7
- await expect(await loginPage.username.inputValue()).toContain(config.DEFAULT_USER);
8
- await expect(await loginPage.password.inputValue()).toContain(config.DEFAULT_PASSWORD);
9
26
  await loginPage.attemptLogin();
10
27
  });
28
+
29
+ test('user navigates to entity management', async ({ page }) => {
30
+ await expect(page).toHaveURL('/entity-management-demo');
31
+ await expect(page).toHaveTitle(/Entity Management Micro Frontend - Entity Management Demo/);
32
+ });
33
+
34
+ test.describe.serial('Add, Edit and Delete flow', () => {
35
+ test('user adds new entity', async ({ page }) => {
36
+ const addButtonLocator = page.getByRole('button', { name: 'Add' });
37
+ await addButtonLocator.click();
38
+
39
+ const inputLocator = page
40
+ .locator('[data-test-id="COUNTERPARTY_ID"]')
41
+ .getByPlaceholder('COUNTERPARTY ID', { timeout: 4000 });
42
+ await inputLocator.click();
43
+ await inputLocator.fill(generateShortUuid());
44
+
45
+ const inputLocatorLei = page
46
+ .locator('[data-test-id="COUNTERPARTY_LEI"]')
47
+ .getByPlaceholder('COUNTERPARTY LEI');
48
+ await inputLocatorLei.click();
49
+ await inputLocatorLei.fill(generateShortUuid());
50
+
51
+ const inputLocatorName = page.locator('[data-test-id="NAME"]').getByPlaceholder('NAME');
52
+ await inputLocatorName.click();
53
+ await inputLocatorName.fill('Temporary Test Record - Inserted');
54
+
55
+ const submitButtonLocator = page.getByRole('button', { name: 'Submit' });
56
+
57
+ const isEnabled = await submitButtonLocator.isEnabled();
58
+ if (isEnabled) {
59
+ await submitButtonLocator.click({ timeout: 2000 });
60
+
61
+ // TODO: FUI-1320 - Address dialog closing in E2E
62
+ // const closeDialog = page.getByRole('dialog').locator('path');
63
+ // await closeDialog.click();
64
+ } else {
65
+ console.log('The submit button is disabled');
66
+ }
67
+ });
68
+
69
+ test('user edits an entity', async ({ page }) => {
70
+ const editButtonLocator = page.getByRole('button', { name: 'Edit' }).first();
71
+ await editButtonLocator.click();
72
+
73
+ const inputLocatorLei = page
74
+ .locator('[data-test-id="COUNTERPARTY_LEI"]')
75
+ .getByPlaceholder('COUNTERPARTY LEI');
76
+ await inputLocatorLei.click();
77
+ await inputLocatorLei.fill(generateShortUuid() + '- Updated');
78
+
79
+ const inputLocatorName = page.locator('[data-test-id="NAME"]').getByPlaceholder('NAME');
80
+ await inputLocatorName.click();
81
+ await inputLocatorName.fill('Temporary Test Record');
82
+
83
+ const submitButtonLocator = page.getByRole('button', { name: 'Submit' });
84
+
85
+ const isEnabled = await submitButtonLocator.isEnabled();
86
+ if (isEnabled) {
87
+ await submitButtonLocator.click();
88
+
89
+ // TODO: FUI-1320 - Address dialog closing in E2E
90
+ // const closeDialog = page.getByRole('dialog').locator('path');
91
+ // await closeDialog.click();
92
+ } else {
93
+ console.log('The submit button is disabled');
94
+ }
95
+ });
96
+
97
+ // TODO: FUI-1239
98
+ // test('user deletes an entity', async ({ page }) => {
99
+ // const deleteButtonLocator = page.getByRole('button', { name: 'Delete' }).first();
100
+ // await deleteButtonLocator.click();
101
+
102
+ // const confirmDeleteLocator = page.getByRole('button', { name: 'Confirm' });
103
+ // await confirmDeleteLocator.click();
104
+ // });
105
+ });
@@ -1,12 +1,13 @@
1
- import { PackageConfig, defaultAuditThresholds } from '@genesislcap/foundation-testing/e2e';
2
- import type { Locator, Page } from '@playwright/test';
3
- import { playAudit } from 'playwright-lighthouse';
1
+ import { defaultAuditThresholds, playAudit } from '@genesislcap/foundation-testing/e2e';
2
+ import type { Locator, Page, PackageConfig } from '@genesislcap/foundation-testing/e2e';
4
3
 
5
4
  export class EntityManagementPage {
6
5
  config: PackageConfig;
7
6
  port: number;
8
7
  page: Page;
9
8
  entityList: Locator;
9
+ username: Locator;
10
+ password: Locator;
10
11
 
11
12
  constructor(config: PackageConfig, port: number, page: Page) {
12
13
  this.config = config;
@@ -16,6 +17,8 @@ export class EntityManagementPage {
16
17
  * Locate fields not guarded by conditionals upfront, and the remaining on-demand
17
18
  */
18
19
  this.entityList = this.page.locator('data-test-id=entity-list');
20
+ this.username = this.page.locator('data-test-id=username').locator('input');
21
+ this.password = this.page.locator('data-test-id=password').locator('input');
19
22
  }
20
23
 
21
24
  async goto() {
@@ -29,4 +32,12 @@ export class EntityManagementPage {
29
32
  thresholds: defaultAuditThresholds, // TODO: this should be coming from foundation-testing/src/playwright/test.ts base config
30
33
  });
31
34
  }
35
+
36
+ async autofill(
37
+ username: string = this.config.DEFAULT_USER,
38
+ password: string = this.config.DEFAULT_PASSWORD
39
+ ) {
40
+ await this.username.fill(username);
41
+ await this.password.fill(password);
42
+ }
32
43
  }
@@ -1,4 +0,0 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- export declare class Admin extends FASTElement {
3
- }
4
- //# sourceMappingURL=admin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../src/routes/admin/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAU1E,qBAmBa,KAAM,SAAQ,WAAW;CAAG"}
@@ -1,3 +0,0 @@
1
- import { ViewTemplate } from '@microsoft/fast-element';
2
- export declare const AdminTemplate: ViewTemplate;
3
- //# sourceMappingURL=admin.template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/admin/admin.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAW7D,eAAO,MAAM,aAAa,EAAE,YA4B3B,CAAC"}
@@ -1,37 +0,0 @@
1
- import { html } from '@microsoft/fast-element';
2
- import { UsersColumnConfig } from '../../users/users';
3
- const userColumns = [
4
- {
5
- field: 'ACCESS_TYPE',
6
- headerName: 'Access Type',
7
- },
8
- ];
9
- export const AdminTemplate = html `
10
- <zero-tabs>
11
- <span slot="start">Admin Entity Management</span>
12
- <zero-tab slot="tab">Split</zero-tab>
13
- <zero-tab slot="tab">Users</zero-tab>
14
- <zero-tab slot="tab">Profiles</zero-tab>
15
- <zero-tab-panel slot="tabpanel">
16
- <zero-error-boundary>
17
- <user-management :columns=${() => [...UsersColumnConfig, ...userColumns]}></user-management>
18
- </zero-error-boundary>
19
- </zero-tab-panel>
20
- <zero-tab-panel slot="tabpanel">
21
- <zero-error-boundary>
22
- <profile-management></profile-management>
23
- </zero-error-boundary>
24
- </zero-tab-panel>
25
- <zero-tab-panel slot="tabpanel">
26
- <zero-error-boundary>
27
- <entity-management
28
- resourceName="ALL_COUNTERPARTYS"
29
- title="Counterparty Management"
30
- updateEvent="EVENT_COUNTERPARTY_MODIFY"
31
- deleteEvent="EVENT_COUNTERPARTY_DELETE"
32
- createEvent="EVENT_COUNTERPARTY_INSERT"
33
- ></entity-management>
34
- </zero-error-boundary>
35
- </zero-tab-panel>
36
- </zero-tabs>
37
- `;
package/jsdom.setup.ts DELETED
@@ -1 +0,0 @@
1
- export * from '@genesislcap/foundation-testing/jsdom';
package/tsm.js DELETED
@@ -1,3 +0,0 @@
1
- const config = require('@genesislcap/foundation-testing/tsm');
2
-
3
- module.exports = config;