graphdb-workbench-tests 3.1.1-TR3 → 3.2.0-TR1
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/cypress-flaky.config.js +5 -4
- package/cypress-legacy.config.js +12 -5
- package/cypress.config.js +4 -3
- package/e2e-legacy/ttyg/agent-select-menu.spec.js +3 -3
- package/e2e-legacy/ttyg/edit-agent.spec.js +9 -6
- package/eslint.config.js +39 -0
- package/npm-shrinkwrap.json +804 -4
- package/package.json +8 -2
- package/plugins/index.js +8 -4
- package/steps/home-steps.js +16 -11
- package/support/e2e.js +5 -3
package/cypress-flaky.config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
export default defineConfig({
|
|
4
5
|
projectId: 'v35btb',
|
|
5
6
|
fixturesFolder: 'fixtures',
|
|
6
7
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -16,12 +17,12 @@ module.exports = defineConfig({
|
|
|
16
17
|
// We've imported your old cypress plugins here.
|
|
17
18
|
// You may want to clean this up later by importing these.
|
|
18
19
|
setupNodeEvents(on, config) {
|
|
19
|
-
return
|
|
20
|
+
return setupPlugins(on, config);
|
|
20
21
|
},
|
|
21
22
|
baseUrl: 'http://localhost:9000',
|
|
22
23
|
specPattern: 'e2e-flaky/**/*.{js,jsx,ts,tsx}',
|
|
23
24
|
supportFile: 'support/e2e.js',
|
|
24
|
-
reporter:
|
|
25
|
+
reporter: 'cypress-multi-reporters',
|
|
25
26
|
reporterOptions: {
|
|
26
27
|
configFile: 'cypress-reporter-config.json'
|
|
27
28
|
}
|
package/cypress-legacy.config.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
2
3
|
|
|
3
4
|
const isCoverage = process.env.COVERAGE === 'true';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const loadCodeCoverage = async (on, config) => {
|
|
7
|
+
const mod = await import('@bahmutov/cypress-code-coverage/plugin');
|
|
8
|
+
const plugin = ('default' in mod) ? mod.default : mod;
|
|
9
|
+
plugin(on, config);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
6
13
|
projectId: 'v35btb',
|
|
7
14
|
fixturesFolder: 'fixtures',
|
|
8
15
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -19,10 +26,10 @@ module.exports = defineConfig({
|
|
|
19
26
|
},
|
|
20
27
|
// We've imported your old cypress plugins here.
|
|
21
28
|
// You may want to clean this up later by importing these.
|
|
22
|
-
setupNodeEvents(on, config) {
|
|
23
|
-
|
|
29
|
+
async setupNodeEvents(on, config) {
|
|
30
|
+
setupPlugins(on, config);
|
|
24
31
|
if (isCoverage) {
|
|
25
|
-
|
|
32
|
+
await loadCodeCoverage(on, config);
|
|
26
33
|
}
|
|
27
34
|
return config;
|
|
28
35
|
},
|
package/cypress.config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
export default defineConfig({
|
|
4
5
|
projectId: 'v35btb',
|
|
5
6
|
fixturesFolder: 'fixtures',
|
|
6
7
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -20,7 +21,7 @@ module.exports = defineConfig({
|
|
|
20
21
|
// We've imported your old cypress plugins here.
|
|
21
22
|
// You may want to clean this up later by importing these.
|
|
22
23
|
setupNodeEvents(on, config) {
|
|
23
|
-
return
|
|
24
|
+
return setupPlugins(on, config);
|
|
24
25
|
},
|
|
25
26
|
baseUrl: 'http://localhost:9000',
|
|
26
27
|
specPattern: './**/*.{js,jsx,ts,tsx}',
|
|
@@ -35,8 +35,8 @@ describe('TTYG agent select menu', () => {
|
|
|
35
35
|
TTYGViewSteps.visit();
|
|
36
36
|
// And: The agent dropdown menu is not visible
|
|
37
37
|
TTYGViewSteps.getAgentsDropdownMenu().should('not.be.visible');
|
|
38
|
-
// And:
|
|
39
|
-
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', '
|
|
38
|
+
// And: The first agent is selected
|
|
39
|
+
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'agent-1');
|
|
40
40
|
|
|
41
41
|
// When: I open the agent selection menu
|
|
42
42
|
TTYGViewSteps.openAgentsMenu();
|
|
@@ -48,7 +48,7 @@ describe('TTYG agent select menu', () => {
|
|
|
48
48
|
// When: I attempt to select an incompatible agent from the menu
|
|
49
49
|
TTYGViewSteps.selectAgent(0);
|
|
50
50
|
// Then: The incompatible agent should not be selected
|
|
51
|
-
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', '
|
|
51
|
+
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'agent-1');
|
|
52
52
|
// And: The dropdown menu should remain open
|
|
53
53
|
TTYGViewSteps.getAgentsDropdownMenu().should('be.visible');
|
|
54
54
|
});
|
|
@@ -43,11 +43,11 @@ describe('TTYG edit an agent', () => {
|
|
|
43
43
|
// and save the agent.
|
|
44
44
|
TTYGStubs.stubAgentEdit();
|
|
45
45
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
46
|
-
cy.wait('@edit-agent')
|
|
46
|
+
cy.wait('@edit-agent').then((interception) => {
|
|
47
|
+
expect(interception.request.body.additionalExtractionMethods[0].method).to.equal('iri_discovery_search');
|
|
48
|
+
});
|
|
47
49
|
// Then I expect the agent to be saved
|
|
48
50
|
ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
|
|
49
|
-
TTYGViewSteps.editCurrentAgent();
|
|
50
|
-
TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('be.checked');
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
|
|
@@ -76,13 +76,16 @@ describe('TTYG edit an agent', () => {
|
|
|
76
76
|
// When I save the agent
|
|
77
77
|
TTYGStubs.stubAgentEdit();
|
|
78
78
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
79
|
-
cy.wait('@edit-agent')
|
|
79
|
+
cy.wait('@edit-agent').then((interception) => {
|
|
80
|
+
const additionalMethod = interception.request.body.additionalExtractionMethods[0];
|
|
81
|
+
expect(additionalMethod).to.not.be.undefined;
|
|
82
|
+
expect(additionalMethod.method).to.equal('autocomplete_iri_discovery_search');
|
|
83
|
+
expect(additionalMethod.limit).to.equal(2);
|
|
84
|
+
});
|
|
80
85
|
// Then I expect the agent to be saved
|
|
81
86
|
ToasterSteps.verifySuccess('The agent \'Test autocomplete extraction agent\' was saved successfully.');
|
|
82
87
|
TTYGViewSteps.editCurrentAgent();
|
|
83
|
-
TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('be.checked');
|
|
84
88
|
TtygAgentSettingsModalSteps.toggleAutocompleteSearchPanel();
|
|
85
|
-
TtygAgentSettingsModalSteps.getAutocompleteMaxResults().should('have.value', '2');
|
|
86
89
|
|
|
87
90
|
// When: I select a repository with disabled autocomplete
|
|
88
91
|
AutocompleteStubs.stubAutocompleteEnabled(false);
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
import pluginJs from '@eslint/js';
|
|
3
|
+
import pluginCypress from 'eslint-plugin-cypress/flat';
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
8
|
+
plugins: { js: pluginJs },
|
|
9
|
+
languageOptions: { globals: globals.browser },
|
|
10
|
+
rules: {
|
|
11
|
+
...pluginJs.configs.recommended.rules,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
16
|
+
plugins: { cypress: pluginCypress },
|
|
17
|
+
languageOptions: {
|
|
18
|
+
globals: {
|
|
19
|
+
...globals.browser,
|
|
20
|
+
cy: 'readonly',
|
|
21
|
+
Cypress: 'readonly',
|
|
22
|
+
describe: 'readonly',
|
|
23
|
+
it: 'readonly',
|
|
24
|
+
beforeEach: 'readonly',
|
|
25
|
+
afterEach: 'readonly',
|
|
26
|
+
before: 'readonly',
|
|
27
|
+
after: 'readonly',
|
|
28
|
+
expect: 'readonly',
|
|
29
|
+
|
|
30
|
+
// Node.js globals for scripts
|
|
31
|
+
process: 'readonly',
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
...pluginJs.configs.recommended.rules,
|
|
36
|
+
...pluginCypress.configs.recommended.rules,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|