Skip to content
Snippets Groups Projects
Commit bb7cea86 authored by Alexandre Ducarne's avatar Alexandre Ducarne
Browse files

Website is now ENT UTC

parent 405d9eb0
No related branches found
No related tags found
2 merge requests!7v1.0,!6Website is now ENT UTC
......@@ -24,14 +24,14 @@ exports.config = {
// A base URL for your application under test. Calls to protractor.get()
// with relative paths will be prepended with this.
baseUrl: 'http://localhost:9999',
baseUrl: 'https://webapplis.utc.fr/ent/',
directConnect: true,
framework: 'jasmine',
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
// Add a screenshot reporter:
jasmine.getEnv().addReporter(new HtmlReporter({
preserveDirectory: true,
......@@ -49,19 +49,18 @@ exports.config = {
const day = currentDate.getDate();
const month = currentDate.getMonth() + 1;
const year = currentDate.getFullYear();
const time = currentDate.getHours() + ':' + currentDate.getMinutes() + '-' + currentDate.getSeconds();
const time = currentDate.getHours() + '-' + currentDate.getMinutes();
const validDescriptions = descriptions.map(function(description) {
return description.replace('/', '@');
});
return path.join(
day + '-' + month + '-' + year +'-'+ time,
year + '-' + month + '-' + day + '-' + time,
validDescriptions.join('-'));
},
}).getJasmine2Reporter());
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
......
describe('Protractor Demo App', function() {
const firstNumber = element(by.model('first'));
const secondNumber = element(by.model('second'));
const goButton = element(by.id('gobutton'));
// const latestResult = element(by.binding('latest'));
const history = element.all(by.repeater('result in memory'));
/**
*
* @param {*} a
* @param {*} b
*/
function add(a, b) {
firstNumber.sendKeys(a);
secondNumber.sendKeys(b);
goButton.click();
}
beforeEach(function() {
browser.get('http://juliemr.github.io/protractor-demo/');
beforeAll(function() {
browser.ignoreSynchronization = true;
browser.get('index.jsf');
});
it('should have a history', function() {
add(1, 2);
add(3, 4);
expect(history.count()).toEqual(2);
add(5, 6);
expect(history.count()).toEqual(3); // This is wrong!
it('should enter aducarne', function() {
let username = element(by.id('username')).sendKeys('aducarne');
expect(username.getAttribute('value')).toBe('aducarne');
});
it('should like corentin', function() {
expect(true).toBe(true);
it('should enter aducarne', function() {
let pass = element(by.id('password')).sendKeys('password');
expect(pass.getAttribute('value')).toBe('password');
browser.sleep(2000);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment