Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility: make pressing the enter key, validate the admin key modal #280 #331

Merged
merged 2 commits into from Oct 10, 2022

Conversation

nooras
Copy link
Contributor

@nooras nooras commented Oct 3, 2022

Pull Request

Related issue

Fixes #280

What does this PR do?

  • This PR have solved the issue of key enter on API KEY modal

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Screenshot:

On key enter, field will be validate
image

Thank you so much for contributing to Meilisearch!

@bidoubiwa bidoubiwa self-requested a review October 5, 2022 10:43
@bidoubiwa bidoubiwa added the enhancement New feature or request label Oct 5, 2022
@bidoubiwa
Copy link
Contributor

bidoubiwa commented Oct 5, 2022

Hey @nooras thanks a lot for this contribution!

Could you add a test in cypress/e2e/test-api-key-required.cy.js ?

Line 20 you rename the test from Should fail on wrong API key to Should fail on wrong API key triggered with mouse click

Then underneath it you create a new test called Should fail on wrong API key triggered with enter key

 it('Should fail on wrong API key triggered with enter key', () => {
    cy.get('div[aria-label=ask-for-api-key]').within(() => {
      cy.get('input[name="apiKey"]')
        .type(WRONG_APIKEY)
        .should('have.value', WRONG_APIKEY)
      cy.get('input[name="apiKey"]').type('{enter}')
      cy.wait(WAITING_TIME)
      cy.contains('The provided API key is invalid.')
    })
  })

@nooras
Copy link
Contributor Author

nooras commented Oct 5, 2022

Hi @bidoubiwa I added test. Kindly check and let me know if any changes are required. Thanks

@bidoubiwa
Copy link
Contributor

bidoubiwa commented Oct 5, 2022

Hey @nooras! This seems good to me :) Before merging it, I need the approval of @mdubus that will come back next week.
Meanwhile I put the hacktoberfest-accepted tag which should count as a contribution for digital ocean.

Thanks again for contributing with Meilisearch ❤️
If you are participating in Hacktoberfest, and you would like to receive a small gift from Meilisearch too, don't forget to fill this form.

Copy link
Member

@mdubus mdubus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @nooras ! 👋

Thanks a lot for your work here, this definitively helps a lot 🤩

A thank a lot @bidoubiwa for the review and the test suggestion while I wasn't available!

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 10, 2022

Build succeeded:

@bors bors bot merged commit a924079 into meilisearch:main Oct 10, 2022
@meili-bot
Copy link
Contributor

This message is sent automatically

Thank you for contributing to Meilisearch. If you are participating in Hacktoberfest, and you would like to receive some gift from Meilisearch too, please complete this form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility: make pressing the "enter" key, validate the admin key modal
4 participants