-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
complete refactor of the examples core code, not completed only README
- Loading branch information
1 parent
83f5133
commit 8f1ae1a
Showing
22 changed files
with
156 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# form-inputs | ||
|
||
TODO |
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
2 changes: 1 addition & 1 deletion
2
cypress/integration/tesla-form.ts → ...nputs/cypress/integration/tesla-inputs.ts
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,12 @@ | ||
{ | ||
"name": "form-inputs", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "cypress open", | ||
"test": "cypress run" | ||
}, | ||
"dependencies": { | ||
"cypress": "^8.3.1" | ||
} | ||
} |
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,3 @@ | ||
# http-response-status | ||
|
||
TODO |
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,16 @@ | ||
{ | ||
"fixturesFolder": false, | ||
"supportFile": false, | ||
"pluginsFile": false, | ||
"reporter": "junit", | ||
"reporterOptions": { | ||
"mochaFile": "../../report/[hash].xml", | ||
"toConsole": true | ||
}, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 0 | ||
}, | ||
"screenshotOnRunFailure ": false, | ||
"experimentalStudio": true | ||
} |
File renamed without changes.
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,12 @@ | ||
{ | ||
"name": "http-response-status", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "cypress open", | ||
"test": "cypress run" | ||
}, | ||
"dependencies": { | ||
"cypress": "^8.3.1" | ||
} | ||
} |
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,47 @@ | ||
# Sitemap | ||
|
||
## Getting the array of all the Urls from the sitemap.xml | ||
```javascript | ||
let urls = []; | ||
before(() => { | ||
cy.request({ | ||
url: "https://www.vercel.com/sitemap.xml", | ||
headers: { | ||
"Content-Type": "text/xml; charset=utf-8", | ||
"user-agent": | ||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", | ||
}, | ||
}) | ||
.as("sitemap") | ||
.then((response) => { | ||
urls = Cypress.$(response.body) | ||
.find("loc") | ||
.toArray() | ||
.map((el) => el.innerText); | ||
}); | ||
}); | ||
``` | ||
|
||
## Full Check | ||
|
||
For a complete check we then need to check if the Urls are valid. | ||
|
||
```javascript | ||
it("should succesfully load each url in the sitemap", () => { | ||
urls.forEach((url) => { | ||
cy.visit(url); | ||
}); | ||
}); | ||
``` | ||
|
||
## Fast Check | ||
|
||
Checking a sitemap for missing pages can take a long time with cypress using cy.visit. | ||
This is due to the fact that "cy.visit" will wait for the page javascript to have fully loaded. | ||
If we want to check the rendered pages faster we just check for the response from the server when we ask for the page. | ||
If the server sends us back a 200 response we continue to the next page! | ||
|
||
## Integration Files | ||
|
||
- [Fast Sitemap Check](cypress/integration/sitemap-fast.ts): check the sitemap fast, checks only 200 response to page urls | ||
- [Slow Sitemap Check](cypress/integration/sitemap-slow.ts): check the complete page fully loaded |
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,15 @@ | ||
{ | ||
"fixturesFolder": false, | ||
"supportFile": false, | ||
"reporter": "junit", | ||
"reporterOptions": { | ||
"mochaFile": "../../report/[hash].xml", | ||
"toConsole": true | ||
}, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 0 | ||
}, | ||
"screenshotOnRunFailure ": false, | ||
"experimentalStudio": true | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,13 @@ | ||
{ | ||
"name": "structured-data", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "cypress open", | ||
"test": "cypress run" | ||
}, | ||
"dependencies": { | ||
"cypress": "^8.3.1", | ||
"structured-data-testing-tool": "^4.5.0" | ||
} | ||
} |
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,3 @@ | ||
# Tesla | ||
|
||
TODO |
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,16 @@ | ||
{ | ||
"fixturesFolder": false, | ||
"supportFile": false, | ||
"pluginsFile": false, | ||
"reporter": "junit", | ||
"reporterOptions": { | ||
"mochaFile": "../../report/[hash].xml", | ||
"toConsole": true | ||
}, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 0 | ||
}, | ||
"screenshotOnRunFailure ": false, | ||
"experimentalStudio": true | ||
} |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
cypress/integration/tesla-trip-charging.ts → .../tesla/cypress/integration/tesla-trips.ts
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,12 @@ | ||
{ | ||
"name": "tesla", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "cypress open", | ||
"test": "cypress run" | ||
}, | ||
"dependencies": { | ||
"cypress": "^8.3.1" | ||
} | ||
} |
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,6 +1,3 @@ | ||
# Url Query Parameters | ||
|
||
Testing Url Query Parameters makes it possible to test the variables added in the browser URL! | ||
This is very common in web development and with search engines result page URLs. | ||
# Structured Data | ||
|
||
TODO |
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