pactumjs / pactumjs.github.io Goto Github PK
View Code? Open in Web Editor NEWPactumJS Official Docs Site
Home Page: https://pactumjs.github.io
PactumJS Official Docs Site
Home Page: https://pactumjs.github.io
Describe the bug
The pages for setReporterAutoRun (https://pactumjs.github.io/api/settings/setReporterAutoRun.html), setRequestDefaultRetryCount (https://pactumjs.github.io/api/settings/setRequestDefaultRetryCount.html), setSnapshotDirectoryPath (https://pactumjs.github.io/api/settings/setSnapshotDirectoryPath.html) and setRequestDefaultRetryDelay (https://pactumjs.github.io/api/settings/setRequestDefaultRetryDelay.html) are empty
To Reproduce
Go to these pages. Tried to read them in Chrome and Firefox.
Expected behavior
Expect a page like the previous ones for example: setCaptureHandlerStrategy
Software (please complete the following information):
hi. I am not able to find reset headers info anywhere. Basically let's say in my test file, I am doing,
request.setDefaultHeaders({ 'X-API-KEY': 'api_key', });
and I want that after this file executes, this header gets reset. I tried with request.setDefaultHeaders({}) but that didn't help. I can see same header being populated in other test files.
Is your feature request related to a problem? Please describe.
Please, add dark mode my eyes just hurt while reading.
I have an api which has multiple properties defined as string which also allows empty and null values as this is an optional field. I am using expectJsonMatchStrict as an assertion to validate the response object properties and tried string(), oneOf but both does not work consistently and the validation fails. What is the best way to handle multiple assertion types for a single property?
I tried any() which works but that does not any value since it allows all the data type.
Below is the code template and the property validation fails.
_spec
.get('path')
.expectStatus(200)
.expectJsonMatchStrict({
'property1': string()
'property2': oneOf([string(), '', null])
})
Any help regarding this issue is appreciated.
For support google indexing.
Add FAQ's page under a new space
Banner should
One of the available plugin - https://www.npmjs.com/package/docsify-top-banner-plugin
That may be, but I'd also suggest updating the docs to show that regular expressions can be used this way. The docs only refer to lightcookie which also doesn't seem to document any possibility of using regular expressions. Adding an example that illustrates how it can be done would also be nice. Feel free to use my solution as an example :)
Originally posted by @ensnared in pactumjs/pactum#316 (reply in thread)
Create a new category under API, that will list all the default expectations on a response.
Each method should have an independent page with usage and examples.
https://github.com/pactumjs/pactum/blob/master/src/exports/response.js
Describe the bug
There is a setState option in the code that seems to be what Im looking for but theres no documentation on it and the link goes to 404. Is this a valid method?
Expected 1-2 arguments, but got 0.ts(2554)
Spec.d.ts(37, 12): An argument for 'name' was not provided.
⚠ Error(TS2554) |
Expected 1-2 arguments, but got 0.
(method) Spec.setState(name: string, data?: any): Spec
runs the specified state handler
@see — https://pactumjs.github.io/api/requests/setState.html
To Reproduce
await step1
.spec()
.post('/graphql')
.setState()
.withGraphQLQuery(userDataQuery)
.expectStatus(200)
.stores('picture', 'data.getUserData.picture')
.stores('firebaseId', 'data.getUserData.firebaseId')
.stores('email', 'data.getUserData.email')
.expectJsonMatchStrict({
data: {
getUserData: {
__typename: 'ProspectUser',
email: '$S{email}',
firebaseId: like('j75r95daxrHZ2Y8jEE2ATq6bhbZa'),
picture: '$S{picture}',
},
},
});
});
Expected behavior
I would expect some docs thats show me how to set the state but also how to get it too.
Software (please complete the following information):
N/A
Additional context
N/A
Create a new page that will list all the environment variables supported by pactum with their usage and example.
A single page is sufficient.
https://github.com/pactumjs/pactum/blob/master/src/config.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.