-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stacks class testing #17
Conversation
…stack state (collapsed/expanded), and stack containing cards.
…acks-class-tesing
…stack state (collapsed/expanded), and stack containing cards.
…ectic into stacks-class-tesing
…acks-class-tesing
…o card class, uncommented draggability and droppability card tests, and updated parameters of cards in card and stack tests.
…acks-class-tesing
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.
Changes related to test updates/removals must be resolved before approval.
test/card-test.js
Outdated
// assert.notEqual(card.saveButton, undefined, msg2); | ||
// assert.notEqual(card.fullscreenButton, undefined, msg3); | ||
// }); | ||
it('document contains close, expand, and save buttons', function () { |
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.
Testing for the existence of elements within an instance of the Card
class does not test behavior, but instead tests the definition of the Card
class. This definition could change in the future and still remain a valid Card
, however, this test would indicate a change in structure is invalid. I suggest removing this test.
test/card-test.js
Outdated
// var disabled = 1; | ||
// return assert.equal(disabled, 1); | ||
// }); | ||
it('card dragability can be disabled', function () { |
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.
Testing whether a local variable (disabled
) equals 1 after evaluating an if
statement which limits that variable from being declared only when a Card
class instance allows the jquery-ui.draggable('disable')
command is a masked testing methodology. Since the ability to disable draggability is inherited from the jquery-ui
package, this test is actually evaluating the functionality of that package. Tests need to focus on evaluating the functionality of the synectic
app.
test/card-test.js
Outdated
// var disabled = 1; | ||
// return assert.equal(disabled, 1); | ||
// }); | ||
it('card dropability can be disabled', function () { |
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.
Similar to my comments on line 124, the jquery-ui.droppable('disable')
command is a functionality provided by jquery-ui
package. No need to test jquery-ui
within our app; that type of testing should be handled by the developers of jquery-ui
within their package.
test/stacks-test.js
Outdated
var Canvas = require('../app/Canvas.js'); | ||
var Stack = require('../app/Stacks.js'); | ||
|
||
var app = new Application({ |
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 declaration of app
is masked by the declaration of another app
on line 25. Therefore, this declaration can be removed.
The |
…nges for test/card-test.js, a stack is now created when a card is dropped onto another card
In my last commit I was mistaken. I have not competed every PR requests for app/card-test.js. I have removed the test that checks for buttons on a card instance, but I am still working on creating a test that checks that a card can be dragged and dropped. |
Updated:
app/cards.js
are now uncommented and are run intest/card-test.js
app/cards.js
.Added:
test/stacks.js
provides basic testing infrastructure for ensuring that a stack instance is set up correctly.Stack tests
check: