-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cafdd0
commit 515ae39
Showing
5 changed files
with
113 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<a class="ad-side-component" href="https://testbeats.com" target="_blank"> | ||
<img src="https://testbeats.nyc3.cdn.digitaloceanspaces.com/assets/hero.svg" alt=""> | ||
|
||
<p class="header">Empower Your Test Results with AI-Powered Insights -></p> | ||
<!-- <p class="tagline">✨ TestBeats ✨</p> --> | ||
<img class="logo" src="https://testbeats.com/static/icons/logo-wordmark-white.svg" alt=""> | ||
</a> | ||
</template> | ||
|
||
<style scoped> | ||
@keyframes gradient-animation { | ||
0% { | ||
background-position: 0% 50%; | ||
} | ||
50% { | ||
background-position: 100% 50%; | ||
} | ||
100% { | ||
background-position: 0% 50%; | ||
} | ||
} | ||
.ad-side-component { | ||
text-align: center; | ||
margin-top: 2rem; | ||
margin-bottom: 2rem; | ||
padding: 0.5rem 0.85rem; | ||
text-decoration: none; | ||
color: white; | ||
font-size: 1rem; | ||
border-radius: 4px; | ||
background: linear-gradient(45deg, #3538cd, #2c3183, #d3001a, #74000e); | ||
background-size: 300% 300%; | ||
animation: gradient-animation 6s ease-in-out infinite; | ||
} | ||
.ad-side-component .header { | ||
font-weight: 700; | ||
margin-top: 1rem; | ||
} | ||
.ad-side-component .tagline { | ||
font-weight: 500; | ||
font-size: 0.8rem; | ||
margin-top: 1rem; | ||
letter-spacing: 3px; | ||
} | ||
.ad-side-component .logo { | ||
width: 100%; | ||
padding-left: 36px; | ||
padding-right: 36px; | ||
margin-top: 2rem; | ||
margin-bottom: 1rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import Theme from 'vitepress/theme' | ||
import { h } from 'vue' | ||
import '../style/vars.css' | ||
import Theme from 'vitepress/theme' | ||
import AdAsideComponent from './AdAsideComponent.vue' | ||
import AdComponent from './AdComponent.vue' | ||
|
||
export default { | ||
...Theme, | ||
Layout() { | ||
return h(Theme.Layout, null, { | ||
'doc-before': () => h(AdComponent), | ||
'aside-outline-after': () => h(AdAsideComponent) | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# events | ||
|
||
The events module provides the `on` methods to listen to events from `pactum`. | ||
|
||
Supported Events | ||
|
||
- BEFORE_REQUEST | ||
- AFTER_RESPONSE | ||
|
||
## Syntax | ||
|
||
```js | ||
pactumEvents.on(event-type, callback); | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
### ✅ Correct Usage | ||
|
||
```js | ||
pactumEvents.on(EVENT_TYPES.BEFORE_REQUEST, (ctx) => { | ||
console.log(ctx); | ||
}); | ||
``` | ||
|
||
## Arguments | ||
|
||
#### > event-type (string) | ||
|
||
Event type to listen to. | ||
|
||
#### > callback (function) | ||
|
||
Callback function to call when the event is triggered. | ||
|
||
## Examples | ||
|
||
### Listening to events | ||
|
||
```js | ||
const { pactumEvents, EVENT_TYPES } = require('pactum').events; | ||
|
||
pactumEvents.on(EVENT_TYPES.BEFORE_REQUEST, (cxt) => { | ||
console.log(cxt); | ||
}); | ||
pactumEvents.on(EVENT_TYPES.AFTER_RESPONSE, (cxt) => { | ||
console.log(cxt.response.body); | ||
}); | ||
``` |