Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2016 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e95affba5f7e148c553e772e1962073b to your computer and use it in GitHub Desktop.
Save anonymous/e95affba5f7e148c553e772e1962073b to your computer and use it in GitHub Desktop.
var assert = require('assert');
var webdriver = require('selenium-webdriver');
var LoginPage = require('../lib/LoginPage.js');
var UsuariosPage = require('../lib/UsuariosPage.js');
var By = webdriver.By;
describe('Send request to freelancer', function () {
this.timeout(90000);
var driver;
before(function (done) {
driver = new webdriver.Builder().forBrowser('chrome').build();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10 * 1000);
driver.call(function () {
done();
});
});
after(function (done) {
driver.quit();
driver.call(function () {
done();
});
});
it('should login successfully', function (done) {
LoginPage.loginAdmin(driver);
driver.call(function () {
done();
});
});
it('should search for rut and click in send push', function (done) {
driver.findElement(By.css('.btn.btn-default.btn-sm')).isDisplayed().then(function(showSendPushButton) {
if (showSendPushButton) {
driver.findElement(By.xpath('(//a[@class="btn btn btn-primary"])[2]')).click();
}
});
driver.call(function () {
done();
});
});
it('should send message', function (done) {
UsuariosPage.sendMessage(driver);
driver.call(function () {
done();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment