forked from cloudron-apps/gitea-app
Fixed tests
This commit is contained in:
parent
a37ce3ea37
commit
3a98f57031
2 changed files with 4 additions and 4 deletions
|
@ -31,6 +31,6 @@ The e2e tests are located in the `test/` folder and require [nodejs](http://node
|
||||||
cd gitea-app/test
|
cd gitea-app/test
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
|
PATH=$PATH:node_modules/.bin USERNAME=<cloudron username> PASSWORD=<cloudron password> mocha --bail test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ describe('Application life cycle test', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkAvatar(done) {
|
function checkAvatar(done) {
|
||||||
superagent.get('https://' + app.fqdn + '/avatars/1').end(function (error, result) {
|
superagent.get('https://' + app.fqdn + '/avatars/a3e6f3316fc1738e29d621e6a26e93d3').end(function (error, result) {
|
||||||
expect(error).to.be(null);
|
expect(error).to.be(null);
|
||||||
expect(result.statusCode).to.be(200);
|
expect(result.statusCode).to.be(200);
|
||||||
done();
|
done();
|
||||||
|
@ -159,8 +159,8 @@ describe('Application life cycle test', function () {
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
||||||
|
|
||||||
browser.findElement(by.xpath('//div[text()="Add Key"]')).click();
|
browser.findElement(by.xpath('//div[text()="Add Key"]')).click();
|
||||||
browser.findElement(by.id('title')).sendKeys('testkey');
|
browser.findElement(by.id('ssh-key-title')).sendKeys('testkey');
|
||||||
browser.findElement(by.id('content')).sendKeys(publicKey.trim()); // #3480
|
browser.findElement(by.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
||||||
browser.findElement(by.xpath('//button[contains(text(), "Add Key")]')).click();
|
browser.findElement(by.xpath('//button[contains(text(), "Add Key")]')).click();
|
||||||
browser.wait(until.elementLocated(by.xpath('//p[contains(text(), "added successfully!")]')), TIMEOUT).then(function () { done(); });
|
browser.wait(until.elementLocated(by.xpath('//p[contains(text(), "added successfully!")]')), TIMEOUT).then(function () { done(); });
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue