From c71f50c7a7c734daa2bc4b5c2585f96027855a3f Mon Sep 17 00:00:00 2001 From: Alex Perez Date: Wed, 10 Sep 2025 09:43:29 -0300 Subject: [PATCH 1/4] refactor: Rename agent parameters computation method for clarity - Updated the method name from _computeAgentParameters to _computeAgentParametersByMethod for better readability. - Adjusted the parameter object to use isUserInput instead of isInputEnabled for improved clarity in the context of user input handling. --- src/ApiMethodDocumentation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ApiMethodDocumentation.js b/src/ApiMethodDocumentation.js index 76bcee4..9bdee2d 100644 --- a/src/ApiMethodDocumentation.js +++ b/src/ApiMethodDocumentation.js @@ -473,7 +473,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) { this.operationId = this._getValue(method, this.ns.aml.vocabularies.apiContract.operationId); this.callbacks = this._computeCallbacks(method); this.deprecated = this._computeIsDeprecated(method); - this.agentParameters = this._computeAgentParameters(method); + this.agentParameters = this._computeAgentParametersByMethod(method); } _computeAsyncApiSecurity(){ @@ -1387,7 +1387,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) { return undefined; } - _computeAgentParameters(method) { + _computeAgentParametersByMethod(method) { if (!method) { return undefined; } @@ -1421,10 +1421,10 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) { if (!isUserInput) { return undefined; } - const isInputEnabled = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value); + const isInputValue = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value); const params = { - isInputEnabled, + isUserInput: isInputValue, }; return params; From 4e1a02fc56236c0d84c4c0bf8412b83ec399e55c Mon Sep 17 00:00:00 2001 From: Alex Perez Date: Wed, 10 Sep 2025 09:47:13 -0300 Subject: [PATCH 2/4] 5.2.29 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7332888..ad7aaa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@api-components/api-method-documentation", - "version": "5.2.28", + "version": "5.2.29", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@api-components/api-method-documentation", - "version": "5.2.28", + "version": "5.2.29", "license": "Apache-2.0", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.4", diff --git a/package.json b/package.json index 8dcba2f..966a0da 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@api-components/api-method-documentation", "description": "A HTTP method documentation build from AMF model", - "version": "5.2.28", + "version": "5.2.29", "license": "Apache-2.0", "main": "index.js", "module": "index.js", From 7df822f7de383c37271ecfcaa7447cadea5ae949 Mon Sep 17 00:00:00 2001 From: Alex Perez Date: Wed, 10 Sep 2025 12:17:40 -0300 Subject: [PATCH 3/4] chore: Reorder Playwright browser installation in GitHub Actions workflow - Moved the installation of Playwright browsers to occur after dependency installation for improved workflow clarity and execution order. --- .github/workflows/deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e046846..af87db8 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -27,10 +27,10 @@ jobs: with: node-version: 18 cache: 'npm' - - name: Install Playwright Browsers - run: npx playwright install --with-deps - name: Install dependencies run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps - name: Run tests run: npm test # test_win: From 2ec1186221ee00d9d41f72849aa837cd8c53e957 Mon Sep 17 00:00:00 2001 From: Alex Perez Date: Wed, 10 Sep 2025 12:28:40 -0300 Subject: [PATCH 4/4] test: Rename test assertion for user input clarity - Updated the test case from 'isInputEnabled' to 'isUserInput' to better reflect the parameter's purpose. - Adjusted the assertion to check for 'isUserInput' instead of 'isInputEnabled' for improved clarity in the context of user input handling. --- test/agent-params.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/agent-params.test.js b/test/agent-params.test.js index 8df96fc..874acca 100644 --- a/test/agent-params.test.js +++ b/test/agent-params.test.js @@ -23,12 +23,12 @@ describe('agent-api', function() { amf = await AmfLoader.load(apiFile, compact); }); - it('isInputEnabled is true', async () => { + it('isUserInput is true', async () => { const endpopint = AmfLoader.lookupEndpoint(amf, '/reservations/reservationlookup'); const method = AmfLoader.lookupOperation(amf, '/reservations/reservationlookup', 'get'); element = await modelFixture(amf, endpopint, method); await aTimeout(); - assert.equal(element.agentParameters.isInputEnabled, 'true'); + assert.equal(element.agentParameters.isUserInput, 'true'); }); it('renders the summary', async () => {