Skip to content

Commit

Permalink
Fix login test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo committed Feb 2, 2024
1 parent c953406 commit ba70ee3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 3 additions & 11 deletions dev/tool/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,20 +206,12 @@ export function devTool (
program
.command('create-workspace <name>')
.description('create workspace')
.requiredOption('-o, --organization <organization>', 'organization name')
.requiredOption('-w, --workspaceName <workspaceName>', 'Workspace name')
.option('-e, --email <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)
})
})

Expand Down
2 changes: 1 addition & 1 deletion scripts/create-workspace.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/sanity/tests/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})

0 comments on commit ba70ee3

Please sign in to comment.