-
Notifications
You must be signed in to change notification settings - Fork 1
/
filmList.spec.js
30 lines (26 loc) · 1018 Bytes
/
filmList.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
describe('FilmList', () => {
beforeEach(function (done) {
simulator.reloadReactNativeApp(done);
});
describe('when app starts', () => {
it('should has item with testID ListView', () => {
expect(element(by.id('ListView'))).toExist();
});
it('should has item with testID FilmItem-0', () => {
expect(element(by.id('FilmItem-0'))).toExist();
});
it('should has item with testID FilmItem-3', () => {
expect(element(by.id('FilmItem-3'))).toExist();
});
it('should has no item with testID FilmItem-4', () => {
expect(element(by.id('FilmItem-4'))).toNotExist();
});
});
describe('when scroll 200 pt down', () => {
it('FilmItem-0 should not be visible', () => {
expect(element(by.id('FilmItem-0'))).toBeVisible();
element(by.id('ListView')).scroll(200, 'down');
expect(element(by.id('FilmItem-0'))).toBeNotVisible();
});
})
});