Skip to content

Commit f797c3f

Browse files
authored
W-19307418 Fix wording (#95)
* 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. * 5.2.29 * 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. * 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.
1 parent e207548 commit f797c3f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.github/workflows/deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
with:
2828
node-version: 18
2929
cache: 'npm'
30-
- name: Install Playwright Browsers
31-
run: npx playwright install --with-deps
3230
- name: Install dependencies
3331
run: npm ci
32+
- name: Install Playwright Browsers
33+
run: npx playwright install --with-deps
3434
- name: Run tests
3535
run: npm test
3636
# test_win:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@api-components/api-method-documentation",
33
"description": "A HTTP method documentation build from AMF model",
4-
"version": "5.2.28",
4+
"version": "5.2.29",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/ApiMethodDocumentation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
473473
this.operationId = this._getValue(method, this.ns.aml.vocabularies.apiContract.operationId);
474474
this.callbacks = this._computeCallbacks(method);
475475
this.deprecated = this._computeIsDeprecated(method);
476-
this.agentParameters = this._computeAgentParameters(method);
476+
this.agentParameters = this._computeAgentParametersByMethod(method);
477477
}
478478

479479
_computeAsyncApiSecurity(){
@@ -1387,7 +1387,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
13871387
return undefined;
13881388
}
13891389

1390-
_computeAgentParameters(method) {
1390+
_computeAgentParametersByMethod(method) {
13911391
if (!method) {
13921392
return undefined;
13931393
}
@@ -1421,10 +1421,10 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
14211421
if (!isUserInput) {
14221422
return undefined;
14231423
}
1424-
const isInputEnabled = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value);
1424+
const isInputValue = this._getValue(isUserInput[0], this.ns.aml.vocabularies.data.value);
14251425

14261426
const params = {
1427-
isInputEnabled,
1427+
isUserInput: isInputValue,
14281428
};
14291429

14301430
return params;

test/agent-params.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ describe('agent-api', function() {
2323
amf = await AmfLoader.load(apiFile, compact);
2424
});
2525

26-
it('isInputEnabled is true', async () => {
26+
it('isUserInput is true', async () => {
2727
const endpopint = AmfLoader.lookupEndpoint(amf, '/reservations/reservationlookup');
2828
const method = AmfLoader.lookupOperation(amf, '/reservations/reservationlookup', 'get');
2929
element = await modelFixture(amf, endpopint, method);
3030
await aTimeout();
31-
assert.equal(element.agentParameters.isInputEnabled, 'true');
31+
assert.equal(element.agentParameters.isUserInput, 'true');
3232
});
3333

3434
it('renders the summary', async () => {

0 commit comments

Comments
 (0)