generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 8
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
7 changed files
with
248 additions
and
222 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* eslint-disable */ | ||
import pkg from 'axios'; | ||
|
||
const { head } = pkg; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
export default class StudioPage { | ||
constructor(page) { | ||
this.page = page; | ||
constructor(page) { | ||
this.page = page; | ||
|
||
this.searchInput = page.locator('sp-search input'); | ||
this.searchIcon = page.locator('sp-search sp-icon-magnify'); | ||
this.filter = page.locator('sp-action-button[label="Filter"]'); | ||
this.topFolder = page.locator('sp-picker[label="TopFolder"] > button'); | ||
this.renderView = page.locator('render-view'); | ||
this.suggestedCard = page.locator('merch-card[variant="ccd-suggested"]'); | ||
this.sliceCard = page.locator('merch-card[variant="ccd-slice"]'); | ||
this.sliceCardWide = page.locator('merch-card[variant="ccd-slice"][size="wide"]'); | ||
this.searchInput = page.locator('sp-search input'); | ||
this.searchIcon = page.locator('sp-search sp-icon-magnify'); | ||
this.filter = page.locator('sp-action-button[label="Filter"]'); | ||
this.topFolder = page.locator('sp-picker[label="TopFolder"] > button'); | ||
this.renderView = page.locator('render-view'); | ||
this.suggestedCard = page.locator( | ||
'merch-card[variant="ccd-suggested"]', | ||
); | ||
this.sliceCard = page.locator('merch-card[variant="ccd-slice"]'); | ||
this.sliceCardWide = page.locator( | ||
'merch-card[variant="ccd-slice"][size="wide"]', | ||
); | ||
} | ||
|
||
} | ||
async getCard(id, cardType) { | ||
const cardVariant = { | ||
suggested: this.suggestedCard, | ||
slice: this.sliceCard, | ||
'slice-wide': this.sliceCardWide, | ||
}; | ||
|
||
async getCard(id, cardType) { | ||
const cardVariant = { | ||
suggested: this.suggestedCard, | ||
slice: this.sliceCard, | ||
'slice-wide': this.sliceCardWide, | ||
}; | ||
const card = cardVariant[cardType]; | ||
if (!card) { | ||
throw new Error(`Invalid card type: ${cardType}`); | ||
} | ||
|
||
const card = cardVariant[cardType]; | ||
if (!card) { | ||
throw new Error(`Invalid card type: ${cardType}`); | ||
return card.filter({ | ||
has: this.page.locator(`aem-fragment[fragment="${id}"]`), | ||
}); | ||
} | ||
|
||
return card.filter({ has: this.page.locator(`aem-fragment[fragment="${id}"]`) }); | ||
} | ||
|
||
} |
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,24 +1,24 @@ | ||
export default { | ||
FeatureName: 'M@S Studio', | ||
features: [ | ||
{ | ||
tcid: '0', | ||
name: '@studio-direct-search', | ||
path: '/studio.html', | ||
data: { | ||
cardid: '206a8742-0289-4196-92d4-ced99ec4191e', | ||
title: 'Automation Test Card', | ||
eyebrow: 'DO NOT EDIT', | ||
description: 'MAS repo validation card for Nala tests.', | ||
price: 'US$22.99/mo', | ||
strikethroughPrice: 'US$37.99/mo', | ||
cta: 'Buy now', | ||
offerid: '30404A88D89A328584307175B8B27616', | ||
linkText: 'See terms', | ||
linkUrl: '', | ||
}, | ||
browserParams: '#query=', | ||
tags: '@mas @mas-studio @smoke @regression', | ||
}, | ||
], | ||
FeatureName: 'M@S Studio', | ||
features: [ | ||
{ | ||
tcid: '0', | ||
name: '@studio-direct-search', | ||
path: '/studio.html', | ||
data: { | ||
cardid: '206a8742-0289-4196-92d4-ced99ec4191e', | ||
title: 'Automation Test Card', | ||
eyebrow: 'DO NOT EDIT', | ||
description: 'MAS repo validation card for Nala tests.', | ||
price: 'US$22.99/mo', | ||
strikethroughPrice: 'US$37.99/mo', | ||
cta: 'Buy now', | ||
offerid: '30404A88D89A328584307175B8B27616', | ||
linkText: 'See terms', | ||
linkUrl: '', | ||
}, | ||
browserParams: '#query=', | ||
tags: '@mas @mas-studio @smoke @regression', | ||
}, | ||
], | ||
}; |
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
Oops, something went wrong.