Skip to content

Commit

Permalink
Run specs with name containing '+' (#8015)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
  • Loading branch information
laistomazz and chrisbreiding committed Jul 23, 2020
1 parent e05b4cf commit a1c562f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/server/lib/util/escape_filename.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const ampersandRe = /&/g
const percentRe = /%/g
const questionRe = /\?/g
const plusRe = /\+/g

export function escapeFilenameInUrl (url: string) {
// escape valid file name characters that cannot be used in URL
return url
.replace(percentRe, '%25') // %
.replace(ampersandRe, '%26') // &
.replace(questionRe, '%3F') // ? -> it's only valid in Linux
.replace(plusRe, '%2B') // + https://github.com/cypress-io/cypress/issues/5909
}
4 changes: 2 additions & 2 deletions packages/server/test/e2e/4_controllers_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe('e2e plugins', () => {
})
})

it('handles specs with $, &, ? in file name', function () {
let relativeSpecPath = path.join('d?ir&1%', '%di?r2&', 's%pec&?.js')
it('handles specs with $, &, ?, + in file name', function () {
let relativeSpecPath = path.join('d?ir&1%', '%di?r2&', 's%p+ec&?.js')

// windows doesn't support ? in file names
if (process.platform === 'win32') {
Expand Down

4 comments on commit a1c562f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a1c562f Jul 23, 2020

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/linux-x64/circle-develop-a1c562f29febf8b423c4875b3d18429241913fb5-404547/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/circle-develop-a1c562f29febf8b423c4875b3d18429241913fb5-404531/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a1c562f Jul 23, 2020

Choose a reason for hiding this comment

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

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a1c562f Jul 23, 2020

Choose a reason for hiding this comment

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

AppVeyor has built the win32 x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-x64/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/5.0.0/win32-x64/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-x64/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-x64/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.zip npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-a1c562f29febf8b423c4875b3d18429241913fb5-34256300/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on a1c562f Jul 23, 2020

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/darwin-x64/circle-develop-a1c562f29febf8b423c4875b3d18429241913fb5-404643/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/circle-develop-a1c562f29febf8b423c4875b3d18429241913fb5-404615/cypress.tgz

Please sign in to comment.