Skip to content

Instantly share code, notes, and snippets.

View estefafdez's full-sized avatar

Estefanía Fdez estefafdez

View GitHub Profile
@estefafdez
estefafdez / package.json script
Created January 14, 2022 09:31
Script on package.json
"scripts": {
"run:jenkins": "cypress run --env configFile=jenkins"
},
@estefafdez
estefafdez / jenkins.json
Created January 14, 2022 09:30
Jenkins json
{
"env": {
"name": "jenkins",
"baseURL": "https://{JENKINS_BRANCH_NAME}.genial.ly"
}
}
@estefafdez
estefafdez / test example
Created January 14, 2022 09:29
Test example on Cypress.
describe('Login Tests', () => {
it('[C1] should go to the correct environment URL', () => {
cy.visit(Cypress.env().baseURL};
);
});
@estefafdez
estefafdez / script qa
Created January 14, 2022 09:28
Script to execute the tests on QA
npm run run:qa
@estefafdez
estefafdez / cypress-plugins-index.js
Created January 14, 2022 09:25
cypress/plugins/index.js with different configuration files.
// promisified fs module
const fs = require('fs-extra')
const path = require('path')
function getConfigurationByFile(file) {
const pathToConfigFile = path.resolve(__dirname, '../config', `${file}.json`)
return fs.readJson(pathToConfigFile)
}
@estefafdez
estefafdez / qa.json
Created January 14, 2022 09:22
qa.json file
{
"env": {
"name": "qa",
"baseURL": "https://qa.genial.ly"
}
}
@estefafdez
estefafdez / Dockerfile
Last active October 27, 2020 12:40
Dockerfile para instalar Microsoft Edge en Docker
# Cogemos la imagen de base con Cypress ya instalado.
FROM cypress/base:14.10.1
USER root
# Vemos la versión de Node que tenemos instalada.
RUN node --version
# Añadimos las librerias para descargar Edge
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
@estefafdez
estefafdez / package.json
Created October 27, 2020 12:16
package.json en cypress
"scripts": {
...
"test:edge": "cypress run --browser edge --headless"
...
}
[debug] [ADB] Running '/Users/estefania.fernandez/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n com.example.estefafdez.myfirstandroidapp/com.example.estefafdez.myfirstandroidapp.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'com.example.estefafdez.myfirstandroidapp' and activity: 'com.example.estefafdez.myfirstandroidapp.MainActivity' to be focused
[debug] [ADB] Possible activities, to be checked: 'com.example.estefafdez.myfirstandroidapp.MainActivity', 'com.example.estefafdez.myfirstandroidapp.com.example.estefafdez.myfirstandroidapp.MainActivity'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running '/Users/estefania.fernandez/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Found package: 'com.example.estefafdez.myfirstandroidapp' and fully qualified activity name : 'com.example.