Skip to content

Commit 4291b5b

Browse files
authored
Merge branch 'main' into adding-descope-testing-strat-guide
2 parents 4273c72 + bde2fa6 commit 4291b5b

File tree

345 files changed

+5666
-3186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+5666
-3186
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
run-tests-in-parallel:
6969
executor: cypress/default
70-
parallelism: 6
70+
parallelism: 2
7171
steps:
7272
- attach_workspace:
7373
at: ~/

cypress.config.ts

+34-29
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,41 @@ export default defineConfig({
1212
supportFile: false,
1313
baseUrl: "http://localhost:3000",
1414
setupNodeEvents(on, config) {
15-
on("task", {
16-
"createFileTree"({ path }) {
17-
// take the given path and create an array of all file paths
18-
// with each files and the directory path of the file as strings
19-
// for example: given 'accessibility' return
20-
// ['accessibility/get-started/introduction', 'accessibility/core-concepts/how-it-works']
21-
path = 'docs/' + path;
22-
23-
function walk(dir: string): string[] {
24-
return readdirSync(dir, { withFileTypes: true }).flatMap((file) => {
25-
if (file.name.includes('_category_.json') || file.name.includes('.DS_Store')) {
26-
return []
27-
}
28-
29-
if (file.name.includes('.mdx')) {
30-
// remove the .mdx file extension
31-
file.name = file.name.slice(0, -4)
32-
}
33-
34-
if (file.isDirectory()) {
35-
return walk(join(dir, file.name))
36-
} else {
37-
return [join(dir, file.name)]
38-
}
39-
})
15+
const path = 'docs';
16+
17+
function walk(dir: string): string[] {
18+
return readdirSync(dir, { withFileTypes: true }).flatMap((file) => {
19+
// ignore these irrelevant files with no content
20+
if (file.name.includes('_category_.json') || file.name.includes('.DS_Store')) {
21+
return []
22+
}
23+
24+
if (file.name.includes('lodash')) {
25+
// lodash file actually goes to _ URL
26+
file.name = file.name.replace('lodash', '_')
27+
}
28+
29+
if (file.name.includes('.mdx')) {
30+
// remove the .mdx file extension
31+
file.name = file.name.slice(0, -4)
4032
}
4133

42-
return walk(path).filter((file) => file !== undefined).map((file) => file.slice(5))
43-
}
44-
})
34+
if (file.isDirectory()) {
35+
if(file.name === 'partials') {
36+
return []
37+
}
38+
return walk(join(dir, file.name))
39+
} else {
40+
return [join(dir, file.name)]
41+
}
42+
})
4543
}
44+
45+
const URLs = walk(path).filter((file) => file !== undefined).map((file) => file.slice(5))
46+
47+
config.env.URLs = URLs
48+
49+
return config
4650
},
47-
});
51+
},
52+
})

cypress/e2e/a11y_pages.cy.ts

-16
This file was deleted.

cypress/e2e/all_pages.cy.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const URLs: Array<string> = Cypress.env('URLs')
2+
3+
// Mostly this is to get a UI Coverage and Accessibility report
4+
describe('Visit all pages', () => {
5+
URLs.forEach((URL) => {
6+
it(`Visit ${URL} `, () => {
7+
cy.visit(URL)
8+
cy.get('h1')
9+
.should('be.visible')
10+
.and('not.have.text', 'Page Not Found')
11+
12+
cy.get('[aria-label="Switch to dark mode"]').click()
13+
})
14+
})
15+
})

cypress/e2e/api_pages.cy.ts

-16
This file was deleted.

cypress/e2e/app_pages.cy.ts

-16
This file was deleted.

cypress/e2e/basic_tests.cy.ts

+15-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ describe('Basic tests', () => {
4949

5050
describe('Dark mode', () => {
5151
it('switch to dark mode when clicked', () => {
52-
cy.get('[data-theme=light]').should('have.css', 'background-color', 'rgb(255, 255, 255)') // white
52+
cy.get('[data-theme=light]')
53+
.should('have.css', 'background-color', 'rgb(255, 255, 255)') // white
5354
cy.get('[aria-label="Switch to dark mode"]').click()
54-
cy.get('[data-theme=dark]').should('have.css', 'background-color', 'rgb(27, 30, 46)') // dark gray
55+
cy.get('[data-theme=dark]')
56+
.should('have.css', 'background-color', 'rgb(27, 30, 46)') // dark gray
5557
})
5658
})
5759

@@ -61,4 +63,14 @@ describe('Basic tests', () => {
6163
cy.get('.DocSearch-Modal').should('be.visible')
6264
})
6365
})
64-
})
66+
67+
describe('404', () => {
68+
it('displays 404 page', () => {
69+
cy.visit('/foo/bar/baz')
70+
cy.get('h1')
71+
.should('be.visible')
72+
.and('have.text', 'Page Not Found')
73+
})
74+
})
75+
})
76+

cypress/e2e/cloud_pages.cy.ts

-16
This file was deleted.

cypress/e2e/ui_cov_pages.cy.ts

-16
This file was deleted.

docs/accessibility/changelog.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar_label: Changelog
55
sidebar_position: 200
66
---
77

8+
<ProductHeading product="accessibility" />
9+
810
# Changelog
911

1012
## Week of 11/11/2024
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Configuration",
3-
"position": 30
3+
"position": 40
44
}

docs/accessibility/configuration/axe-core-configuration.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: 'Configuration for Axe-Core® rules can be configured.'
44
sidebar_label: 'Axe Core® configuration'
55
---
66

7-
# Axe Core® configuration
7+
<ProductHeading product="accessibility" />
88

9-
<AccessibilityAddon />
9+
# Axe Core® configuration
1010

1111
Configuration for Axe-Core® rules is available through your Account Executive. We are happy to have a call with you to dial in your report config to make sure you are getting the most useful reports possible, and we find this onboarding very effective.
1212

0 commit comments

Comments
 (0)