-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
875 additions
and
925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 6 additions & 13 deletions
19
examples/admin-sdk-app/src/frontend/locations/ex-product-extension-example-resize.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
examples/admin-sdk-plugin/tests/acceptance/tests/action-button.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import { test, expect } from '../fixtures/AcceptanceTest'; | ||
import { getSDKiFrame, mockUpdateApi } from '../fixtures/Helper'; | ||
import { test, expect } from "../fixtures/AcceptanceTest"; | ||
import { getSDKiFrame, mockUpdateApi } from "../fixtures/Helper"; | ||
|
||
test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => { | ||
await mockUpdateApi(ShopAdmin.page); | ||
|
||
const product = await TestDataService.createBasicProduct(); | ||
ShopAdmin.goesTo(AdminProductDetail.url(product.id)); | ||
|
||
const mainHidden = await getSDKiFrame(ShopAdmin.page, 'sw-main-hidden'); | ||
await expect(mainHidden.locator('body')).not.toBeEmpty(); | ||
const mainHidden = await getSDKiFrame(ShopAdmin.page, "sw-main-hidden"); | ||
await expect(mainHidden.locator("body")).not.toBeEmpty(); | ||
}); | ||
|
||
test('@sdk: action button', async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.locator('.sw-app-actions').click(); | ||
test("@sdk: action button", async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.locator(".sw-app-actions").click(); | ||
await ShopAdmin.page | ||
.locator('.sw-context-menu__content .sw-app-action-button', { | ||
hasText: 'Test action', | ||
.locator(".sw-context-menu__content .sw-app-action-button", { | ||
hasText: "Test action", | ||
}) | ||
.click(); | ||
|
||
await expect( | ||
ShopAdmin.page.locator('.sw-alert__title', { | ||
hasText: 'Action button click', | ||
ShopAdmin.page.locator(".sw-alert__title", { | ||
hasText: "Action button click", | ||
}), | ||
).toBeVisible(); | ||
await expect( | ||
ShopAdmin.page.locator('.sw-alert__message', { | ||
hasText: 'The action button in the product detail page was clicked', | ||
ShopAdmin.page.locator(".sw-alert__message", { | ||
hasText: "The action button in the product detail page was clicked", | ||
}), | ||
).toBeVisible(); | ||
}); |
38 changes: 19 additions & 19 deletions
38
examples/admin-sdk-plugin/tests/acceptance/tests/component-section.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
import { test, expect } from '../fixtures/AcceptanceTest'; | ||
import { getSDKiFrame, mockUpdateApi } from '../fixtures/Helper'; | ||
import { test, expect } from "../fixtures/AcceptanceTest"; | ||
import { getSDKiFrame, mockUpdateApi } from "../fixtures/Helper"; | ||
|
||
test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => { | ||
await mockUpdateApi(ShopAdmin.page); | ||
|
||
const product = await TestDataService.createBasicProduct(); | ||
ShopAdmin.goesTo(AdminProductDetail.url(product.id)); | ||
|
||
const mainHidden = await getSDKiFrame(ShopAdmin.page, 'sw-main-hidden'); | ||
await expect(mainHidden.locator('body')).not.toBeEmpty(); | ||
const mainHidden = await getSDKiFrame(ShopAdmin.page, "sw-main-hidden"); | ||
await expect(mainHidden.locator("body")).not.toBeEmpty(); | ||
}); | ||
|
||
test('@sdk: add a component section', async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.getByRole('link', { name: 'Specifications' }).click(); | ||
test("@sdk: add a component section", async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click(); | ||
|
||
await expect( | ||
ShopAdmin.page.locator('.sw-card__title', { hasText: 'Location tests' }), | ||
ShopAdmin.page.locator(".sw-card__title", { hasText: "Location tests" }), | ||
).toBeVisible(); | ||
await expect( | ||
ShopAdmin.page.locator('.sw-card__subtitle', { | ||
hasText: 'Testing if the location methods work correctly', | ||
ShopAdmin.page.locator(".sw-card__subtitle", { | ||
hasText: "Testing if the location methods work correctly", | ||
}), | ||
).toBeVisible(); | ||
|
||
await getSDKiFrame(ShopAdmin.page, 'location-index'); | ||
await getSDKiFrame(ShopAdmin.page, "location-index"); | ||
}); | ||
|
||
test('@sdk: add a component section with tabs', async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.getByRole('link', { name: 'Specifications' }).click(); | ||
test("@sdk: add a component section with tabs", async ({ ShopAdmin }) => { | ||
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click(); | ||
|
||
await expect( | ||
ShopAdmin.page.locator('.sw-card__title', { hasText: 'Card tabs tests' }), | ||
ShopAdmin.page.locator(".sw-card__title", { hasText: "Card tabs tests" }), | ||
).toBeVisible(); | ||
await expect( | ||
ShopAdmin.page.locator('.sw-card__subtitle', { | ||
hasText: 'Testing if the the card tabs work correctly', | ||
ShopAdmin.page.locator(".sw-card__subtitle", { | ||
hasText: "Testing if the the card tabs work correctly", | ||
}), | ||
).toBeVisible(); | ||
await expect( | ||
ShopAdmin.page.locator('.sw-tabs-item', { hasText: 'Tab 1' }), | ||
ShopAdmin.page.locator(".sw-tabs-item", { hasText: "Tab 1" }), | ||
).toBeVisible(); | ||
|
||
await getSDKiFrame(ShopAdmin.page, 'card-tab-1'); | ||
await getSDKiFrame(ShopAdmin.page, "card-tab-1"); | ||
|
||
await ShopAdmin.page.locator('.sw-tabs-item', { hasText: 'Tab 2' }).click(); | ||
await ShopAdmin.page.locator(".sw-tabs-item", { hasText: "Tab 2" }).click(); | ||
|
||
await getSDKiFrame(ShopAdmin.page, 'card-tab-2'); | ||
await getSDKiFrame(ShopAdmin.page, "card-tab-2"); | ||
}); |
Oops, something went wrong.