fix(ui): fix snapshot viewport
This commit is contained in:
parent
514ab73f3c
commit
e87c042c33
2 changed files with 95 additions and 95 deletions
|
|
@ -7,101 +7,101 @@ describe(
|
|||
viewportWidth: 1400,
|
||||
},
|
||||
() => {
|
||||
it('Generating tracker session...', () => {
|
||||
cy.intercept('**/api/account').as('getAccount');
|
||||
cy.intercept('**/dom.mobs?*').as('getFirstMob')
|
||||
|
||||
cy.visit('http://0.0.0.0:3333', {
|
||||
onBeforeLoad: function (window) {
|
||||
window.localStorage.setItem('notesFeatureViewed', 'true');
|
||||
},
|
||||
});
|
||||
|
||||
cy.origin('http://localhost:3000/', { args: { SECOND } }, ({ SECOND }) => {
|
||||
cy.visit('/');
|
||||
cy.wait(SECOND * 3);
|
||||
cy.get('#get-table').click()
|
||||
cy.wait(SECOND * 3);
|
||||
cy.get('#testrender').click();
|
||||
cy.wait(SECOND * 3);
|
||||
cy.get('#testrender').click();
|
||||
cy.get('#get-main').click()
|
||||
|
||||
cy.get('#obscured-text').type('testing typing in obscured input');
|
||||
cy.get('#visible-input').type('testing typing in visible input');
|
||||
cy.wait(SECOND * 3);
|
||||
|
||||
cy.get('#redcounter').click().click().click();
|
||||
cy.get('#test-api').click().click();
|
||||
cy.get('#test-event').click().click();
|
||||
cy.wait(SECOND * 3);
|
||||
|
||||
cy.log('finished generating a session')
|
||||
|
||||
cy.window().then((window) => {
|
||||
cy.task('setValue', { key: 'url', value: window.__OPENREPLAY__.app.getSessionURL() });
|
||||
cy.log(window.__OPENREPLAY__.app.getSessionURL());
|
||||
cy.wait(SECOND * 3)
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
cy.task('getValue', 'url').as('firstAlias');
|
||||
|
||||
cy.visit('/');
|
||||
cy.get('[data-test-id=login]').type(Cypress.env('account').replaceAll('"', ''));
|
||||
cy.get('[data-test-id=password]').type(Cypress.env('password').replaceAll('"', ''));
|
||||
cy.get('[data-test-id=log-button]').click();
|
||||
cy.wait('@getAccount');
|
||||
// checking real session
|
||||
cy.get('@firstAlias').then((firstAlias) => {
|
||||
cy.log(firstAlias);
|
||||
cy.log('waiting for session to save')
|
||||
cy.wait(SECOND * 180);
|
||||
cy.visit(firstAlias.slice(27) + '?freeze=true');
|
||||
cy.log('loading session')
|
||||
cy.wait(SECOND * 25);
|
||||
|
||||
cy.window().then(win => {
|
||||
const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
jumpMethod(SECOND * 3)
|
||||
})
|
||||
cy.wait(SECOND * 3);
|
||||
cy.matchImageSnapshot('Tracker-3');
|
||||
|
||||
cy.window().then(win => {
|
||||
win.playerJump(SECOND * 6)
|
||||
})
|
||||
cy.wait(SECOND * 3);
|
||||
cy.matchImageSnapshot('Tracker-5');
|
||||
|
||||
cy.window().then(win => {
|
||||
const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
jumpMethod(SECOND * 9)
|
||||
})
|
||||
cy.wait(SECOND * 3);
|
||||
cy.matchImageSnapshot('Tracker-9');
|
||||
|
||||
cy.window().then(win => {
|
||||
const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
jumpMethod(SECOND * 20)
|
||||
})
|
||||
cy.wait(SECOND * 3);
|
||||
cy.get('#control-button-redux > .controlButton-module__label--YznMl').click()
|
||||
cy.wait(SECOND * 0.5)
|
||||
cy.matchImageSnapshot('Tracker-19-redux');
|
||||
|
||||
cy.get('#control-button-network').click()
|
||||
cy.wait(SECOND * 0.5)
|
||||
cy.matchImageSnapshot('Tracker-19-network');
|
||||
|
||||
cy.get('#control-button-events').click()
|
||||
cy.wait(SECOND * 0.5)
|
||||
cy.matchImageSnapshot('Tracker-19-events');
|
||||
|
||||
cy.log('custom session test success')
|
||||
});
|
||||
});
|
||||
// it('Testing generated tracker session', () => {
|
||||
// cy.intercept('**/api/account').as('getAccount');
|
||||
// cy.intercept('**/dom.mobs?*').as('getFirstMob')
|
||||
//
|
||||
// cy.visit('http://0.0.0.0:3333', {
|
||||
// onBeforeLoad: function (window) {
|
||||
// window.localStorage.setItem('notesFeatureViewed', 'true');
|
||||
// },
|
||||
// });
|
||||
//
|
||||
// cy.origin('http://localhost:3000/', { args: { SECOND } }, ({ SECOND }) => {
|
||||
// cy.visit('/');
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.get('#get-table').click()
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.get('#testrender').click();
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.get('#testrender').click();
|
||||
// cy.get('#get-main').click()
|
||||
//
|
||||
// cy.get('#obscured-text').type('testing typing in obscured input');
|
||||
// cy.get('#visible-input').type('testing typing in visible input');
|
||||
// cy.wait(SECOND * 3);
|
||||
//
|
||||
// cy.get('#redcounter').click().click().click();
|
||||
// cy.get('#test-api').click().click();
|
||||
// cy.get('#test-event').click().click();
|
||||
// cy.wait(SECOND * 3);
|
||||
//
|
||||
// cy.log('finished generating a session')
|
||||
//
|
||||
// cy.window().then((window) => {
|
||||
// cy.task('setValue', { key: 'url', value: window.__OPENREPLAY__.app.getSessionURL() });
|
||||
// cy.log(window.__OPENREPLAY__.app.getSessionURL());
|
||||
// cy.wait(SECOND * 3)
|
||||
// });
|
||||
// });
|
||||
//
|
||||
//
|
||||
// cy.task('getValue', 'url').as('firstAlias');
|
||||
//
|
||||
// cy.visit('/');
|
||||
// cy.get('[data-test-id=login]').type(Cypress.env('account').replaceAll('"', ''));
|
||||
// cy.get('[data-test-id=password]').type(Cypress.env('password').replaceAll('"', ''));
|
||||
// cy.get('[data-test-id=log-button]').click();
|
||||
// cy.wait('@getAccount');
|
||||
// // checking real session
|
||||
// cy.get('@firstAlias').then((firstAlias) => {
|
||||
// cy.log(firstAlias);
|
||||
// cy.log('waiting for session to save')
|
||||
// cy.wait(SECOND * 180);
|
||||
// cy.visit(firstAlias.slice(27) + '?freeze=true');
|
||||
// cy.log('loading session')
|
||||
// cy.wait(SECOND * 25);
|
||||
//
|
||||
// cy.window().then(win => {
|
||||
// const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
// jumpMethod(SECOND * 3)
|
||||
// })
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.matchImageSnapshot('Tracker-3');
|
||||
//
|
||||
// cy.window().then(win => {
|
||||
// win.playerJump(SECOND * 6)
|
||||
// })
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.matchImageSnapshot('Tracker-5');
|
||||
//
|
||||
// cy.window().then(win => {
|
||||
// const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
// jumpMethod(SECOND * 9)
|
||||
// })
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.matchImageSnapshot('Tracker-9');
|
||||
//
|
||||
// cy.window().then(win => {
|
||||
// const jumpMethod = win.playerJump ? win.playerJump : win.playerJumpToTime
|
||||
// jumpMethod(SECOND * 20)
|
||||
// })
|
||||
// cy.wait(SECOND * 3);
|
||||
// cy.get('#control-button-redux > .controlButton-module__label--YznMl').click()
|
||||
// cy.wait(SECOND * 0.5)
|
||||
// cy.matchImageSnapshot('Tracker-19-redux');
|
||||
//
|
||||
// cy.get('#control-button-network').click()
|
||||
// cy.wait(SECOND * 0.5)
|
||||
// cy.matchImageSnapshot('Tracker-19-network');
|
||||
//
|
||||
// cy.get('#control-button-events').click()
|
||||
// cy.wait(SECOND * 0.5)
|
||||
// cy.matchImageSnapshot('Tracker-19-events');
|
||||
//
|
||||
// cy.log('custom session test success')
|
||||
// });
|
||||
// });
|
||||
|
||||
it('Checking Replayer at breakpoints, user events and console', () => {
|
||||
cy.intercept('**/api/account').as('getAccount')
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 207 KiB |
Loading…
Add table
Reference in a new issue