-
Notifications
You must be signed in to change notification settings - Fork 0
/
infi.js
38 lines (34 loc) · 1.74 KB
/
infi.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
describe('Exo1', function() {
var until = protractor.ExpectedConditions;
var title = element(by.css('.title'));
var cross = element(by.css('.close-reveal-modal[ng-click]'));
var button = element(by.css('.button-with-icon'));
var congratsW = element(by.css('#successModal[style]'));
var congratsTitle = element(by.css('#successModal h2 span'));
var congratsCross = element.all(by.css('.close-reveal-modal')).get(2);
beforeEach(function() {
browser.get('https://plm.telecomnancy.univ-lorraine.fr/#/ui/lessons/welcome/');
//browser.get('http://152.81.65.60:9000');
//browser.get('http://152.81.15.90/#/ui/lessons/welcome/');
browser.ignoreSynchronization=true;
browser.wait(until.visibilityOf(cross), 5000, "Pop-up isn't here");
browser.actions().click(cross).perform();
});
afterEach(function() {
browser.executeScript('window.sessionStorage.clear();');
browser.executeScript('window.localStorage.clear();');
});
it('should plant the juge', function() {
browser.driver.sleep(3000);
browser.executeScript("window.editor.setValue(\"int i=0;while(true){i++};\"); ");
//browser.actions().click(button).perform();
//browser.driver.sleep(100);
browser.wait(until.visibilityOf(button), 500, "Button unclickable");
button.click();
//browser.wait(until.visibilityOf(congratsW), 5000, "Congrats pop-up isn't here");
//browser.wait(until.textToBePresentInElement(congratsTitle,'Exercice réussi \\o/'), 5000, "Congrats pop-up isn't here");
//congratsCross.click();
browser.driver.sleep(3000);
//expect(congratsTitle.getText()).toEqual('Exercice réussi \\o/');
});
});