Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11681-changed-1739908630049.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Make "Public" checkbox default-checked in OAuth App creation form ([#11681](https://github.com/linode/manager/pull/11681))
4 changes: 2 additions & 2 deletions packages/manager/cypress/e2e/core/account/oauth-apps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ const createOAuthApp = (oauthApp: OAuthClient) => {
cy.findByLabelText('Callback URL').click();
cy.focused().clear();
cy.focused().type(oauthApp.redirect_uri);
// Check the 'public' checkbox
if (oauthApp.public) {
// Uncheck the 'public' checkbox
if (!oauthApp.public) {
cy.get('[data-qa-checked]').should('be.visible').click();
}
mockCreateOAuthApp(oauthApp).as('createOauthApp');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ describe('Create API Token Drawer', () => {
getByText('Create');
getByText('Cancel');
});
it('Should have the Public checkbox as checked by default', () => {
const { getByRole } = renderWithTheme(
<CreateOAuthClientDrawer {...props} />
);

const checkbox = getByRole('checkbox', { name: 'Public' });
expect(checkbox).toBeChecked();
});
it('Should show client side validation errors', async () => {
const { getByText } = renderWithTheme(
<CreateOAuthClientDrawer {...props} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const CreateOAuthClientDrawer = ({
const formik = useFormik<OAuthClientRequest>({
initialValues: {
label: '',
public: false,
public: true,
redirect_uri: '',
},
async onSubmit(values) {
Expand Down