Giter VIP home page Giter VIP logo

pactumjs.github.io's People

Contributors

akhilc7 avatar ankitnandwani avatar asaianudeep avatar baabouj avatar codewithmmak avatar cortopy avatar depapp avatar helloitsdavid avatar iamqarv avatar leelaprasadv avatar raj356 avatar rajaneeshkumar avatar razvanvancea avatar selcuktemizsoy avatar skremiec avatar swaroop9 avatar toniis avatar wine-fall avatar zatoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pactumjs.github.io's Issues

Empty API pages

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):

  • OS: Windows 11
  • NodeJS Version: 18.11.0
  • Test Runner: jest

reset headers info is missing

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.

Dark Mode

Is your feature request related to a problem? Please describe.
Please, add dark mode my eyes just hurt while reading.

Add Examples Section

Cypress is one of the best documented testing tools out there. Similar to it, our docs should also include an examples section to include best practices, how to test common scenarios, showcases, blogs, videos and more.

Marchers for JSON property which supports multiple data types specifically string, empty and null.

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.

Fix broken links for api-testing

Some of the links related to "api-testing" are broken, this might be because of some reorganizing of docs content.

Most of them seems to be focused around api-testing related.
Fix any other broken links as well.

image
image

setState not in the docs but available

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.

Screenshots
image

Software (please complete the following information):
N/A

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.