generated from adobecom/milo-college
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/stage' into MWPW-154136-profile-…
…dropdown
- Loading branch information
Showing
33 changed files
with
2,811 additions
and
12,295 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Nala' | ||
|
||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- run: $GITHUB_ACTION_PATH/run.sh | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.announcement-date { | ||
display: block; | ||
margin: 24px 0 32px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { formatDate, getLocale } from '../../scripts/utils.js'; | ||
import { createTag } from '../utils/utils.js'; | ||
|
||
const CARD_METADATA_PROPERTY_CREATED = 'created'; | ||
|
||
export default async function init(el) { | ||
performance.mark('announcement-date:start'); | ||
|
||
let createdDateValue; | ||
const cardMetadataEl = document.querySelector('.card-metadata'); | ||
|
||
if (cardMetadataEl) { | ||
[...cardMetadataEl.children].forEach((row) => { | ||
const firstColumn = row.children[0]; | ||
if (firstColumn && firstColumn.innerText.trim().toLowerCase() === CARD_METADATA_PROPERTY_CREATED) { | ||
createdDateValue = row.children[1]?.innerText.trim(); | ||
} | ||
}); | ||
} | ||
|
||
const createdDate = new Date(createdDateValue); | ||
|
||
if (!isNaN(createdDate)) { | ||
const locale = getLocale(); | ||
el.innerHTML = ''; | ||
el.className = `announcement-date-wrapper content ${el.className}`; | ||
el.classList.remove('announcement-date'); | ||
const month = String(createdDate.getMonth() + 1).padStart(2, '0'); | ||
const day = String(createdDate.getDate()).padStart(2, '0'); | ||
const datetime = `${createdDate.getFullYear()}-${month}-${day}`; | ||
const dateEl = createTag('time', { datetime, class: 'announcement-date detail-m' }, formatDate(createdDateValue, locale.ietf)); | ||
el.append(dateEl); | ||
} | ||
|
||
performance.mark('announcement-date:end'); | ||
performance.measure('announcement-date block', 'announcement-date:start', 'announcement-date:end'); | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"Create Nala Spec": { | ||
"prefix": "create nala spec", | ||
"body": [ | ||
"module.exports = {", | ||
" FeatureName: '${1:Block or Feature Name}',", | ||
" features: [", | ||
" {", | ||
" tcid: '0',", | ||
" name: '@${2:spec-name}',", | ||
" path: '/drafts/nala/[${3:test-page-path}]',", | ||
" data: {", | ||
" attribute-1: '${4:value}',", | ||
" attribute-2: '${5:value}',", | ||
" attribute-3: '${6:value}',", | ||
" },", | ||
" tags: '@Block @smoke @regression @dme',", | ||
" },", | ||
" ],", | ||
"};" | ||
], | ||
"description": "Create a Nala spec with block name or feature name" | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export default class AnnouncementsPage { | ||
constructor(page) { | ||
this.page = page; | ||
this.signInButton = page.locator('button[daa-ll="Sign In"].feds-signIn'); | ||
this.resultNumber = page.locator('.partner-cards-cards-results').nth(0); | ||
this.searchField = page.locator('.input'); | ||
this.clearSearchSelector = page.locator('[aria-label="Reset"]'); | ||
this.clearAllSelector = page.locator('[aria-label="Clear all"]'); | ||
this.firstCardTitle = page.locator('.card-title').nth(0); | ||
this.firstCardDate = page.locator('.card-date').nth(0); | ||
this.lastCardDate = page.locator('.card-date').nth(5); | ||
this.sortBtn = page.locator('.sort-btn'); | ||
this.oldestOption = page.getByRole('button', { name: 'oldest' }); | ||
this.paginationText = page.locator('.pagination-total-results'); | ||
this.loadMore = page.locator('[aria-label="Load more"]'); | ||
this.cardCount = page.locator('.card-wrapper'); | ||
this.pageCount = page.locator('.page-btn'); | ||
this.readCard = page.locator('.card-btn'); | ||
this.paginationPrevButton = page.locator('button.pagination-prev-btn'); | ||
this.paginationNextButton = page.locator('button.pagination-next-btn'); | ||
this.pageNumButton = page.locator('button.page-btn'); | ||
} | ||
|
||
async clickPageNumButton(pageNum) { | ||
await this.page.locator(`button[aria-label="Page ${pageNum}"]`).click(); | ||
} | ||
|
||
async expandFilterOptions(filterSection) { | ||
await this.page.locator(`[aria-label="${filterSection}"]`).click(); | ||
} | ||
|
||
async clickFilterOptions(filterOption) { | ||
await this.page.locator(`sp-checkbox:text-is("${filterOption}")`).click(); | ||
} | ||
|
||
async clickDateFilterOptions(dateFilterOption) { | ||
await this.page.locator(`button[aria-label="${dateFilterOption}"]`).click(); | ||
} | ||
|
||
async clearSideBarFilterButton(filterButton) { | ||
await this.page.locator(`[aria-label="${filterButton}"]`).click(); | ||
} | ||
|
||
async clearFilter(filter, number) { | ||
await this.page.locator(`[aria-label="${filter}"] + [aria-label="${number}"]`).click(); | ||
} | ||
} |
Oops, something went wrong.