This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #742 from open-craft/arjun/bb-3864-dns-ui
BB-3864: Add DomainSettings page
- Loading branch information
Showing
40 changed files
with
1,941 additions
and
100 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
64 changes: 64 additions & 0 deletions
64
frontend/src/console/components/AddDomainModalButton/AddDomainModalButton.spec.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 React from 'react'; | ||
import { setupComponentForTesting } from "utils/testing"; | ||
import { AddDomainButton } from './AddDomainModalButton'; | ||
|
||
it('renders without crashing', () => { | ||
const tree = setupComponentForTesting( | ||
<AddDomainButton />, | ||
{ | ||
console: { | ||
loading: false, | ||
activeInstance: { | ||
data: { | ||
id: 1, | ||
instanceName: "test", | ||
subdomain: "test", | ||
draftThemeConfig: { | ||
version: 1, | ||
mainColor: "#444444", | ||
linkColor: "#FFAAFF" | ||
}, | ||
draftStaticContentOverrides: { | ||
homepageOverlayHtml: "Test overlay", | ||
} | ||
}, | ||
feedback: [], | ||
loading: ['draftThemeConfig'], | ||
deployment: null, | ||
}, | ||
} | ||
} | ||
).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it('renders null when externalDomain in data', () => { | ||
const tree = setupComponentForTesting( | ||
<AddDomainButton />, | ||
{ | ||
console: { | ||
loading: false, | ||
activeInstance: { | ||
data: { | ||
id: 1, | ||
instanceName: "test", | ||
externalDomain: 'example.com', | ||
subdomain: "test", | ||
draftThemeConfig: { | ||
version: 1, | ||
mainColor: "#444444", | ||
linkColor: "#FFAAFF" | ||
}, | ||
draftStaticContentOverrides: { | ||
homepageOverlayHtml: "Test overlay", | ||
} | ||
}, | ||
feedback: [], | ||
loading: ['draftThemeConfig'], | ||
deployment: null, | ||
}, | ||
} | ||
} | ||
).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}) |
Oops, something went wrong.