Initial commit

This commit is contained in:
2026-01-22 21:26:43 -03:00
commit 85726333b1
8 changed files with 2131 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/node_modules

9
cypress.config.js Normal file
View File

@@ -0,0 +1,9 @@
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});

View File

@@ -0,0 +1,11 @@
describe('from store.steampowered.com/widget/2977820', () => {
beforeEach(() => {
cy.viewport(600, 190)
cy.visit('https://store.steampowered.com/widget/2977820/')
})
it('takes screenshot', () => {
const fileName = String(Date.now());
cy.screenshot(fileName)
})
})

View File

@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })

17
cypress/support/e2e.js Normal file
View File

@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'

2029
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

16
package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "shooter",
"version": "1.0.0",
"description": "Take a screenshoot",
"license": "ISC",
"author": "Gabriel De Los Rios",
"type": "commonjs",
"main": "index.js",
"scripts": {
"shooter": "npx cypress run --spec \"cypress/e2e/shooter/shooter.cy.js\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"cypress": "^15.9.0"
}
}

23
readme.md Normal file
View File

@@ -0,0 +1,23 @@
# 📸 Shooter
A streamlined utility for capturing automated screenshots using the power of Cypress.
## 🚀 Features
- **Automated Captures**: Quickly snap screenshots of your web applications.
- **Simple Workflow**: Integrated directly into your npm scripts.
- **Organized Storage**: Automatically categorizes screenshots for easy access. (Lol, it made up this feature)
## 🛠 Usage
To trigger the screenshot process, run the following command in your terminal:
```bash
npm run shoot
```
Till here this readme was AI generated
## Docs
- https://docs.cypress.io/app/get-started/install-cypress#System-requirements
- https://docs.cypress.io/api/cypress-api/screenshot-api#__docusaurus_skipToContent_fallback
Clone, install, inside the folder npm run shoot and you should be good to go