`@sapui5/ts-types-esm` - `PageObjectDefinition.actions` & `assertions` function types should have a `this` parameter
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start at the @sapui5/ts-types-esm definition of PageObjectDefinition and inspect the actions and assertions function types. Compare them with the Opa5.createPageObjects example linked in the issue, then verify that its this.waitFor call compiles once the this type is represented.
Written by the indexing model from the issue text.
Description
export type PageObjectDefinition = {
//...
actions?: Record<string, (this: Opa5) => void>;
assertions?: Record<string, (this: Opa5) => void>;
}
otherwise this example won't compile bcause the this type is not defined:
Opa5.createPageObjects({
onTheAppPage: {
actions: {},
assertions: {
iShouldSeeTheApp: function () {
// error: Cannot invoke an object which is possibly 'undefined'
this.waitFor({
id: 'myButton',
actions: function () {},
success: function () {},
})
},
},
},
})
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 35
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UI5/typescript
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
UI5/typescript#625 · 4 comments ·
-
dts-generator
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UI5/typescript#529 · 3 comments ·
-
Dependency Dashboard Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
UI5/typescript#587 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
UI5/typescript#532 ·
-
enhancement ts-interface-generator
Difficulty 5/5 Over a week Newbie friendliness 30/100
UI5/typescript#524 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
vercel/vercel-plugin#199 ·