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
LMBQ-323: Adding OS based visual verification option #368
Conversation
Lombiq.Tests.UI/Extensions/VisualVerificationUITestContextExtensions.cs
Outdated
Show resolved
Hide resolved
…nsions.cs Co-authored-by: Zoltán Máté <99020631+MZole@users.noreply.github.com>
|
||
if (checkOS) | ||
{ | ||
var oS = OperatingSystem.IsWindows() ? "Windows" : "Unix"; |
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 are more than two OSes ;). Also, didn't we have something similar already?
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 will correct the variable name. We had something similiar, but insted of using this configuration, in multiple places, I added it here with a bool
this way it's DRY. If you look at the OSOCE PR now it's just this bool
, instead of the configuration, also in our private project.
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.
Ah OK, good! It's not about the variable name, but that this only supports Windows and *nix, both of which can have many different editions, and the latter can contain Linux and Mac OS (among others) too.
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.
Okay, but we don't have a use case in any project, where we would differentiate between OS verions, or Mac OS, so that would just add unnecessary complexities for now.
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's simply incorrect. It's not that every OS that is not Windows is Unix. This feature thus have a limited use case, because if we want to do anything more fine grained, which includes multiple distros of Linux, then we'll need to change this. Suffixing with the OS name would be better, for example.
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 can check for the whole OS name and version, but in that case, the VV test will fail locally, if the user does not have the same version as the CI. For example, somebody uses Windows 11, and tests are running on Windows 10.
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.
Now I checked the code, and we have WithUsePlatformAsSuffix()
for this (see
.WithUsePlatformAsSuffix() |
If you want to have a shortcut for that, you can add something like an AssertVisualVerificationApprovedWithPlatformSuffix()
that uses that by default, but there's no need for a new distinguishing logic.
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.
Okay, I checked the generated suffixes with this. It matches with the local ones (Win32NT).
LMBQ-323