Visibility actions in gallery

This commit is contained in:
skvortsov-den
2023-07-17 17:11:14 +03:00
parent 5c53f3a93d
commit efdb351cf5
6 changed files with 42 additions and 5 deletions
@@ -26,9 +26,6 @@ describe('regression', () => {
offset: 300
});
await this.browser.assertView('right_swipe', '#root');
const logs = await this.browser.execute(() => window.divkitLogs);
logs.length.should.equal(2);
});
});
});
});
@@ -0,0 +1,37 @@
describe('regression', () => {
describe('Visibility_actions in gallery', () => {
beforeEach(async function() {
await this.browser.execute(() => {
window.divkitLogs = [];
});
await this.browser.yaOpenRegressionJson('gallery/gallery_swipe');
});
hermione.only.in('chromeMobile', 'pointerType="touch" is not supported on firefox');
it('Horizontal swipe visibility action', async function() {
// Wait for visibility action logging
await this.browser.pause(1000);
await this.browser.yaSwipe({
selector: 'div[role=tabpanel]',
direction: 'left',
duration: 500,
offset: 300
});
await this.browser.assertView('swipe_left__action', '#root');
await this.browser.yaSwipe({
selector: 'div[role=tabpanel]',
direction: 'right',
duration: 500,
offset: 300
});
await this.browser.assertView('swipe_right__action', '#root');
let logs = await this.browser.execute(() => window.divkitLogs);
logs = logs.map(log => log.action.log_id);
logs[0].should.equal('item/01');
logs[1].should.equal('item/02');
logs[2].should.equal('item/01');
});
});
});
@@ -1,5 +1,5 @@
describe('regression', () => {
describe('Visibility_actions in pager', () => {
describe('Visibility actions in pager', () => {
beforeEach(async function() {
await this.browser.execute(() => {
window.divkitLogs = [];
@@ -863,6 +863,9 @@
},
{
"title": "Visibility actions in gallery",
"automated": [
"web"
],
"tags": [
"visibility_actions"
],