Fixed tests

merge-requests/6/head v0.1.0
Dennis Schwerdel 5 years ago
parent a37ce3ea37
commit 3a98f57031
  1. 2
      README.md
  2. 6
      test/test.js

@ -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…
Cancel
Save