test(admin/e2e): Add tags to tests (#2046)
This commit is contained in:
1 parent
ade1601d8d
commit
659067dd08
10 files changed
+38
-23
No files matched your search
@@ -34,6 +34,10 @@
|
||||
"test": "concurrently \"npm:test:*\" --names \"test:\"",
|
||||
"test:ember": "COVERAGE=true ember exam --test-port 0 --split=4 --parallel=1 --random",
|
||||
"e2e": "yarn playwright test --config ./tests/e2e/playwright.config.js",
|
||||
"e2e:ce:aws": "yarn run e2e --grep \"(?=.*@ce)(?=.*@aws)\"",
|
||||
"e2e:ce:docker": "yarn run e2e --grep \"(?=.*@ce)(?=.*@docker)\"",
|
||||
"e2e:ent:aws": "yarn run e2e \"(?=.*@ent)(?=.*@aws)\"",
|
||||
"e2e:ent:docker": "yarn run e2e \"(?=.*@ent)(?=.*@docker)\"",
|
||||
"e2e:dev:chrome": "yarn run e2e --project=chromium --headed",
|
||||
"e2e:dev:firefox": "yarn run e2e --project=firefox --headed",
|
||||
"e2e:dev:safari": "yarn run e2e --project=webkit --headed",
|
||||
|
||||
@@ -113,7 +113,7 @@ It is not necessary, but from this point we recommend having 2 terminals open.
|
||||
|
||||
### Launch Enos Scenario
|
||||
|
||||
Using Terminal 1:
|
||||
Using Terminal 1:
|
||||
- `$ cd boundary/enos`.
|
||||
- `$ doormat login`. Login with Doormat.
|
||||
- `$ eval "$(doormat aws export --account boundary_team_acctest_dev)"`. Exporting AWS env variables from doormat to your terminal.
|
||||
@@ -136,14 +136,15 @@ PWDEBUG=console yarn playwright test --headed --config ./tests/e2e/playwright.co
|
||||
PWDEBUG=console yarn playwright test --headed --config ./tests/e2e/playwright.config.js login.spec.js --debug
|
||||
```
|
||||
|
||||
To run the tests with a specific tag (e.g. @enterprise), use this command.
|
||||
To run all tests for a certain configuration, you can use the following shortcuts
|
||||
```bash
|
||||
PWDEBUG=console yarn playwright test --grep @enterprise --headed --config ./tests/e2e/playwright.config.js delete-resources.spec.js
|
||||
```
|
||||
# Runs all tests pertaining to the Community Edition
|
||||
yarn run e2e:ce:aws
|
||||
yarn run e2e:ce:docker
|
||||
|
||||
To run all tests except those with a specific tag (e.g. @enterprise), use this command.
|
||||
```bash
|
||||
PWDEBUG=console yarn playwright test --grep-invert @enterprise --headed --config ./tests/e2e/playwright.config.js delete-resources.spec.js
|
||||
# Runs all tests pertaining to the Enterprise Edition
|
||||
yarn run e2e:ent:aws
|
||||
yarn run e2e:ent:docker
|
||||
```
|
||||
|
||||
[Playwright documentation about running tests](https://playwright.dev/docs/running-tests).
|
||||
|
||||
@@ -28,7 +28,7 @@ test.beforeAll(async () => {
|
||||
await checkBoundaryCli();
|
||||
});
|
||||
|
||||
test('Verify new auth-method can be created and assigned to users', async ({
|
||||
test('Verify new auth-method can be created and assigned to users @ce @ent @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
|
||||
@@ -73,7 +73,9 @@ test.beforeEach(async ({ page }) => {
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test('Static Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
test('Static Credential Store (User & Key Pair) @ce @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
const credentialName = 'Credential ' + nanoid();
|
||||
await page.getByRole('link', { name: 'Credentials', exact: true }).click();
|
||||
await page.getByRole('link', { name: 'New', exact: true }).click();
|
||||
@@ -121,7 +123,9 @@ test('Static Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
}
|
||||
});
|
||||
|
||||
test('Static Credential Store (Username & Password)', async ({ page }) => {
|
||||
test('Static Credential Store (Username & Password) @ce @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
const credentialName = 'Credential ' + nanoid();
|
||||
await page.getByRole('link', { name: 'Credentials', exact: true }).click();
|
||||
await page.getByRole('link', { name: 'New', exact: true }).click();
|
||||
@@ -172,7 +176,7 @@ test('Static Credential Store (Username & Password)', async ({ page }) => {
|
||||
}
|
||||
});
|
||||
|
||||
test('Static Credential Store (JSON)', async ({ page }) => {
|
||||
test('Static Credential Store (JSON) @ce @aws @docker', async ({ page }) => {
|
||||
const credentialName = 'Credential ' + nanoid();
|
||||
await page.getByRole('link', { name: 'Credentials', exact: true }).click();
|
||||
await page.getByRole('link', { name: 'New', exact: true }).click();
|
||||
|
||||
@@ -53,7 +53,9 @@ test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/');
|
||||
});
|
||||
|
||||
test('Vault Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
test('Vault Credential Store (User & Key Pair) @ce @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
execSync(
|
||||
`vault policy write ${boundaryPolicyName} ./tests/e2e/tests/fixtures/boundary-controller-policy.hcl`,
|
||||
);
|
||||
|
||||
@@ -64,7 +64,7 @@ test.beforeEach(async () => {
|
||||
await authenticateBoundaryCli();
|
||||
});
|
||||
|
||||
test('Verify resources can be deleted', async ({ page }) => {
|
||||
test('Verify resources can be deleted @ce @aws @docker', async ({ page }) => {
|
||||
let orgId;
|
||||
try {
|
||||
// Create boundary resources using CLI
|
||||
@@ -189,7 +189,7 @@ test('Verify resources can be deleted', async ({ page }) => {
|
||||
}
|
||||
});
|
||||
|
||||
test('Verify enterprise resources can be deleted @enterprise', async ({
|
||||
test('Verify enterprise resources can be deleted @ent @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
let orgId;
|
||||
|
||||
@@ -25,7 +25,7 @@ test.beforeEach(async ({ page }) => {
|
||||
});
|
||||
|
||||
test.describe('AWS', async () => {
|
||||
test('Create a Dynamic Host Catalog and set up Host Sets', async ({
|
||||
test('Create a Dynamic Host Catalog and set up Host Sets @ce @ent @aws', async ({
|
||||
page,
|
||||
}) => {
|
||||
await createNewOrg(page);
|
||||
|
||||
@@ -27,7 +27,7 @@ test.beforeAll(async () => {
|
||||
await checkBoundaryCli();
|
||||
});
|
||||
|
||||
test('Verify a new role can be created and associated with a group', async ({
|
||||
test('Verify a new role can be created and associated with a group @ce @ent @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
/* eslint-disable no-undef */
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
test('Log in, log out, and then log back in', async ({ page }) => {
|
||||
test('Log in, log out, and then log back in @ce @ent @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
|
||||
await page
|
||||
@@ -42,7 +44,9 @@ test.describe('Failure Cases', async () => {
|
||||
await page.goto('/');
|
||||
});
|
||||
|
||||
test('Log in with invalid password', async ({ page }) => {
|
||||
test('Log in with invalid password @ce @ent @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page
|
||||
.getByLabel('Login Name')
|
||||
.fill(process.env.E2E_PASSWORD_ADMIN_LOGIN_NAME);
|
||||
@@ -55,7 +59,7 @@ test.describe('Failure Cases', async () => {
|
||||
).toBeHidden();
|
||||
});
|
||||
|
||||
test('Log in with only username', async ({ page }) => {
|
||||
test('Log in with only username @ce @ent @aws @docker', async ({ page }) => {
|
||||
await page.getByLabel('Login Name').fill('testuser');
|
||||
await page.getByRole('button', { name: 'Sign In' }).click();
|
||||
await expect(page.getByRole('alert').getByText('Error')).toBeVisible();
|
||||
@@ -65,7 +69,7 @@ test.describe('Failure Cases', async () => {
|
||||
).toBeHidden();
|
||||
});
|
||||
|
||||
test('Log in with only password', async ({ page }) => {
|
||||
test('Log in with only password @ce @ent @aws @docker', async ({ page }) => {
|
||||
await page
|
||||
.getByLabel('Password', { exact: true })
|
||||
.fill(process.env.E2E_PASSWORD_ADMIN_PASSWORD);
|
||||
|
||||
@@ -38,7 +38,7 @@ test.beforeAll(async () => {
|
||||
await checkBoundaryCli();
|
||||
});
|
||||
|
||||
test('Verify session created to target with host, then cancel the session', async ({
|
||||
test('Verify session created to target with host, then cancel the session @ce @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
@@ -81,7 +81,7 @@ test('Verify session created to target with host, then cancel the session', asyn
|
||||
}
|
||||
});
|
||||
|
||||
test('Verify session created to target with address, then cancel the session', async ({
|
||||
test('Verify session created to target with address, then cancel the session @ce @aws @docker', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto('/');
|
||||
@@ -120,7 +120,7 @@ test('Verify session created to target with address, then cancel the session', a
|
||||
}
|
||||
});
|
||||
|
||||
test('Verify TCP target is updated', async ({ page }) => {
|
||||
test('Verify TCP target is updated @ce @aws @docker', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
let orgName;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user