This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userEmail = 'email.abcdefg@mailosaur.io' | |
describe('Reset password flow', () => { | |
it('Should receive an email and use reset password link', () => { | |
// trigger reset password for user | |
// this command is equal to clicking „I forgot my password“ link and entering user email | |
cy | |
.userPasswordReset(userEmail) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
module.exports.GoogleSocialLogin = async function GoogleSocialLogin(options = {}) { | |
try { | |
validateOptions(options); | |
const browser = await puppeteer.launch({ headless: !!options.headless, args: ['--no-sandbox', '--disable-setuid-sandbox'] }); | |
const page = await browser.newPage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { GoogleSocialLogin } = require('./googleLogin'); | |
module.exports = (on, config) => { | |
on('task', { | |
'GoogleSocialLogin': GoogleSocialLogin, | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Logging to Google SSO protected event', () => { | |
it('Receive token and successfully open app', () => { | |
const socialLoginOptions = { | |
username: // google name here | |
password: // google password here | |
loginUrl: // your login page (in your app), where you would click on a „login with google“ button, this is url which puppeteer will open | |
resolveUrl: // the page where you land after you come back from google | |
headless: // set to tru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach( function() { | |
window.logCalls = 1; | |
}); | |
Cypress.Commands.overwrite('log', (originalFn, message) => { | |
Cypress.log({ | |
displayName: `--- ${window.logCalls}. ${message} ---`, | |
name: `--- ${window.logCalls}. ${message} ---`, | |
message: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach( function() { | |
window.logCalls = 1; | |
window.testFlow = []; | |
}); | |
Cypress.Commands.overwrite('log', (originalFn, message) => { | |
Cypress.log({ | |
displayName: `--- ${window.logCalls}. ${message} ---`, | |
name: `--- ${window.logCalls}. ${message} ---`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new Vue({ | |
// ... | |
}).$mount('#trello-app'); | |
window.app = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('viewport test', () => { | |
cy.visit('/') | |
cy.viewport(320, 480) | |
cy.viewport('iphone-5') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('touch device', () => { | |
cy.visit('/', { | |
onBeforeLoad: (win) => { | |
win.ontouchstart = true | |
} | |
}) | |
}) |
OlderNewer