Skip to content
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

Fix admin login on saas #26

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fixtures/PageContexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const test = base.extend<FixtureTypes>({

await page.goto('#/login');

await page.getByLabel('Username').fill(adminUser.username);
await page.getByLabel(/Username|Email address/).fill(adminUser.username);
await page.getByLabel('Password').fill(adminUser.password);

await page.getByRole('button', { name: 'Log in' }).click();
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { test as ShopCustomerTasks } from './tasks/shop-customer-tasks';

export * from '@playwright/test';
export * from './services/ShopwareDataHelpers';
export * from './services/ShopInfo';
export * from './services/ImageHelper';

export { StorefrontPageObjects } from './page-objects/StorefrontPages';
Expand Down
6 changes: 6 additions & 0 deletions src/services/ShopInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { type AdminApiContext } from './AdminApiContext';

export const isSaaSInstance = async (adminApiContext: AdminApiContext): Promise<boolean> => {
const instanceFeatures = await adminApiContext.get('./instance/features');
return instanceFeatures.ok();
};
Loading