-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests e2e Playwright : Store logs in Project POM #5226
base: master
Are you sure you want to change the base?
Conversation
Follow up 3liz#5204 Add a way to store and check logs in Project page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea !
Especially when the test is failing because of that.
Let's wait for #5225 ?
The next steps will be to do a check afterEach
, afterAll
... for Javascript logs and server logs.
@@ -103,6 +135,7 @@ export class ProjectPage { | |||
*/ | |||
async open(){ | |||
await gotoMap(`/index.php/view/map?repository=${this.repository}&project=${this.project}`, this.page); | |||
expect(this.logs).toHaveLength(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This problem of this open
method, it's used only 3 times, versus 107 times for the function gotoMap
.
What don't we move it to a "standalone function" instead of a method of this class ? So it can be called at the end of gotoMap
, while we are doing the transition.
If we want to keep it in POM, I think #5225 should be merged first, so it can be in the base class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a draft to test it. I don't know how we will have to use it.
* @property {string} message - the log message text | ||
* @property {string} location - the log message location in one line | ||
* @see https://playwright.dev/docs/api/class-consolemessage | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not sure to understand the purpose of this block ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is done to describe logMessage
object to simplify logs
property description.
Follow up #5204
Add a way to store and check logs in Project page.