test: fix integration tests

pull/2515/head
Audric Ackermann 3 years ago
parent 3e4d9b4ac3
commit 2010fa89f5

@ -131,8 +131,15 @@
// } // }
// } // }
input { input[type='radio'] {
width: inherit;
}
input:not([type='radio']) {
width: 100%; width: 100%;
}
input {
padding: 8px; padding: 8px;
margin-bottom: 15px; margin-bottom: 15px;
border: 0; border: 0;

@ -79,6 +79,7 @@ export const SessionRadio = (props: Props) => {
filledSize={filledSize * 2} filledSize={filledSize * 2}
outlineOffset={outlineOffset} outlineOffset={outlineOffset}
selectedColor={selectedColor} selectedColor={selectedColor}
data-testid={`input-${value}`}
/> />
<StyledLabel <StyledLabel
role="button" role="button"
@ -88,6 +89,7 @@ export const SessionRadio = (props: Props) => {
outlineOffset={outlineOffset} outlineOffset={outlineOffset}
beforeMargins={beforeMargins} beforeMargins={beforeMargins}
aria-label={label} aria-label={label}
data-testid={`label-${value}`}
> >
{label} {label}
</StyledLabel> </StyledLabel>

@ -3,6 +3,7 @@ import { openAppAndWait } from './setup/open';
import { beforeAllClean, forceCloseAllWindows } from './setup/beforeEach'; import { beforeAllClean, forceCloseAllWindows } from './setup/beforeEach';
import { newUser } from './setup/new_user'; import { newUser } from './setup/new_user';
import { clickOnTestIdWithText, waitForTestIdWithText } from './utils'; import { clickOnTestIdWithText, waitForTestIdWithText } from './utils';
import { sleepFor } from '../../session/utils/Promise';
let window: Page | undefined; let window: Page | undefined;
test.beforeEach(beforeAllClean); test.beforeEach(beforeAllClean);
@ -30,7 +31,9 @@ test('Change profile picture/avatar', async () => {
await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy'); await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy');
await clickOnTestIdWithText(window, 'modal-close-button'); await clickOnTestIdWithText(window, 'modal-close-button');
await sleepFor(500);
const leftpaneAvatarContainer = await waitForTestIdWithText(window, 'leftpane-primary-avatar'); const leftpaneAvatarContainer = await waitForTestIdWithText(window, 'leftpane-primary-avatar');
await sleepFor(500);
const screenshot = await leftpaneAvatarContainer.screenshot({ const screenshot = await leftpaneAvatarContainer.screenshot({
type: 'jpeg', type: 'jpeg',
// path: 'avatar-updated-blue', // path: 'avatar-updated-blue',

@ -29,9 +29,10 @@ test('Delete account from swarm', async () => {
// Click on clear all data // Click on clear all data
await clickOnTestIdWithText(windowA, 'clear-data-settings-menu-item', 'Clear Data'); await clickOnTestIdWithText(windowA, 'clear-data-settings-menu-item', 'Clear Data');
// Select entire account // Select entire account
await clickOnMatchingText(windowA, 'Entire Account'); await clickOnTestIdWithText(windowA, 'label-device_and_network', 'Clear Device and Network');
// Confirm deletion by clicking i am sure // Confirm deletion by clicking Clear, twice
await clickOnMatchingText(windowA, 'I am sure'); await clickOnMatchingText(windowA, 'Clear');
await clickOnMatchingText(windowA, 'Clear');
await windowA.waitForTimeout(7500); await windowA.waitForTimeout(7500);
// Wait for window to close and reopen // Wait for window to close and reopen
await sleepFor(10000, true); await sleepFor(10000, true);

Loading…
Cancel
Save