mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-06 23:51:08 -05:00
Merge branch 'feature/travis-ci'
This commit is contained in:
@@ -121,7 +121,7 @@ INSERT INTO `ospos_employees` (`username`, `password`, `person_id`, `deleted`) V
|
||||
CREATE TABLE `ospos_giftcards` (
|
||||
`record_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`giftcard_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`giftcard_number` varchar(25) NOT NULL,
|
||||
`giftcard_number` int(10) NOT NULL,
|
||||
`value` decimal(15,2) NOT NULL,
|
||||
`deleted` int(1) NOT NULL DEFAULT '0',
|
||||
`person_id` INT(10) DEFAULT NULL,
|
||||
|
||||
40
test/giftcard_numbering.js
Normal file
40
test/giftcard_numbering.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var assert = require("assert"); // node.js core module
|
||||
|
||||
describe("giftcard numbering test", function () {
|
||||
|
||||
var server = "http://localhost/pos";
|
||||
|
||||
var url = function url(suffix) {
|
||||
return server + suffix + "?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=14241668456852'";
|
||||
};
|
||||
|
||||
it("should be able to login", function (done) {
|
||||
return this.browser.get(url("/index.php"))
|
||||
.elementByName('username').type("admin").getValue()
|
||||
.then(function(value) {
|
||||
assert.equal(value, "admin");
|
||||
})
|
||||
.elementByName('password').type("pointofsale").getValue()
|
||||
.then(function(value) {
|
||||
assert.ok(value, "pointofsale");
|
||||
})
|
||||
.elementByName('loginButton').click()
|
||||
.elementById('home_module_list').then(function(value) {
|
||||
assert.ok(value, "Login failed!!")
|
||||
})
|
||||
.then(done, done);
|
||||
|
||||
});
|
||||
|
||||
it("issue #65: giftcard numbering should add properly", function() {
|
||||
return this.browser.get(url("/index.php/giftcards")).waitForElementByCss(".big_button").click()
|
||||
.waitForElementByName("value").type("100").elementById('giftcard_number').clear().type("10")
|
||||
.elementById("submit").click().waitForElementByXPath("//table/tbody/tr[td/text()='10']/td[4]").text().then(function (value) {
|
||||
assert.ok(value, "giftcard failed to be added properly!");
|
||||
}).elementByCss(".big_button").click().waitForElementByName("value").type("100").elementById("submit").click()
|
||||
.waitForElementByXPath("//table/tbody/tr[td/text()='11']/td[4]").text().then(function (value) {
|
||||
assert.equal(value, "11", "giftcard number not incrementing properly!!");
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,26 +1,3 @@
|
||||
var assert = require("assert"); // node.js core module
|
||||
exports.loginFirst = function() {
|
||||
|
||||
describe("giftcard numbering test", function () {
|
||||
|
||||
it("giftcard numbering should increment", function (done) {
|
||||
|
||||
var searchBox;
|
||||
var browser = this.browser;
|
||||
browser.get('http://localhost/pos/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=14241668456852')
|
||||
.elementByName('username').type("admin").getValue()
|
||||
.then(function(value) {
|
||||
assert.equal(value, "admin");
|
||||
})
|
||||
.elementByName('password').type("pointofsale").getValue()
|
||||
.then(function(value) {
|
||||
assert.ok(value, "pointofsale");
|
||||
})
|
||||
.elementByName('loginButton').click()
|
||||
.elementById('home_module_list').then(function(value) {
|
||||
assert.ok(value, "Login failed!!")
|
||||
})
|
||||
.then(done, done);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
Alias /pos %TRAVIS_BUILD_DIR%
|
||||
<VirtualHost *:80>
|
||||
|
||||
DocumentRoot %TRAVIS_BUILD_DIR%
|
||||
|
||||
Reference in New Issue
Block a user