Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MS] Fixed sync icon in file details dialog #8597

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/views/files/FileDetailsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
/>
<ion-icon
class="cloud-overlay"
:class="entry.needSync ? 'cloud-overlay-ok' : 'cloud-overlay-ko'"
:icon="entry.needSync ? cloudDone : cloudOffline"
:class="entry.needSync ? 'cloud-overlay-ko' : 'cloud-overlay-ok'"
:icon="entry.needSync ? cloudOffline : cloudDone"
/>
<div class="file-info-basic">
<ion-text class="file-info-basic__name title-h4">
Expand Down
17 changes: 17 additions & 0 deletions client/tests/pw/e2e/file_details.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ for (const testData of TEST_DATA) {
await expect(files.nth(testData.index).locator('.file-lastUpdate')).toHaveText(/^((?:one|\d{1,2}) minutes? ago|< 1 minute)$/);
expect(connected.locator('.file-context-menu')).toBeHidden();
expect(connected.locator('.file-details-modal')).toBeHidden();

const syncElem = files.nth(testData.index).locator('.cloud-overlay');
const classes = await syncElem.evaluate((node) => Array.from(node.classList.values()));
const isSynced = classes.includes('cloud-overlay-ok');

if (!isSynced) {
await expect(syncElem).toHaveTheClass('cloud-overlay-ko');
}

await files.nth(testData.index).hover();
await files.nth(testData.index).locator('.options-button').click();
expect(connected.locator('.file-context-menu').getByRole('listitem')).toHaveCount(8);
Expand All @@ -36,6 +45,14 @@ for (const testData of TEST_DATA) {
const modal = connected.locator('.file-details-modal');
await expect(modal.locator('.ms-modal-header__title ')).toHaveText(new RegExp(`^Details on ${nameMatcher}$`));
await expect(modal.locator('.file-info-basic__edit')).toHaveText(/^Updated: [A-Za-z]{3} \d{1,2}, 20[0-9]{2}$/);

const icon = modal.locator('.cloud-overlay');
if (isSynced) {
await expect(icon).toHaveTheClass('cloud-overlay-ok');
} else {
await expect(icon).toHaveTheClass('cloud-overlay-ko');
}

const details = modal.locator('.file-info-details-item');
await expect(details).toHaveCount(testData.isFile ? 3 : 2);
await expect(details.nth(0).locator('.file-info-details-item__title')).toHaveText('Created');
Expand Down
1 change: 1 addition & 0 deletions newsfragments/8597.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed synchronization icon displaying the wrong status in file details dialog