-
Notifications
You must be signed in to change notification settings - Fork 1
/
spec.js
33 lines (26 loc) · 1.12 KB
/
spec.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
// protractor (angular + selenium) docs: http://www.protractortest.org/#/api
// // protractor defines methods like browser.get, element.getText
// jasmine docs https://jasmine.github.io/api/3.0/matchers.html
// // jasmine defines methods like toEqual, expect, toContain
describe('Valkyrie Demo', function() {
beforeEach(function() {
browser.get('/');
});
it('should have a title', function() {
expect(browser.getTitle()).toEqual('Valkyrie Demo');
});
it('should start with a perp name displayed', function() {
const text = element(by.css('#first-step')).getText();
expect(text).toContain('PERP NAME');
});
it('starts with no RID rendered', function() {
const RIDElement = element(by.css('#first-step'));
expect(RIDElement.getText()).toContain('[[ RID ]]');
});
it('renders a RID after perp name input', function() {
element(by.css('.perp-name-form [type="text"]')).sendKeys('facebook.com/callistoorg');
element(by.css('.perp-name-form [type="submit"]')).click();
const RIDElement = element(by.css('#first-step'));
expect(RIDElement.getText()).not.toContain('[[ RID ]]');
});
});