fng-ui-select 0.12.0-beta.31 → 0.12.0-beta.310
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/.github/workflows/playwright.yml +38 -0
- package/README.md +1 -1
- package/package.json +7 -6
- package/playwright.config.js +81 -0
- package/playwright.config.ts +77 -0
- package/src/fng-ui-select.js +251 -106
- package/styles/fng-ui-select.css +16 -3
- package/test/playwright/select.spec.js +75 -0
- package/test/playwright/select.spec.ts +69 -0
- package/test/playwright/tsconfig.json +10 -0
- package/test/e2e/multi-control.spec.js +0 -94
- package/test/e2e/multiple-control.spec.js +0 -175
- package/test/e2e/protractor-chrome.conf.js +0 -10
- package/test/e2e/protractor-firefox.conf.js +0 -38
- package/test/e2e/protractor-phantom.conf.js +0 -10
- package/test/e2e/protractor-wip.conf.js +0 -10
- package/test/e2e/single-control.spec.js +0 -86
- package/test/e2e/single-within-array.spec.js +0 -95
- package/test/e2e/test/screen_tests/screenshots/firefox-Multi control-should convert multi ajax lookups into multiple controls.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multi control-should handle inside cached lookups.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multi control-should handle outside cached lookups.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multi control-should handle simple enum.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multiple controls array-should handle inside brackets ajax lookup.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multiple controls array-should handle inside brackets cached table lookups.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multiple controls array-should handle outside brackets ajax lookup.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multiple controls array-should handle outside brackets cached table lookups.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Multiple controls array-should handle simple enums.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Single control-should handle Ajax lookup.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Single control-should handle cached table lookup.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Single control-should handle filtered Ajax lookup.png +0 -0
- package/test/e2e/test/screen_tests/screenshots/firefox-Single control-should handle simple enum.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multi control-should convert multi ajax lookups into multiple controls.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multi control-should handle inside cached lookups.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multi control-should handle outside cached lookups.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multi control-should handle simple enum.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multiple controls array-should handle inside brackets ajax lookup.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multiple controls array-should handle inside brackets cached table lookups.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multiple controls array-should handle outside brackets ajax lookup.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multiple controls array-should handle outside brackets cached table lookups.png +0 -0
- package/test/screen_tests/screenshots/firefox-Multiple controls array-should handle simple enums.png +0 -0
- package/test/screen_tests/screenshots/firefox-Single control-should handle Ajax lookup.png +0 -0
- package/test/screen_tests/screenshots/firefox-Single control-should handle cached table lookup.png +0 -0
- package/test/screen_tests/screenshots/firefox-Single control-should handle filtered Ajax lookup.png +0 -0
- package/test/screen_tests/screenshots/firefox-Single control-should handle simple enum.png +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#name: Playwright Tests
|
|
2
|
+
#on:
|
|
3
|
+
# push:
|
|
4
|
+
# branches: [ main, master ]
|
|
5
|
+
# pull_request:
|
|
6
|
+
# branches: [ main, master ]
|
|
7
|
+
#jobs:
|
|
8
|
+
# test:
|
|
9
|
+
# timeout-minutes: 60
|
|
10
|
+
# runs-on: ubuntu-latest
|
|
11
|
+
# steps:
|
|
12
|
+
# - uses: actions/checkout@v4
|
|
13
|
+
# - uses: actions/setup-node@v4
|
|
14
|
+
# with:
|
|
15
|
+
# node-version: lts/*
|
|
16
|
+
# - name: Start MongoDB
|
|
17
|
+
# uses: supercharge/mongodb-github-action@1.10.0
|
|
18
|
+
# with:
|
|
19
|
+
# mongodb-version: 6.0
|
|
20
|
+
# - name: Setup mongodb-tools
|
|
21
|
+
# run: |
|
|
22
|
+
# wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.6.1.deb
|
|
23
|
+
# sudo apt install ./mongodb-database-tools-*-100.6.1.deb
|
|
24
|
+
# mongorestore --version
|
|
25
|
+
# - name: Install dependencies
|
|
26
|
+
# run: npm ci
|
|
27
|
+
# - name: Install Playwright Browsers
|
|
28
|
+
# run: npx playwright install --with-deps
|
|
29
|
+
# - name: RUn the test forms-angular website (how?)
|
|
30
|
+
#
|
|
31
|
+
# - name: Run Playwright tests
|
|
32
|
+
# run: npx playwright test
|
|
33
|
+
# - uses: actions/upload-artifact@v4
|
|
34
|
+
# if: always()
|
|
35
|
+
# with:
|
|
36
|
+
# name: playwright-report
|
|
37
|
+
# path: playwright-report/
|
|
38
|
+
# retention-days: 30
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Options can be added to a fngUiSelect object within the form object as follows:
|
|
|
27
27
|
back to _select2_.
|
|
28
28
|
* _fngAjax_ creates a control that queries the back end after each keystroke (with 100ms of debounce) for matches.
|
|
29
29
|
* Set to true to search the whole of the _ref_ collection (honouring any collection level filters)
|
|
30
|
-
* Assign a string starting with '/' to do your own query on the backend. The search string will be in _req.query.q_ and the current value of the existing record in _req.query.e_.
|
|
30
|
+
* Assign a string starting with '/' to do your own query on the backend. The search string will be in _req.query.q_ and the current value of the existing record in _req.query.e_. The $index will be in _req.query.i_.
|
|
31
31
|
* Use a mongo search object (converted to JSON and escaped) to apply a filter to the default search over _ref_ collection. For example to search
|
|
32
32
|
only amongst records where the value of *accountSuspended* is false you might do
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fng-ui-select",
|
|
3
3
|
"author": "Mark Chapman <support@forms-angular.org>",
|
|
4
|
-
"version": "0.12.0-beta.
|
|
4
|
+
"version": "0.12.0-beta.310",
|
|
5
5
|
"description": "angular-ui-select plugin for forms-angular",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,10 +11,6 @@
|
|
|
11
11
|
"select2": "3.5.1",
|
|
12
12
|
"ui-select": "0.19.8"
|
|
13
13
|
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"protractor": "5.4.2",
|
|
16
|
-
"protractor-screenshot-reporter": "0.0.5"
|
|
17
|
-
},
|
|
18
14
|
"engines": {
|
|
19
15
|
"node": ">=0.10.0"
|
|
20
16
|
},
|
|
@@ -23,7 +19,12 @@
|
|
|
23
19
|
],
|
|
24
20
|
"license": "MIT",
|
|
25
21
|
"scripts": {
|
|
26
|
-
"test": "
|
|
22
|
+
"test": "npx playwright test '.js' --project=chromium",
|
|
23
|
+
"old-test": "NODE_ENV=test node ../forms-angular/website/server.js & npx webdriver-manager update --versions.chrome=$(google-chrome --version | cut -d ' ' -f 3) && npx webdriver-manager start --versions.chrome=$(google-chrome --version | cut -d ' ' -f 3) & npx protractor test/e2e/protractor/protractor-chrome.conf.js",
|
|
27
24
|
"clear": "kill `ps -ef | grep '[0-9] node ../forms-angular/website/server.js' | egrep -o ' ([0-9]+) ' | head -1 | sed -e 's/ //'` -9"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@playwright/test": "^1.46.1",
|
|
28
|
+
"@types/node": "^20.14.8"
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var test_1 = require("@playwright/test");
|
|
15
|
+
/**
|
|
16
|
+
* Read environment variables from file.
|
|
17
|
+
* https://github.com/motdotla/dotenv
|
|
18
|
+
*/
|
|
19
|
+
// require('dotenv').config();
|
|
20
|
+
/**
|
|
21
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
22
|
+
*/
|
|
23
|
+
exports.default = (0, test_1.defineConfig)({
|
|
24
|
+
testDir: './test/playwright',
|
|
25
|
+
/* Run tests in files in parallel */
|
|
26
|
+
fullyParallel: true,
|
|
27
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
28
|
+
forbidOnly: !!process.env.CI,
|
|
29
|
+
/* Retry on CI only */
|
|
30
|
+
retries: process.env.CI ? 2 : 0,
|
|
31
|
+
/* Opt out of parallel tests on CI. */
|
|
32
|
+
workers: process.env.CI ? 1 : undefined,
|
|
33
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
34
|
+
reporter: 'html',
|
|
35
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
36
|
+
use: {
|
|
37
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
38
|
+
baseURL: 'http://127.0.0.1:9000',
|
|
39
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
40
|
+
trace: 'on-first-retry',
|
|
41
|
+
},
|
|
42
|
+
/* Configure projects for major browsers */
|
|
43
|
+
projects: [
|
|
44
|
+
{
|
|
45
|
+
name: 'chromium',
|
|
46
|
+
use: __assign({}, test_1.devices['Desktop Chrome']),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'firefox',
|
|
50
|
+
use: __assign({}, test_1.devices['Desktop Firefox']),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'webkit',
|
|
54
|
+
use: __assign({}, test_1.devices['Desktop Safari']),
|
|
55
|
+
},
|
|
56
|
+
/* Test against mobile viewports. */
|
|
57
|
+
// {
|
|
58
|
+
// name: 'Mobile Chrome',
|
|
59
|
+
// use: { ...devices['Pixel 5'] },
|
|
60
|
+
// },
|
|
61
|
+
// {
|
|
62
|
+
// name: 'Mobile Safari',
|
|
63
|
+
// use: { ...devices['iPhone 12'] },
|
|
64
|
+
// },
|
|
65
|
+
/* Test against branded browsers. */
|
|
66
|
+
// {
|
|
67
|
+
// name: 'Microsoft Edge',
|
|
68
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
69
|
+
// },
|
|
70
|
+
// {
|
|
71
|
+
// name: 'Google Chrome',
|
|
72
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
73
|
+
// },
|
|
74
|
+
],
|
|
75
|
+
/* Run your local dev server before starting the tests */
|
|
76
|
+
// webServer: {
|
|
77
|
+
// command: 'npm run start',
|
|
78
|
+
// url: 'http://127.0.0.1:3000',
|
|
79
|
+
// reuseExistingServer: !process.env.CI,
|
|
80
|
+
// },
|
|
81
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read environment variables from file.
|
|
5
|
+
* https://github.com/motdotla/dotenv
|
|
6
|
+
*/
|
|
7
|
+
// require('dotenv').config();
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
11
|
+
*/
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
testDir: './test/playwright',
|
|
14
|
+
/* Run tests in files in parallel */
|
|
15
|
+
fullyParallel: true,
|
|
16
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
17
|
+
forbidOnly: !!process.env.CI,
|
|
18
|
+
/* Retry on CI only */
|
|
19
|
+
retries: process.env.CI ? 2 : 0,
|
|
20
|
+
/* Opt out of parallel tests on CI. */
|
|
21
|
+
workers: process.env.CI ? 1 : undefined,
|
|
22
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
23
|
+
reporter: 'html',
|
|
24
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
25
|
+
use: {
|
|
26
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
27
|
+
baseURL: 'http://127.0.0.1:9000',
|
|
28
|
+
|
|
29
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
30
|
+
trace: 'on-first-retry',
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
/* Configure projects for major browsers */
|
|
34
|
+
projects: [
|
|
35
|
+
{
|
|
36
|
+
name: 'chromium',
|
|
37
|
+
use: { ...devices['Desktop Chrome'] },
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
name: 'firefox',
|
|
42
|
+
use: { ...devices['Desktop Firefox'] },
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
name: 'webkit',
|
|
47
|
+
use: { ...devices['Desktop Safari'] },
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/* Test against mobile viewports. */
|
|
51
|
+
// {
|
|
52
|
+
// name: 'Mobile Chrome',
|
|
53
|
+
// use: { ...devices['Pixel 5'] },
|
|
54
|
+
// },
|
|
55
|
+
// {
|
|
56
|
+
// name: 'Mobile Safari',
|
|
57
|
+
// use: { ...devices['iPhone 12'] },
|
|
58
|
+
// },
|
|
59
|
+
|
|
60
|
+
/* Test against branded browsers. */
|
|
61
|
+
// {
|
|
62
|
+
// name: 'Microsoft Edge',
|
|
63
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
64
|
+
// },
|
|
65
|
+
// {
|
|
66
|
+
// name: 'Google Chrome',
|
|
67
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
68
|
+
// },
|
|
69
|
+
],
|
|
70
|
+
|
|
71
|
+
/* Run your local dev server before starting the tests */
|
|
72
|
+
// webServer: {
|
|
73
|
+
// command: 'npm run start',
|
|
74
|
+
// url: 'http://127.0.0.1:3000',
|
|
75
|
+
// reuseExistingServer: !process.env.CI,
|
|
76
|
+
// },
|
|
77
|
+
});
|