Skip to content

Commit

Permalink
Merge pull request #575 from meilisearch/chore/pin-yarn-version
Browse files Browse the repository at this point in the history
Pin yarn version
  • Loading branch information
Strift authored Jan 22, 2025
2 parents 888566b + 49f8839 commit ca465f5
Show file tree
Hide file tree
Showing 8 changed files with 17,817 additions and 13,318 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Enable Corepack
run: corepack enable
- name: Install dev dependencies
run: yarn --dev
run: yarn --frozen-lockfile
- name: Run style check
run: yarn lint && yarn prettier-check
cypress_no_meilisearch:
Expand All @@ -35,8 +39,10 @@ jobs:
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn
run: yarn --frozen-lockfile
- name: Test no meilisearch running
uses: cypress-io/github-action@v6
with:
Expand Down Expand Up @@ -74,8 +80,10 @@ jobs:
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn
run: yarn --frozen-lockfile
- name: Test
uses: cypress-io/github-action@v6
env:
Expand Down Expand Up @@ -117,8 +125,10 @@ jobs:
node-version: 18
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn
run: yarn --frozen-lockfile
- name: Test
uses: cypress-io/github-action@v6
env:
Expand All @@ -138,4 +148,3 @@ jobs:
with:
name: cypress-videos
path: cypress/videos

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
/node_modules
/.pnp
.pnp.js
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# testing
/coverage
Expand Down
934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.6.0.cjs
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@

<br/>

## Setup
This repository uses [Yarn 4.x](https://yarnpkg.com/) to manage dependencies and [NVM](https://github.com/nvm-sh/nvm) to manage Node version. See [current version](.nvmrc).

> This repository uses [NVM](https://github.com/nvm-sh/nvm) to manage Node version. See [current version](.nvmrc).
## Setup

```bash
yarn
Expand Down
38 changes: 21 additions & 17 deletions cypress/e2e/test-api-key-required.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe(`Test API key required`, () => {

it('Should fail on wrong API key triggered with mouse click', () => {
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"]').as('apiKeyInput')
cy.get('@apiKeyInput').type(WRONG_APIKEY)
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
cy.get('button').contains('Go').click()
cy.wait(WAITING_TIME)
cy.contains('The provided API key is invalid.')
Expand All @@ -33,21 +33,21 @@ describe(`Test API key required`, () => {

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.get('input[name="apiKey"]').as('apiKeyInput')
cy.get('@apiKeyInput').type(WRONG_APIKEY)
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
cy.get('@apiKeyInput').type('{enter}')
cy.wait(WAITING_TIME)
cy.contains('The provided API key is invalid.')
})
})

it('Should accept valid API key', () => {
cy.get('div[aria-label=ask-for-api-key]').within(() => {
cy.get('input[name="apiKey"]')
.clear()
.type(API_KEY)
.should('have.value', API_KEY)
cy.get('input[name="apiKey"]').as('apiKeyInput')
cy.get('@apiKeyInput').clear()
cy.get('@apiKeyInput').type(API_KEY)
cy.get('@apiKeyInput').should('have.value', API_KEY)
cy.get('button').contains('Go').click()
cy.wait(WAITING_TIME)
})
Expand All @@ -57,7 +57,9 @@ describe(`Test API key required`, () => {
it('Should display a modal with API key inside the API key modal button', () => {
// Fill the first API key request
cy.get('div[aria-label=ask-for-api-key]').within(() => {
cy.get('input[name="apiKey"]').clear().type(API_KEY)
cy.get('input[name="apiKey"]').as('apiKeyInput')
cy.get('@apiKeyInput').clear()
cy.get('@apiKeyInput').type(API_KEY)
cy.get('button').contains('Go').click()
})
cy.visit('/')
Expand All @@ -73,7 +75,9 @@ describe(`Test API key required`, () => {
it('Should fail on API Key change inside the API key modal button', () => {
// Fill the first API key request
cy.get('div[aria-label=ask-for-api-key]').within(() => {
cy.get('input[name="apiKey"]').clear().type(API_KEY)
cy.get('input[name="apiKey"]').as('apiKeyInput')
cy.get('@apiKeyInput').clear()
cy.get('@apiKeyInput').type(API_KEY)
cy.get('button').contains('Go').click()
})
cy.visit('/')
Expand All @@ -82,10 +86,10 @@ describe(`Test API key required`, () => {
// Test the change of API key inside the API Key Modal
cy.get('span').contains('Api Key').parent().click()
cy.get('div[aria-label=settings-api-key]').within(() => {
cy.get('input[name="apiKey"]')
.clear()
.type(WRONG_APIKEY)
.should('have.value', WRONG_APIKEY)
cy.get('input[name="apiKey"]').as('apiKeyInput')
cy.get('@apiKeyInput').clear()
cy.get('@apiKeyInput').type(WRONG_APIKEY)
cy.get('@apiKeyInput').should('have.value', WRONG_APIKEY)
cy.get('button').contains('Go').click()
cy.wait(WAITING_TIME)
cy.contains('The provided API key is invalid.')
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@storybook/react-webpack5": "^8.4.7",
"@svgr/cli": "^8.1.0",
"cypress": "^13.11.0",
"eslint": "8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.12.1",
Expand All @@ -61,10 +62,5 @@
"prettier": "^3.3.3",
"storybook": "^8.3.4"
},
"resolutions": {
"**/recursive-readdir/**/minimatch": "^3.0.5",
"**/css-select/**/nth-check": "^2.1.1",
"**/react-scripts/**/semver": "^7.5.2",
"**/react-scripts/**/postcss": "^8.4.31"
}
"packageManager": "[email protected]"
}
Loading

0 comments on commit ca465f5

Please sign in to comment.