mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-12 19:09:34 -04:00
Fix base url for testcases (#305)
Fix legacy ubuntu repository urls (#284)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
FROM ubuntu:trusty
|
||||
FROM ubuntu:utopic
|
||||
MAINTAINER jekkos
|
||||
RUN sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
|
||||
RUN apt-get update
|
||||
RUN apt-get -y upgrade
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd nodejs npm curl
|
||||
@@ -20,7 +21,6 @@ RUN npm install -g grunt-cli
|
||||
RUn ln -s /usr/local/bin/grunt /usr/bin/grunt
|
||||
|
||||
RUN ln -fs /app/* /var/www/html
|
||||
RUN rm /var/www/index.html
|
||||
ADD ./docker/start_container.sh /start_container.sh
|
||||
RUN chmod 755 /start_container.sh
|
||||
EXPOSE 80 3306
|
||||
|
||||
@@ -2,7 +2,7 @@ var assert = require('assert');
|
||||
|
||||
var ospos = function() {
|
||||
|
||||
var server = "http://localhost/index.php";
|
||||
var server = "http://localhost";
|
||||
|
||||
return {
|
||||
|
||||
@@ -10,38 +10,38 @@ var ospos = function() {
|
||||
return server + suffix;
|
||||
}
|
||||
,
|
||||
login : function(browser, done) {
|
||||
return browser.get(this.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);
|
||||
login : function(browser, done) {
|
||||
return browser.get(this.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);
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
create_item : function(browser, item)
|
||||
{
|
||||
return browser.get(this.url("/index.php/items")).elementByCssSelector("a[title='New Item']", 5000).click()
|
||||
.waitForElementByName("name", 10000).type(item.name).elementById("category").type(item.category)
|
||||
.elementById('cost_price', 2000).clear().type(item.cost_price).elementById("unit_price", 2000).type(item.unit_price)
|
||||
.elementById('tax_name_1', 2000).type('VAT').elementById("tax_percent_name_1", 2000).type("21")
|
||||
.elementById('receiving_quantity', 2000).type(item.receiving_quantity || 1)
|
||||
.elementById("1_quantity", 2000).type("1").elementById("reorder_level", 2000).type("0").elementById("submit", 2000).click()
|
||||
.waitForElementByXPath("//table/tbody/tr[td/text()='anItem']/td[3]").text().then(function (value) {
|
||||
assert.equal(value, "anItem", "item " + item.name + " could not be created!!");
|
||||
});
|
||||
}
|
||||
create_item : function(browser, item)
|
||||
{
|
||||
return browser.get(this.url("/index.php/items")).elementByCssSelector("a[title='New Item']", 5000).click()
|
||||
.waitForElementByName("name", 10000).type(item.name).elementById("category").type(item.category)
|
||||
.elementById('cost_price', 2000).clear().type(item.cost_price).elementById("unit_price", 2000).type(item.unit_price)
|
||||
.elementById('tax_name_1', 2000).type('VAT').elementById("tax_percent_name_1", 2000).type("21")
|
||||
.elementById('receiving_quantity', 2000).type(item.receiving_quantity || 1)
|
||||
.elementById("1_quantity", 2000).type("1").elementById("reorder_level", 2000).type("0").elementById("submit", 2000).click()
|
||||
.waitForElementByXPath("//table/tbody/tr[td/text()='anItem']/td[3]").text().then(function (value) {
|
||||
assert.equal(value, "anItem", "item " + item.name + " could not be created!!");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = ospos();
|
||||
module.exports = ospos();
|
||||
|
||||
Reference in New Issue
Block a user