Commit 61b7fb70 by vindarel

(minor) rm old and deprecated testator/selenium e2e tests

parent 972e42ef
// conf.js
// full list of capabilities: https://github.com/angular/protractor/blob/master/docs/referenceConf.js
// selenium capabilities: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['lsspec.js'],
capabilities: {
// phantomJS isn't adviced.
browserName: 'firefox'
}
}
# Write protractor tests in livescript.
#
# status: broken, needs login.
#
# warning: # in livescript strings must be escaped.
do !->
describe "the selling page ", (...) !->
# try to login
login = !->
# user = element by.id "id_username"
user = $("\#id_username")
# pwd = element by.id "id_password"
pwd = $("\#id_password")
# Fails here:
user.sendKeys "admin"
pwd.sendKeys "admin"
btn = $('button[type=submit]')
btn.click!
webdriver = require "selenium-webdriver"
testUrl = "http://localhost:8000/en/sell"
login!
browser.sleep 500
# "element" will work if we're in an angular page.
# The following worked, but needs login.
validateButton = element by.id "validateButton"
input = element by.model "copy_selected"
selectedCards = element.all by.repeater "cards_selected"
selectCard = !->
input.sendKeys "rue"
browser.sleep 500
input.sendKeys webdriver.Key.TAB
beforeEach ->
browser.get testUrl
it "should display cards" !->
selectCard()
expect selectedCards.count! .toEqual 1
expect browser.getTitle() .toEqual("")
(function(){
describe("The selling page", function() {
var webdriver, testUrl, validateButton, input, selectedCards;
webdriver = require("selenium-webdriver");
// Requires: testing data (make data),
// starting selenium (make wedriver-manager).
testUrl = "http://localhost:8000/en/sell";
validateButton = element(by.id("validateButton"));
input = element(by.model("copy_selected"));
selectedCards = element.all(by.repeater("cards_selected"));
function selectCard() {
input.sendKeys("rue");
// Isn't protractor supposed to wait the result of a $http call ?
browser.sleep(500);
input.sendKeys(webdriver.Key.TAB);
}
beforeEach(function() {
browser.get(testUrl);
});
it("should display cards of the autocomplete.", function() {
selectCard();
expect(selectedCards.count()).toEqual(1);
expect(browser.getTitle()).toEqual("");
});
});
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment