-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix issue with using privileged commands when baseUrl includes b…
…asic auth credentials
- Loading branch information
1 parent
d5678c7
commit 075d7df
Showing
6 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
13 changes: 13 additions & 0 deletions
13
system-tests/projects/privileged-commands/cypress.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
e2e: { | ||
baseUrl: 'http://user:pass@localhost:9999/app', | ||
supportFile: false, | ||
setupNodeEvents (on) { | ||
on('task', { | ||
'return:arg' (arg) { | ||
return arg | ||
}, | ||
}) | ||
}, | ||
}, | ||
} |
7 changes: 7 additions & 0 deletions
7
system-tests/projects/privileged-commands/cypress/e2e/spec.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
it('can run privileged commands with basic auth baseUrl', () => { | ||
cy.visit('/html') | ||
cy.exec('echo "hello"') | ||
cy.readFile('cypress/fixtures/example.json') | ||
cy.writeFile('cypress/_test-output/written.txt', 'contents') | ||
cy.task('return:arg', 'arg') | ||
}) |
5 changes: 5 additions & 0 deletions
5
system-tests/projects/privileged-commands/cypress/fixtures/example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters