Fixed tests
This commit is contained in:
parent
a37ce3ea37
commit
3a98f57031
|
@ -31,6 +31,6 @@ The e2e tests are located in the `test/` folder and require [nodejs](http://node
|
|||
cd gitea-app/test
|
||||
|
||||
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) {
|
||||
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(result.statusCode).to.be(200);
|
||||
done();
|
||||
|
@ -159,8 +159,8 @@ describe('Application life cycle test', function () {
|
|||
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
||||
|
||||
browser.findElement(by.xpath('//div[text()="Add Key"]')).click();
|
||||
browser.findElement(by.id('title')).sendKeys('testkey');
|
||||
browser.findElement(by.id('content')).sendKeys(publicKey.trim()); // #3480
|
||||
browser.findElement(by.id('ssh-key-title')).sendKeys('testkey');
|
||||
browser.findElement(by.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
||||
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(); });
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue