Testing complex element, how to get it's state?
See original GitHub issueWhat are you trying to achieve?
I would like to test our video player integration. But I am strugeling, due inability to find any documentation. For example how to get Element.
I need the element to be able to access to element, I need to test, that pausing really paused the video etc…
What do you get instead?
Headache… I have on idea where to look. I tried to make a helper:
'use strict';
//@ts-check
class VideoHelper extends Helper {
async _getVideo() {
return this.helpers.Puppeteer._locate(`.videojs video`);
}
async seeVideoIsPaused() {
const video = await this._getVideo();
console.log(video);
}
}
module.exports = VideoHelper;
Details
- CodeceptJS version: 1.3.3
- NodeJS Version: 9.11.1
- Operating System: Win / Linux
- Puppeteer (using original chrome, but chromium ain’t any better)
- Configuration file:
# paste suite config here
PS: class Helper
don’t have any definition, this could be possibly improved.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Testing Components – Testing Angular
Testing complex forms ... It talks to Services or other state managers. ... In our test, we need to find this element and...
Read more >Basics of testing components - Angular
But many components have complex interactions with the DOM elements described in their templates, causing HTML to appear and disappear as the component...
Read more >Unit Tests, How to Write Testable Code, and Why It Matters
Verifying that the system under test produces correct results, or that its resulting state is correct, is called state-based unit testing, while verifying ......
Read more >React Testing Library Tutorial #12 - Finding Async ... - YouTube
React Testing Library Tutorial #12 - Finding Async Elements with FindBy ... Get access to extra premium courses on Net Ninja Pro: ...
Read more >How to Write Test Cases: The Ultimate Guide with Examples
Tutorial #10: State Transition Testing Technique ... #1) Keep it simple but not too simple; make it complex, but not too complex ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My bad this can be closed, but I still think class
Helper
need some type definition. @LukoyanovE I can not, it is in internal site only.I already did, but I haven’t gotten any response to it yet.