[MM-48685] Fix failing downloads dropdown items tests (#2431)

* [MM-48685] Fix failing downloads dropdown items tests

* Remove unused styles for Thumbnail
This commit is contained in:
Pantelis Vratsalis 2022-11-30 17:43:55 +02:00 committed by GitHub
parent ba50a4cef9
commit 84ab14eabf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 80 deletions

View file

@ -67,7 +67,7 @@ describe('downloads/downloads_dropdown_items', function desc() {
const fileStateInnerText = await fileStateLocator.innerText();
fileStateInnerText.should.equal('3.92 MB • Downloaded');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__File__Body__Thumbnail');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__Thumbnail');
const thumbnailBackgroundImage = await fileThumbnailLocator.evaluate((node) => window.getComputedStyle(node).getPropertyValue('background-image'));
thumbnailBackgroundImage.should.include('text..svg');
});
@ -104,7 +104,7 @@ describe('downloads/downloads_dropdown_items', function desc() {
const fileStateInnerText = await fileStateLocator.innerText();
fileStateInnerText.should.equal('3.92 MB • Deleted');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__File__Body__Thumbnail');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__Thumbnail');
const thumbnailBackgroundImage = await fileThumbnailLocator.evaluate((node) => window.getComputedStyle(node).getPropertyValue('background-image'));
thumbnailBackgroundImage.should.include('text..svg');
});
@ -148,7 +148,7 @@ describe('downloads/downloads_dropdown_items', function desc() {
const fileStateInnerText = await fileStateLocator.innerText();
fileStateInnerText.should.equal('3.92 MB • Cancelled');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__File__Body__Thumbnail');
const fileThumbnailLocator = await this.downloadsWindow.waitForSelector('.DownloadsDropdown__Thumbnail');
const thumbnailBackgroundImage = await fileThumbnailLocator.evaluate((node) => window.getComputedStyle(node).getPropertyValue('background-image'));
thumbnailBackgroundImage.should.include('text..svg');
});

View file

@ -228,74 +228,6 @@ body {
justify-content: space-between;
width: 100%;
.DownloadsDropdown__File__Body__Thumbnail__Container {
align-items: center;
background: rgba(63, 67, 80, 0.08);
border-radius: 4px;
display: flex;
height: 32px;
justify-content: center;
margin-right: 8px;
position: relative;
width: 32px;
> svg {
background: #ffffff;
border-radius: 50%;
border: 1px solid #ffffff;
height: 16px;
position: absolute;
right: 0;
top: 0;
transform: translate(50%, -50%);
width: 16px;
}
.DownloadsDropdown__File__Body__Thumbnail {
border-radius: 4px;
width: 100%;
height: 100%;
&.text {
@include file-icon('./thumbnails/text.svg');
}
&.audio {
@include file-icon('./thumbnails/audio.svg');
}
&.video {
@include file-icon('./thumbnails/video.svg');
}
&.ppt {
@include file-icon('./thumbnails/ppt.svg');
}
&.generic,
&.other {
@include file-icon('./thumbnails/generic.svg');
}
&.code {
@include file-icon('./thumbnails/code.svg');
}
&.excel {
@include file-icon('./thumbnails/excel.svg');
}
&.word {
@include file-icon('./thumbnails/word.svg');
}
&.pdf {
@include file-icon('./thumbnails/pdf.svg');
}
&.patch {
@include file-icon('./thumbnails/patch.svg');
}
&.image {
@include file-icon('./thumbnails/image.svg');
}
&.zip {
@include file-icon('./thumbnails/zip.svg');
}
}
}
.DownloadsDropdown__File__Body__Details {
margin-right: 8px;
/* 100% - thumbnail width - three dot button width - margins of first 2 elements */
@ -483,15 +415,6 @@ body {
.DownloadsDropdown__File__Body {
align-items: flex-start;
.DownloadsDropdown__File__Body__Thumbnail__Container {
background: rgba(221, 223, 228, 0.08);
> svg {
background: #1f1f1f;
border-color: #1f1f1f;
}
}
.DownloadsDropdown__File__Body__Details {
.DownloadsDropdown__File__Body__Details__Filename {
color: rgba(221, 223, 228, 1);