-
Notifications
You must be signed in to change notification settings - Fork 72
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
Showing
329 changed files
with
12,218 additions
and
1,350 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
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,54 @@ | ||
name: Cypress E2E Tests | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
push: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
Cypress-E2E: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Nox | ||
run: pip install nox>=2022 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Start test environment in the background | ||
run: nox -s "fides_env(test)" -- keep_alive | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd clients/cypress-e2e | ||
npm install | ||
- name: Cypress E2E tests | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
working-directory: clients/cypress-e2e | ||
install: false | ||
wait-on: "http://localhost:8080, http://localhost:3001" | ||
record: true | ||
env: | ||
# pass the Cypress Cloud record key as an environment variable | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
# pass GitHub token to allow accurately detecting a build vs a re-run build | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Teardown | ||
run: nox -s teardown |
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
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
64 changes: 64 additions & 0 deletions
64
clients/admin-ui/__tests__/features/connector-form-helpers.test.tsx
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,64 @@ | ||
import { fillInDefaults } from "~/features/datastore-connections/add-connection/forms/helpers"; | ||
|
||
describe("connector form helpers", () => { | ||
describe("fill in defaults", () => { | ||
const baseDefaultValues = { | ||
description: "", | ||
name: "", | ||
instance_key: "", | ||
}; | ||
|
||
const baseSchema = { | ||
title: "name", | ||
type: "string", | ||
}; | ||
|
||
const baseResponse = { | ||
additionalProperties: false, | ||
description: "Schema to...", | ||
properties: {}, | ||
required: ["name"], | ||
title: "BaseSchema", | ||
type: "object", | ||
}; | ||
|
||
it("can fill in string defaults", () => { | ||
const properties = { | ||
name: baseSchema, | ||
description: { | ||
...baseSchema, | ||
title: "description", | ||
default: "default", | ||
}, | ||
instance_key: { ...baseSchema, title: "instance_key" }, | ||
}; | ||
const schema = { ...baseResponse, properties }; | ||
expect(fillInDefaults(baseDefaultValues, schema)).toEqual({ | ||
description: "default", | ||
name: "", | ||
instance_key: "", | ||
}); | ||
}); | ||
|
||
it("can fill in int defaults", () => { | ||
const properties = { | ||
name: baseSchema, | ||
description: { | ||
...baseSchema, | ||
title: "description", | ||
default: "default", | ||
}, | ||
instance_key: { ...baseSchema, title: "instance_key" }, | ||
port: { title: "port", default: "8080", type: "integer" }, | ||
}; | ||
const defaultValues = { ...baseDefaultValues, port: "" }; | ||
const schema = { ...baseResponse, properties }; | ||
expect(fillInDefaults(defaultValues, schema)).toEqual({ | ||
description: "default", | ||
name: "", | ||
instance_key: "", | ||
port: 8080, | ||
}); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.