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:
Chirag Madlani 2024-07-25 21:46:40 +05:30 committed by GitHub
parent 77529d4fa0
commit 21579b13d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 4 deletions

View File

@ -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)}*`,

View File

@ -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`,

View File

@ -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)}*`,

View File

@ -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');
});
});

View File

@ -163,6 +163,7 @@ const SignUp = () => {
</Form.Item>
<Form.Item
hidden
data-testid="username-label"
label={t('label.username')}
name="name"