-
Notifications
You must be signed in to change notification settings - Fork 27
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
e2e upgrade #2352
e2e upgrade #2352
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2352 +/- ##
========================================
- Coverage 74.8% 74.7% -0.1%
========================================
Files 516 516
Lines 20033 20033
Branches 1971 1971
========================================
- Hits 14986 14974 -12
- Misses 4530 4538 +8
- Partials 517 521 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
👍 just a question below
tests/e2e/tutorials/isolve-gpu.js
Outdated
} | ||
catch(err) { | ||
tutorial.setTutorialFailed(true); | ||
console.log('Tutorial error: ' + err); | ||
} | ||
finally { | ||
await tutorial.toDashboard(); | ||
await tutorial.removeStudy2(studyId); |
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.
👍
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.
I see the purpose of removeStudy2
. Why don't you rename it and move the call to the catch
section? (and keep the original way to removeStudy
)
Also, removeStudy2
doesn't need to go toDashboard
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.
agree with @odeimaiz, then we could detect when the remove study fails and still remove the studies
await utils.sleep(waitFor); | ||
await this.takeScreenshot('waitFor_finished') |
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
width: 1680, | ||
height: 950 |
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.
why was this done?
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 was too big for my laptop screen to check it in demo mode
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.
- As I said, I would not remove the screenshooter.
- removeStudy2 uses Resources instead of interacting with the GUI for deleting a study. What's the benefit?
- Checking file names is only done in 3 out of 5 tutorials, why?
|
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.
very nice!
please just consider the issue with the Kember test
console.log("Study ID:", studyId); | ||
|
||
const workbenchData = utils.extractWorkbenchData(studyData["data"]); | ||
await tutorial.waitForServices(workbenchData["studyId"], [workbenchData["nodeIds"][0]]); | ||
|
||
// Wait for the output files to be pushed | ||
await tutorial.waitFor(30000); | ||
await tutorial.waitFor(30000, 'Wait for the output files to be pushed'); |
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, probably then we can remove the duplicated comments.
async removeStudy2(studyId) { | ||
console.log(`Removing study ${studyId}`) | ||
const resp = await this.__page.evaluate(async function(studyId) { | ||
return await osparc.data.Resources.fetch('studies', 'delete', { |
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.
cool
tests/e2e/tutorials/isolve-gpu.js
Outdated
} | ||
catch(err) { | ||
tutorial.setTutorialFailed(true); | ||
console.log('Tutorial error: ' + err); | ||
} | ||
finally { | ||
await tutorial.toDashboard(); | ||
await tutorial.removeStudy2(studyId); |
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.
agree with @odeimaiz, then we could detect when the remove study fails and still remove the studies
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.
What is the drawback of having continues screenshots that you decided to remove it? I also find them very useful to debug (together with the client's log) and since the last update they do not take a lot of space anymore.
imo is not that they are bad themselves.. even if there are some things I don't like, like most of them being useless, or the periodicity, that seems a bit arbitrary. the same with the waiting times. also, we would like to know what went wrong just by reading a descriptive log rather than searching and opening some screenshots and wondering what happened of course based on a deep knowledge about the platform. By disabling them, I am more trying to force ourselves to do it differently. for example: instead of taking one screenshot every two seconds, just take screenshots when they are needed: before and after a click or action is performed, or whenever a notification appears on the screen (although this could be just logged, I will try that). instead of waiting for a fixed amount of time for stuff to happen, just wait for the DOM to change in some way. @odeimaiz what do you think? |
I agree that a better logging would help, but I still think the optimization step is too far. I would keep the screenshooter as is. |
Conflicts: tests/e2e/package.json
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.
Some recommendations on the PR:
- Add a more descriptive title. It helps us when we build release notes
- Assign the case to yourself
- Assign this sprint as Milestone
- Add labels to classify the PR
- Comment and resolve all reviews (now there is a new feature "Conversations")
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.
- removeStudy2: rename it and move it to the
catch
section - Leave the screenshooter as is. If you want to start adding logs that eventually will make the every-2"-screenshot useless, very good, but in the meantime I wouldn't touch it.
done |
You win.... |
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.
👍
What do these changes do?
Related issue/s
How to test
Checklist