-
Notifications
You must be signed in to change notification settings - Fork 5
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
[WIP] Improved the collections test code #428
[WIP] Improved the collections test code #428
Conversation
ccheraa
commented
Jun 4, 2021
- Removed unnecessary nesting, and extra Cypress calls.
- Added spies for collection related api calls.
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.
Something went wrong with the merging / rebasing it seems. I very much like the additions to the collections test, and will cherry-pick 47f368e into my next PR. I have a better solution to the OS specific keyboard short cuts in duncdrum@599610d instead of mashing three keys conditionally run the appropriate two key combo
5fac551
to
2199463
Compare
The collections and documents specs now work individually without problems. |
initial run:
|
fff868a
to
d23f90c
Compare
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.
Have you tried running these on your Linux dev server (i.e. dv
) ?
I can't get them to run at all. We are now establishing connections in two different ways within the same hook, that is bound to be flaky. The ApI connection stuff, happens without a matching test assertion, which explains the error message, The docs have some example code that on point. Let's clean those hooks up a bit see #400
There are a number of places where we can reuse existing test artifacts, lets.
}) | ||
after(() => { | ||
// delete the test colelction | ||
new Cypress.Promise(resolve => FSApi.remove(connection, '/db/test', true).then(resolve).catch(resolve)) |
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.
The before and after hooks of the document spec are better, please match them here.
// (DP): end workaround for #413 | ||
cy.get('[node-id$=test]') | ||
.click() | ||
.prev().should('not.have.class', 'fa-spin') |
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 are we testing spin here, multiple times ?
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 here is to make sure the node is done loading
I added the wait because it turned out that the spin disappears before the rest of the tree is rendered (the nodes are not rendered all at once), so the wait is to give React enough time to update the dom
.should('not.exist') | ||
it('should move a collection', () => { | ||
const dataTransfer = new DataTransfer(); | ||
cy.get('[node-id$="test\\/col1"]') |
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.
another good place to reuse existing test or system artifacts instead of creating our own.
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.
We need to create dataTransfer
object for two tests only, so I thought it would be overkill to create it under beforeAll
, and we shouldn't create in before
because it shouldn't be reused.
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.
my point wasn't about the before
hooks but about the collections which have been created from earlier test cases, lets re-use whats already been generated and tested.
|
||
it('should not move a collection to one of its sub-collections', () => { |
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.
duplicate test case?
@@ -1321,7 +1321,9 @@ export class FSCore { | |||
node.uri = name; | |||
} | |||
node.nodeName = this.getName(name);; | |||
delete(this.dict[node.nodeId]); |
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.
please link open issues related to the fix from the commit message, if there isn't an open issue already create a new one
This fixes #433 |
…ect-setup Refactor testsuite
Update dependencies
Bumps [cypress](https://github.com/cypress-io/cypress) from 7.6.0 to 8.0.0. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v7.6.0...v8.0.0) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…m_and_yarn/cypress-8.0.0 chore(deps-dev): bump cypress from 7.6.0 to 8.0.0
Update dependencies
Moved to PR #459 |