Skip to content

Commit

Permalink
test: add e2e tests for proxy option
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Aug 26, 2021
1 parent d89a64d commit 52d48fc
Show file tree
Hide file tree
Showing 2 changed files with 439 additions and 0 deletions.
56 changes: 56 additions & 0 deletions test/e2e/__snapshots__/proxy.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,59 @@ exports[`proxy option should supports http methods errors: page errors 1`] = `Ar
exports[`proxy option should supports http methods errors: response status 1`] = `500`;

exports[`proxy option should supports http methods errors: response text 1`] = `"error from proxy"`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
]
`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: response status 1`] = `504`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
]
`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: response status 1`] = `504`;

exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
]
`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: response status 1`] = `504`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
]
`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: response status 1`] = `504`;

exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;

exports[`proxy option should work in multi compiler mode respects a proxy option: console messages 1`] = `Array []`;

exports[`proxy option should work in multi compiler mode respects a proxy option: page errors 1`] = `Array []`;

exports[`proxy option should work in multi compiler mode respects a proxy option: response status 1`] = `200`;

exports[`proxy option should work in multi compiler mode respects a proxy option: response text 1`] = `"from proxy1"`;
Loading

0 comments on commit 52d48fc

Please sign in to comment.