mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-16 05:30:39 +00:00
minor: hide username field on signup screen (#17144)
* minor: hide username field on signup screen * add tests * fix cypress for owner search * fix data quality and profiler spec
This commit is contained in:
parent
77529d4fa0
commit
21579b13d3
@ -227,7 +227,7 @@ const fillForm = (formObj, type) => {
|
||||
cy.get('[data-testid="add-experts"]').scrollIntoView().click();
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
cy.get('[data-testid="loader"]').should('not.exist');
|
||||
|
||||
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/search/query?q=*${encodeURI(formObj.experts)}*`,
|
||||
|
@ -88,6 +88,7 @@ export const addOwner = (
|
||||
.click({ waitForAnimations: false });
|
||||
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
cy.get('[data-testid="loader"]').should('not.exist');
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/search/query?q=*&index=user_search_index*`,
|
||||
@ -113,12 +114,11 @@ export const addOwner = (
|
||||
};
|
||||
|
||||
export const updateOwner = (ownerName: string, dataTestId?: string) => {
|
||||
interceptURL('GET', '/api/v1/users?*isBot=false*', 'getUsers');
|
||||
cy.get('[data-testid="edit-owner"]').click();
|
||||
cy.get("[data-testid='select-owner-tabs']").should('be.visible');
|
||||
cy.get('.ant-tabs [id*=tab-users]').click();
|
||||
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
|
||||
cy.get('[data-testid="loader"]').should('not.exist');
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/search/query?q=*${encodeURI(ownerName)}*&index=user_search_index`,
|
||||
|
@ -183,6 +183,7 @@ describe('Query Entity', { tags: 'DataAssets' }, () => {
|
||||
// Update owner
|
||||
cy.get(':nth-child(2) > [data-testid="edit-owner"]').click();
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
cy.get('[data-testid="loader"]').should('not.exist');
|
||||
interceptURL(
|
||||
'GET',
|
||||
`api/v1/search/query?q=*${encodeURI(DATA.owner)}*`,
|
||||
|
@ -204,4 +204,13 @@ describe('SignUp page', () => {
|
||||
|
||||
expect(createUser as jest.Mock).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it('should have username as hidden field', async () => {
|
||||
render(<SignUp />);
|
||||
|
||||
const usernameInput = screen.getByTestId('username-label');
|
||||
usernameInput.parentElement?.parentElement;
|
||||
|
||||
expect(usernameInput.parentElement).toHaveClass('ant-form-item-hidden');
|
||||
});
|
||||
});
|
||||
|
@ -163,6 +163,7 @@ const SignUp = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
hidden
|
||||
data-testid="username-label"
|
||||
label={t('label.username')}
|
||||
name="name"
|
||||
|
Loading…
x
Reference in New Issue
Block a user