Skip to content

Commit

Permalink
Merge pull request #80 from jackmcguire1/feat/cypress
Browse files Browse the repository at this point in the history
feat: bootstrap-vue-next with cypress
  • Loading branch information
jackmcguire1 authored Sep 2, 2024
2 parents 36b4c09 + 3899634 commit 5c97079
Show file tree
Hide file tree
Showing 19 changed files with 12,934 additions and 2,893 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ jobs:

- name: Vite Build
run: npm run build

- name: Cypress run
uses: cypress-io/github-action@v6
with:
component: true
browser: chrome
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8082",
"webRoot": "${workspaceFolder}"
}
]
}
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
video: false,

e2e: {
setupNodeEvents(on, config) {},
baseUrl: "http://localhost:8083",
},

component: {
devServer: {
framework: "vue",
bundler: "vite",
},
},
});
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -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) => { ... })
12 changes: 12 additions & 0 deletions cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
4 changes: 4 additions & 0 deletions cypress/support/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import "./commands";
import { mount } from "cypress/vue";

Cypress.Commands.add("mount", mount);
Empty file added cypress/support/e2e.js
Empty file.
Loading

0 comments on commit 5c97079

Please sign in to comment.