Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix_textfield_texta…
Browse files Browse the repository at this point in the history
…rea_label_fullwidth_issue2392
  • Loading branch information
abhiomkar committed May 24, 2018
2 parents 650e21d + efbd4c5 commit e0b857e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/mdc-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ OR
```

### CSS Classes

CSS Class | Description
--- | ---
`mdc-list` | Mandatory, for the list element
Expand Down Expand Up @@ -168,6 +169,7 @@ CSS Class | Description
* *Activated* state is more permanent than selected state, and will **NOT** change soon relative to the lifetime of the page.

### Sass Mixins

Mixin | Description
--- | ---
`mdc-list-item-primary-text-ink-color($color)` | Sets the ink color of the primary text of the list item
Expand Down
1 change: 1 addition & 0 deletions packages/mdc-textfield/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Mixin | Description
`mdc-text-field-fullwidth-bottom-line-color($color)` | Customizes the fullwidth text field variant bottom line color.

#### Other Mixins

Mixin | Description
--- | ---
`mdc-text-field-bottom-line-color($color)` | Customizes the text field bottom line color except the outlined and textarea variants.
Expand Down
15 changes: 9 additions & 6 deletions test/screenshot/lib/cbt-user-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const CBT_FILTERS = {
},
};

let userAgentsPromise;
let allUserAgentsPromise;

module.exports = {
fetchBrowsersToRun,
Expand All @@ -76,15 +76,15 @@ module.exports = {
};

/**
* Resolves aliases in `browser.json` and returns their corresponding CBT API representations.
* @param {!Array<string>=} aliases
* Resolves all aliases in `browser.json` and returns their corresponding CBT API representations.
* @return {!Promise<!Array<!CbtUserAgent>>}
*/
async function fetchBrowsersToRun(aliases = getFilteredAliases()) {
return userAgentsPromise || (userAgentsPromise = new Promise((resolve, reject) => {
async function fetchBrowsersToRun() {
return allUserAgentsPromise || (allUserAgentsPromise = new Promise((resolve, reject) => {
cbtApi.fetchAvailableDevices()
.then(
(cbtDevices) => {
const aliases = getFilteredAliases();
const userAgents = findAllMatchingUAs(aliases, cbtDevices);
console.log(userAgents.map((config) => `${config.alias}: ${config.fullCbtApiName}`));
console.log('\n');
Expand Down Expand Up @@ -117,7 +117,10 @@ async function fetchBrowserByApiName(cbtDeviceApiName, cbtBrowserApiName) {
* @return {!Promise<?CbtUserAgent>}
*/
async function fetchBrowserByAlias(userAgentAlias) {
return (await fetchBrowsersToRun([userAgentAlias]))[0];
const userAgents = await fetchBrowsersToRun();
return userAgents.find((userAgent) => {
return userAgent.alias === userAgentAlias;
});
}

/**
Expand Down
11 changes: 11 additions & 0 deletions test/screenshot/lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ class Storage {


const cloudFile = this.storageBucket_.file(gcsAbsoluteFilePath);
const [cloudFileExists] = await cloudFile.exists();

if (cloudFileExists) {
console.warn([
`WARNING: GCS file ${queuePosition} already exists - ${gcsAbsoluteFilePath}`,
'This is a bug in the screenshot testing logic. Tell acdvorak to fix it.',
'The file will NOT be overwritten. Continuing.',
].join('\n'));
return this.handleUploadSuccess_(uploadableFile);
}

const uploadPromise = new Promise(((resolve, reject) => {
console.log(`➡ Uploading file ${queuePosition} - ${gcsAbsoluteFilePath}`);

Expand Down

0 comments on commit e0b857e

Please sign in to comment.