diff --git a/README.md b/README.md index 6312cd5c66..ca374ee650 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Before you can begin, you need to create a workspace and an account and associat ```bash cd ./tool # dev/tool in the repository root -rushx run-local create-workspace ws1 -o DevWorkspace # Create workspace +rushx run-local create-workspace ws1 -w DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. rushx run-local assign-workspace user1 ws1 # Assign workspace to user. diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index 103b7400d6..9f15b4aa47 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -206,20 +206,12 @@ export function devTool ( program .command('create-workspace ') .description('create workspace') - .requiredOption('-o, --organization ', 'organization name') + .requiredOption('-w, --workspaceName ', 'Workspace name') + .option('-e, --email ', 'Author email', 'platform@email.com') .action(async (workspace, cmd) => { const { mongodbUri, txes, version, migrateOperations } = prepareTools() await withDatabase(mongodbUri, async (db) => { - await createWorkspace( - version, - txes, - migrateOperations, - db, - productId, - 'platform@email.com', - cmd.organization, - workspace - ) + await createWorkspace(version, txes, migrateOperations, db, productId, cmd.email, cmd.workspaceName, workspace) }) }) diff --git a/scripts/create-workspace.sh b/scripts/create-workspace.sh index 7ceb709c70..e61d44333a 100644 --- a/scripts/create-workspace.sh +++ b/scripts/create-workspace.sh @@ -1,5 +1,5 @@ cd ./dev/tool -rushx run-local create-workspace ws1 -o DevWorkspace # Create workspace +rushx run-local create-workspace ws1 -w DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. rushx run-local assign-workspace user1 ws1 # Assign workspace to user. diff --git a/tests/prepare.sh b/tests/prepare.sh index eaed0ad467..2d352c10b8 100755 --- a/tests/prepare.sh +++ b/tests/prepare.sh @@ -7,7 +7,7 @@ docker compose -p sanity up -d --force-recreate --renew-anon-volumes ./wait-elastic.sh 9201 # Create workspace record in accounts -./tool.sh create-workspace sanity-ws -o SanityTest +./tool.sh create-workspace sanity-ws -w SanityTest # Create user record in accounts ./tool.sh create-account user1 -f John -l Appleseed -p 1234 ./tool.sh create-account user2 -f Kainin -l Dirak -p 1234 diff --git a/tests/sanity/tests/login.spec.ts b/tests/sanity/tests/login.spec.ts index 1131aff8db..61f88b6da8 100644 --- a/tests/sanity/tests/login.spec.ts +++ b/tests/sanity/tests/login.spec.ts @@ -17,6 +17,6 @@ test.describe('login test', () => { await loginPage.login(PlatformUser, '1234') const selectWorkspacePage = new SelectWorkspacePage(page) - await selectWorkspacePage.selectWorkspace('sanity-ws') + await selectWorkspacePage.selectWorkspace('SanityTest') }) })