Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: sentry error #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"baseUrl": "http://localhost:3333",
"chromeWebSecurity": false
"chromeWebSecurity": false,
"projectId": "in3aa4"
}
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": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
22 changes: 22 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
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) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.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'

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@sentry/tracing": "^6.19.7",
"@sentry/vue": "^6.19.7",
"@vueuse/core": "^7.7.1",
"@vueuse/head": "^0.7.6",
"axios": "^0.27.2",
Expand Down
83 changes: 82 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/preview/buyer/buyer_about.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/preview/buyer/buyer_contact.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/preview/buyer/buyer_home.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed public/preview/buyer_about1.png
Binary file not shown.
Binary file removed public/preview/buyer_about2.png
Binary file not shown.
Binary file removed public/preview/buyer_cart.png
Binary file not shown.
Binary file removed public/preview/buyer_contact1.png
Binary file not shown.
Binary file removed public/preview/buyer_contact2.png
Binary file not shown.
Binary file removed public/preview/buyer_filter_grid.png
Diff not rendered.
Binary file removed public/preview/buyer_flash_sale.png
Diff not rendered.
Binary file removed public/preview/buyer_home1.png
Diff not rendered.
Binary file removed public/preview/buyer_home2.png
Diff not rendered.
Binary file removed public/preview/buyer_home3.png
Diff not rendered.
Binary file removed public/preview/buyer_home4.png
Diff not rendered.
Binary file removed public/preview/buyer_home5.png
Diff not rendered.
Binary file removed public/preview/buyer_home6.png
Diff not rendered.
Binary file removed public/preview/buyer_home7.png
Diff not rendered.
Binary file removed public/preview/buyer_home8.png
Diff not rendered.
Binary file removed public/preview/buyer_home9.png
Diff not rendered.
Binary file removed public/preview/buyer_home_arrival.png
Diff not rendered.
Binary file removed public/preview/buyer_product_details_dark.png
Diff not rendered.
Binary file removed public/preview/buyer_product_details_light.png
Diff not rendered.
File renamed without changes
File renamed without changes
Binary file removed public/preview/seller/seller_all_orders.png
Diff not rendered.
Binary file removed public/preview/seller/seller_all_product.png
Diff not rendered.
Binary file removed public/preview/seller/seller_dashboard.jpeg
Diff not rendered.
Binary file modified public/preview/seller/seller_product_add_information.jpeg
Binary file added public/preview/seller/seller_profile.jpeg
Binary file modified public/preview/seller/seller_shop_preview.jpeg
Binary file added public/preview/testing/cypress_testing.png
Binary file added public/preview/testing/vitest_basic.png
Binary file added public/preview/testing/vitest_component.png
Binary file added public/preview/testing/vitest_result.png
15 changes: 15 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import './styles/variables.css'
import 'virtual:windi-utilities.css'
// windicss devtools support (dev only)
import 'virtual:windi-devtools'
// sentry testing
import * as Sentry from '@sentry/vue'
import { BrowserTracing } from '@sentry/tracing'
import App from './App.vue'

const routes = setupLayouts(generatedRoutes)
Expand All @@ -26,3 +29,15 @@ export const createApp = ViteSSG(
Object.values(import.meta.globEager('./modules/*.ts')).map(i => i.install?.(ctx))
},
)

Sentry.init({
createApp,
dsn: 'https://a0a547331e2f429caf923895765c1e9b@o1129418.ingest.sentry.io/6406141',
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(routes),
tracingOrigins: ['localhost', 'e-shopee.vercel.app', /^\//],
}),
],
tracesSampleRate: 1.0,
})
2 changes: 0 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ export default defineConfig({
headEnabled: true,
markdownItSetup(md) {
// https://prismjs.com/
// @ts-expect-error types mismatch
md.use(Prism)
// @ts-expect-error types mismatch
md.use(LinkAttributes, {
pattern: /^https?:\/\//,
attrs: {
Expand Down