Fixed sync tests
This commit is contained in:
@@ -26,11 +26,11 @@ async function ready(page) {
|
||||
async function create(page) {
|
||||
await ready(page);
|
||||
await page.getByLabel('Nom de cet appareil', { exact: true }).fill('Téléphone test');
|
||||
await page.getByRole('button', { name: 'Préparer la synchronisation', exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Créer mon coffre', exact: true }).click();
|
||||
await page.getByText('Afficher le document pour le copier', { exact: true }).click();
|
||||
const recovery = await page.getByLabel('Contenu du document de secours').inputValue();
|
||||
await page.getByRole('checkbox', { name: 'J’ai conservé une copie du document à part' }).check();
|
||||
await page.getByRole('button', { name: 'Activer la synchronisation', exact: true }).click();
|
||||
await page.getByRole('button', { name: 'Créer le coffre et activer la synchronisation', exact: true }).click();
|
||||
await expect(page.getByRole('heading', { name: 'Appareils autorisés', exact: true })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Synchroniser maintenant', exact: true })).toBeEnabled();
|
||||
await expect(page.locator('fieldset')).not.toContainText('Opération impossible');
|
||||
@@ -54,6 +54,8 @@ async function pair(a, b) {
|
||||
await a.getByLabel('Nom du nouvel appareil', { exact: true }).fill('Ordinateur test');
|
||||
await a.getByRole('checkbox', { name: 'Les deux empreintes sont identiques' }).check();
|
||||
await a.getByRole('button', { name: 'Autoriser cet appareil', exact: true }).click();
|
||||
await expect(b.getByRole('heading', { name: 'Choisir les données à conserver', exact: true })).toBeVisible({ timeout: 15000 });
|
||||
await b.getByRole('button', { name: 'Tout conserver du coffre existant', exact: true }).click();
|
||||
await expect(b.getByRole('heading', { name: 'Appareils autorisés', exact: true })).toBeVisible({ timeout: 15000 });
|
||||
await sync(b);
|
||||
}
|
||||
@@ -85,6 +87,7 @@ test('association, modification hors ligne, conflit, rôle et révocation entre
|
||||
await editTask(page, 'Modification téléphone'); await editTask(other, 'Modification ordinateur');
|
||||
await page.context().setOffline(false); await sync(page);
|
||||
await otherContext.setOffline(false); await sync(other); await sync(page);
|
||||
await page.getByRole('button', { name: 'Fusion manuelle détaillée (1)', exact: true }).click();
|
||||
await expect(page.getByRole('heading', { name: 'Versions à départager (1)', exact: true })).toBeVisible();
|
||||
await expect(page.locator('.conflict')).toContainText('Modification téléphone');
|
||||
await expect(page.locator('.conflict')).toContainText('Modification ordinateur');
|
||||
@@ -96,6 +99,7 @@ test('association, modification hors ligne, conflit, rôle et révocation entre
|
||||
expect((await store(other, 'entries', 'getAll'))[0].task).toBe('Modification ordinateur');
|
||||
await other.getByRole('button', { name: 'Utiliser cet appareil pour les automatismes', exact: true }).click();
|
||||
await expect(other.getByRole('button', { name: 'Utiliser cet appareil pour les automatismes', exact: true })).toHaveCount(0);
|
||||
await page.getByRole('button', { name: 'Retour aux appareils', exact: true }).click();
|
||||
await sync(page);
|
||||
await expect(page.getByRole('button', { name: 'Utiliser cet appareil pour les automatismes', exact: true })).toBeVisible();
|
||||
await page.getByRole('button', { name: 'Retirer cet appareil…', exact: true }).click();
|
||||
|
||||
Reference in New Issue
Block a user