Skip to content

Commit

Permalink
Merge pull request #234 from shopware/release-please--branches--trunk…
Browse files Browse the repository at this point in the history
…--components--acceptance-test-suite

chore(trunk): release 10.2.0
  • Loading branch information
vanpham-sw authored and GitEvil committed Jan 24, 2025
2 parents 4eab21c + 2c83dcc commit a70359b
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 6 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [10.2.0](https://github.com/shopware/acceptance-test-suite/compare/v10.1.0...v10.2.0) (2024-12-16)


### Features

* add account recover page ([#235](https://github.com/shopware/acceptance-test-suite/issues/235)) ([c70ae47](https://github.com/shopware/acceptance-test-suite/commit/c70ae474205d4afbcabdb8f686e1ed860f36652d))
* add some locators to AccountProfile ([bbfc459](https://github.com/shopware/acceptance-test-suite/pull/232/commits/bbfc459a24fb4cc53acfe44790071a4afcfcf2ce))


### Bug Fixes

* type check to stop IDE complaint ([#228](https://github.com/shopware/acceptance-test-suite/issues/228)) ([4eab21c](https://github.com/shopware/acceptance-test-suite/commit/4eab21c21236b652618789b982cf608b14f8533f))


### Miscellaneous Chores

* release 10.2.0 ([1a60727](https://github.com/shopware/acceptance-test-suite/commit/1a60727110063843e5f504bc96ff635e06c074fe))

## [10.1.0](https://github.com/shopware/acceptance-test-suite/compare/v10.0.1...v10.1.0) (2024-12-13)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopware-ag/acceptance-test-suite",
"version": "10.1.0",
"version": "10.2.0",
"description": "Shopware Acceptance Test Suite",
"author": "shopware AG",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions src/page-objects/AdministrationPages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CustomerGroupDetail } from './administration/CustomerGroupDetail';
import { FirstRunWizard } from './administration/FirstRunWizard';
import { FlowBuilderCreate } from './administration/FlowBuilderCreate';
import { FlowBuilderListing } from './administration/FlowBuilderListing';
import { FlowBuilderTemplates } from './administration/FlowBuilderTemplates';
import { FlowBuilderDetail } from './administration/FlowBuilderDetail';
import { DataSharing } from './administration/DataSharing';
import { Dashboard } from './administration/Dashboard';
Expand Down Expand Up @@ -45,6 +46,7 @@ export interface AdministrationPageTypes {
AdminFirstRunWizard: FirstRunWizard;
AdminFlowBuilderCreate: FlowBuilderCreate;
AdminFlowBuilderListing: FlowBuilderListing;
AdminFlowBuilderTemplates: FlowBuilderTemplates
AdminFlowBuilderDetail: FlowBuilderDetail;
AdminDataSharing: DataSharing;
AdminDashboard: Dashboard;
Expand Down Expand Up @@ -80,6 +82,7 @@ export const AdminPageObjects = {
FirstRunWizard,
FlowBuilderCreate,
FlowBuilderListing,
FlowBuilderTemplates,
FlowBuilderDetail,
Dashboard,
DataSharing,
Expand Down Expand Up @@ -146,6 +149,10 @@ export const test = base.extend<FixtureTypes>({
await use(new FlowBuilderListing(AdminPage));
},

AdminFlowBuilderTemplates: async ({ AdminPage }, use) => {
await use(new FlowBuilderTemplates(AdminPage));
},

AdminFlowBuilderDetail: async ({ AdminPage }, use) => {
await use(new FlowBuilderDetail(AdminPage));
},
Expand Down
15 changes: 13 additions & 2 deletions src/page-objects/administration/FlowBuilderCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ export class FlowBuilderCreate implements PageObject {

public readonly saveButton: Locator;
public readonly header: Locator;
public readonly nameField: Locator;
public readonly flowTab: Locator;
public readonly triggerSelectField: Locator;
public readonly addActionField: Locator;
public readonly smartBarHeader: Locator;


constructor(public readonly page: Page) {
this.saveButton = page.locator('.sw-flow-detail__save');
this.header = page.locator('h2');
this.nameField = page.locator('.sw-flow-detail-general__general-name').getByLabel('Name');
this.flowTab = page.locator('.sw-tabs__content').locator('.sw-flow-detail__tab-flow');
this.triggerSelectField = page.locator('.sw-flow-detail-flow__trigger-card').getByRole('textbox');
this.addActionField = page.locator('.sw-flow-sequence-action__content').locator('.sw-single-select__selection');
this.smartBarHeader = page.locator('.smart-bar__header');
}

url() {
return '#/sw/flow/create/general';
url(flowId: string, tabName = 'general') {
return `#/sw/flow/create//${flowId}/${tabName}`;
}
}
10 changes: 9 additions & 1 deletion src/page-objects/administration/FlowBuilderDetail.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import type { Page, Locator } from '@playwright/test';
import type { PageObject } from '../../types/PageObject';
import { FlowBuilderCreate } from './FlowBuilderCreate';

export class FlowBuilderDetail implements PageObject {
export class FlowBuilderDetail extends FlowBuilderCreate implements PageObject {

public readonly saveButton: Locator;
public readonly generalTab: Locator;
public readonly flowTab: Locator;
public readonly flowName: Locator;
public readonly alertWarning: Locator;
public readonly templateName: Locator;

constructor(public readonly page: Page) {
super(page);
this.saveButton = page.locator('.sw-flow-detail__save');
this.generalTab = page.locator('.sw-flow-detail__tab-general');
this.flowTab = page.locator('.sw-flow-detail__tab-flow');
this.flowName = page.getByTestId('sw-field--flow-name');
this.alertWarning = page.getByRole('alert').first();
this.templateName = page.getByLabel(('Name'));
}

url(flowId: string, tabName = 'general') {
Expand Down
4 changes: 4 additions & 0 deletions src/page-objects/administration/FlowBuilderListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class FlowBuilderListing implements PageObject {
public readonly flowDeleteButton: Locator;
public readonly successAlert: Locator;
public readonly successAlertMessage: Locator;
public readonly searchBar: Locator;


constructor(public readonly page: Page) {
this.createFlowButton = page.locator('.sw-flow-list__create');
Expand All @@ -33,6 +35,8 @@ export class FlowBuilderListing implements PageObject {
this.downloadFlowButton = page.getByRole('button', { name: 'Download flow' });
this.successAlert = page.locator('.sw-alert__body');
this.successAlertMessage = page.locator('.sw-alert__message');
this.searchBar = page.locator('.sw-search-bar').getByPlaceholder('Search flows...');

}

url() {
Expand Down
28 changes: 28 additions & 0 deletions src/page-objects/administration/FlowBuilderTemplates.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { Page, Locator } from '@playwright/test';
import type { PageObject } from '../../types/PageObject';
import { FlowBuilderListing } from './FlowBuilderListing';

export class FlowBuilderTemplates extends FlowBuilderListing implements PageObject {

public readonly searchBar: Locator;

constructor(public readonly page: Page) {
super(page);
this.searchBar = page.locator('.sw-search-bar').getByPlaceholder('Search flows...');
}
url() {
return `#/sw/flow/index/templates`;
}

async getLineItemByFlowName(flowName: string): Promise<Record<string, Locator>> {
const lineItem = this.page.locator('.sw-data-grid__row').filter({ hasText: flowName });
const createFlowLink = lineItem.getByRole('link').getByTestId('sw-icon__regular-long-arrow-right');
const templateDetailLink = lineItem.getByRole('link').getByText(flowName);

return {
createFlowLink: createFlowLink,
lineItem: lineItem,
templateDetailLink: templateDetailLink,
}
}
}

0 comments on commit a70359b

Please sign in to comment.