Skip to content

Instantly share code, notes, and snippets.

pool:
name: Azure Pipelines
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
@samlucax
samlucax / index.md
Last active February 9, 2024 06:09
Configurando o Mochawesome com o Cypress 10
@samlucax
samlucax / geraDados.js
Last active December 1, 2023 16:14 — forked from willnss/gist:3246637
Gerador de Dados para Postman env
//adicionar eval(environment.geraDados) no início do pré-request
function gera_random(n) {
var ranNum = Math.round(Math.random() * n);
return ranNum;
}
function mod(dividendo, divisor) {
return Math.round(dividendo - (Math.floor(dividendo / divisor) * divisor));
}
@samlucax
samlucax / settings.json
Last active December 14, 2022 04:35
VSCode Settings
{
// Editor
"editor.parameterHints.enabled": false,
"editor.renderLineHighlight": "gutter",
"editor.tabSize": 2,
"editor.fontSize": 16,
"editor.lineHeight": 26,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.suggestSelection": "first",
@samlucax
samlucax / utils.js
Created March 17, 2021 05:45
Semana Agilizei 3.0 - Arquivo de funções úteis
export const format = (value) => {
let formattedValue
formattedValue = value.replace(',', '.')
formattedValue = Number(formattedValue.split('$')[1].trim())
formattedValue = String(value).includes('-') ? -formattedValue : formattedValue
return formattedValue
}
@samlucax
samlucax / javascript.json
Last active March 10, 2022 20:02
Meus Snippets do Visual Studio Code
{
"References Cypress": {
"prefix": "cyref",
"body": [
"/// <reference types=\"cypress\" />"
],
"description": "Adiciona autocomplete comandos Cypress"
}
}
@samlucax
samlucax / node.js.yml
Created March 18, 2021 06:38
Semana Agilizei 3.0 - Workflow desenvolvido para executar os testes
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
@samlucax
samlucax / n1_rotas_com_mock.md
Last active July 15, 2021 17:23
N1 - Rotas com Mocks

Se você está usando o server & route

// rotas com mocks. 
// Necessário por enquanto, dado que a aplicação demoautomation está instável

cy.server()
cy.route({
  method: 'POST',
  url: '**/api/1/databases/userdetails/collections/newtable?**',
@samlucax
samlucax / cypress-schema.json
Created September 10, 2020 00:55
Cypress Schema
"$schema": "https://raw.githubusercontent.com/cypress-io/cypress/develop/cli/schema/cypress.schema.json"
@samlucax
samlucax / main.yml
Last active June 27, 2021 18:27
Agilizei - Github Workflow criado na aula de Integração Contínua
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main ]
pull_request: