-
Notifications
You must be signed in to change notification settings - Fork 339
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
RBAC E2E Tests #1241
Merged
Merged
RBAC E2E Tests #1241
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a1b1dd8
frontend: new e2e tests for enterprise
bojand c064f3c
frontend: correct bacnend path
bojand 2d808e1
frontend: fix up e2e tests
bojand 7ab32a2
frontend: add logging to npm for tests
bojand 27036a2
frontend: fix enterprise webserver paths in playwrite tests
bojand 9026e7c
frontend: remove debug commands from package.json
bojand b337fff
frontend: skip failing test
bojand 56eb7b2
frontent: update to changes in latest master
bojand 6638d5c
Add explicit waits for e2e RBAC tests
jvorcak 20c3ecd
More explicit waits for browser loading
jvorcak a0752a1
Tmp fix for an e2e iframe issue
jvorcak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,77 @@ | ||
import { defineConfig, devices } from '@playwright/test'; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
expect: { | ||
timeout: 15000, | ||
}, | ||
testDir: './tests', | ||
/* Run tests in files in parallel */ | ||
fullyParallel: false, // TODO enable this in the future | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 1 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: 'html', | ||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
navigationTimeout: 15 * 1000, | ||
viewport: { width: 1920, height: 1080 }, | ||
headless: !!process.env.CI, | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
baseURL: process.env.REACT_APP_ORIGIN ?? | ||
'http://localhost:3000', | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: 'on-first-retry', | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ name: 'authenticate', testMatch: /auth\.setup\.ts/ }, | ||
|
||
{ | ||
name: 'Console Enterprise', | ||
testMatch: 'tests/console-enterprise/**/*', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
// Use prepared auth state. | ||
storageState: 'playwright/.auth/user.json', | ||
// baseURL: '// console console-enterprise URL' | ||
}, | ||
dependencies: ['authenticate'] | ||
}, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
webServer: [{ | ||
cwd: process.env.CI ? '../../backend/cmd' : '../../console-enterprise/backend/cmd', | ||
command: process.env.CI ? | ||
'go run . --config.filepath=../../console-oss/frontend/tests/config/console.enterprise.config.yaml' : | ||
'go run . --config.filepath=../../../console/frontend/tests/config/console.enterprise.config.yaml', | ||
url: 'http://localhost:9090/admin/startup', | ||
reuseExistingServer: !process.env.CI, | ||
stdout: 'pipe', | ||
stderr: 'pipe', | ||
timeout: 120 * 1000 | ||
}, | ||
{ | ||
command: 'npm run start2', | ||
url: 'http://localhost:3000', | ||
timeout: 120 * 1000, | ||
reuseExistingServer: !process.env.CI, | ||
stdout: 'pipe', | ||
stderr: 'pipe', | ||
}] | ||
}); |
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
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
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
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,40 @@ | ||
serveFrontend: false | ||
kafka: | ||
brokers: ["localhost:19092"] | ||
schemaRegistry: | ||
enabled: true | ||
urls: ["http://localhost:18081"] | ||
protobuf: | ||
enabled: true | ||
schemaRegistry: | ||
enabled: true | ||
refreshInterval: 5m | ||
redpanda: | ||
adminApi: | ||
enabled: true | ||
urls: ["http://localhost:19644"] | ||
connect: | ||
enabled: true | ||
clusters: | ||
- name: local-connect-cluster | ||
url: http://localhost:18083 | ||
- name: local-connect-cluster2 | ||
url: http://localhost:18083 | ||
server: | ||
listenPort: 9090 | ||
allowedOrigins: ["http://localhost:3000", "http://localhost:3001"] | ||
login: | ||
enabled: true | ||
jwtSecret: e2etestjwtsecret | ||
useSecureCookies: false | ||
useCookieChunking: true | ||
plain: | ||
enabled: true | ||
credentials: | ||
- username: "e2euser" | ||
password: "very-secret" | ||
licenseFilepath: ../../frontend/tests/config/redpanda.license | ||
enterprise: | ||
rbac: | ||
enabled: true | ||
roleBindingsFilepath: ../../frontend/tests/config/role-bindings.yaml |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason this always seems to fail for me?