-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix token ui tests #955
Fix token ui tests #955
Conversation
Wait for permissions to be loaded before finishing processing click events on top level checkboxes
@@ -14,95 +14,96 @@ describe("Server management", function() { | |||
it("Add server name with space", function() { | |||
cy.get("#new").click(); | |||
// adding username with space | |||
cy.get("#name").type("Server "); | |||
cy.get("#name").type("Server ", { force: true }); |
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's the purpose of force: true
here (and below)?
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.
Works around cypress trying to scroll the thing into view, but it ending up hidden because their scrolling algorithm is bad. This types (or whatever) into the box even if it isn't visible - I'd add a comment to this effect, but we end up having to do it pretty much universally across the tests, so is already mentioned elsewhere.
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.
Yeah I was going to say the same thing. Would be nice to have a comment but since it's everywhere it's already fairly visible (just not entirely clear why if you don't see that comment). A bit annoying that we have to do this everywhere but seems to be necessary. Out of interest, is this a known bug that they are aware of and that might be fixed some time in the future?
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.
Yeah, see cypress-io/cypress#871
They are apparently working on it (or were in December last year).
cy.contains("#name-helper-text").should("not.exist"); | ||
}); | ||
it("Add server name more than 120 characters", function() { | ||
cy.get("#new").click(); | ||
//adding username | ||
cy.get("#name").type( | ||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" | ||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", |
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.
In a recent PR you had a nice concise way of writing this (something like "a".repeat(121)
or similar). Do you want to change it here 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.
Ahh yes, in #864
Yeah, might as well throw that in here as well.
Codecov Report
@@ Coverage Diff @@
## master #955 +/- ##
==========================================
+ Coverage 89.82% 91.22% +1.39%
==========================================
Files 14 13 -1
Lines 1278 1071 -207
Branches 56 35 -21
==========================================
- Hits 1148 977 -171
+ Misses 123 89 -34
+ Partials 7 5 -2
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #955 +/- ##
==========================================
+ Coverage 89.82% 91.22% +1.39%
==========================================
Files 14 13 -1
Lines 1278 1071 -207
Branches 56 35 -21
==========================================
- Hits 1148 977 -171
+ Misses 123 89 -34
+ Partials 7 5 -2
Continue to review full report at Codecov.
|
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.
Looks good as far as I can tell. 👍
Wait for permissions to be loaded before finishing processing click events on top level checkboxes - fixes sporadic fail on CI.
(Also fixes permissions boxes not showing up when first adding a new server)