Skip to content

Commit

Permalink
Add
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienSvstr committed Jan 29, 2025
1 parent 8e33a60 commit 21c2390
Showing 3 changed files with 11 additions and 13 deletions.
7 changes: 5 additions & 2 deletions client/src/components/organizations/OrganizationCard.vue
Original file line number Diff line number Diff line change
@@ -203,12 +203,15 @@ function getLastLoginText(): string {

.organization-card-expiration {
border-radius: var(--parsec-radius-12);
padding: 0.1875rem 0.375rem;
padding: 0.25rem 0.5rem;
position: absolute;
bottom: 0;
right: 0;
background: var(--parsec-color-light-primary-700);
color: var(--parsec-color-light-secondary-white);

&.expired {
background: var(--parsec-color-light-secondary-text);
background: var(--parsec-color-light-secondary-grey);
color: var(--parsec-color-light-secondary-white);
}
}
2 changes: 1 addition & 1 deletion client/src/views/home/HomePageHeader.vue
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
@click="$emit('aboutClick')"
v-if="!showBackButton"
>
<ion-icon size="small" />
<ion-icon :icon="informationCircle" />
</ion-button>
<!-- doc button -->
<ion-button
15 changes: 5 additions & 10 deletions client/tests/e2e/specs/home_page.spec.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import { answerQuestion, expect, fillIonInput, msTest, sortBy } from '@tests/e2e
const USER_NAMES = ['Alicey McAliceFace', 'Boby McBobFace', 'Malloryy McMalloryFace'];

msTest('Home default state with devices', async ({ home }) => {
await expect(home.locator('.organization-title')).toHaveText('Your organizations');
await expect(home.locator('.organization-title')).toHaveText('Access to your organizations');
await expect(home.locator('#organization-filter-select')).toHaveText('Organization name');
await expect(home.locator('#create-organization-button')).toHaveText('Create or join');
await expect(home.locator('#search-input-organization')).toBeVisible();
@@ -152,30 +152,25 @@ msTest('Logout and go back to devices list', async ({ home }) => {
const buttons = home.locator('.profile-header-popover').locator('.main-list').getByRole('listitem');
await buttons.nth(2).click();
await answerQuestion(home, true);
await expect(home.locator('.organization-title')).toHaveText('Your organizations');
await expect(home.locator('.organization-title')).toHaveText('Access to your organizations');
await expect(home).toBeHomePage();
});

msTest('Check header buttons', async ({ home }) => {
await expect(home.locator('.topbar-buttons').locator('ion-button')).toHaveText([
'Documentation',
'Contact us',
'Settings',
'Customer area',
]);
await expect(home.locator('.topbar-buttons').locator('ion-button')).toHaveCount(5);
});

msTest('Open documentation', async ({ home }) => {
const newTabPromise = home.waitForEvent('popup');
await home.locator('.topbar-buttons').locator('ion-button').nth(0).click();
await home.locator('.topbar-buttons').locator('ion-button').nth(1).click();
const newTab = await newTabPromise;
await newTab.waitForLoadState();
await expect(newTab).toHaveURL(new RegExp('https://docs.parsec.cloud/(en|fr)/[a-z0-9-+.]+'));
});

msTest('Open feedback', async ({ home }) => {
const newTabPromise = home.waitForEvent('popup');
await home.locator('.topbar-buttons').locator('ion-button').nth(1).click();
await home.locator('.topbar-buttons').locator('ion-button').nth(2).click();
const newTab = await newTabPromise;
await newTab.waitForLoadState();
await expect(newTab).toHaveURL(new RegExp('https://sign(-dev)?.parsec.cloud/contact'));

0 comments on commit 21c2390

Please sign in to comment.