Skip to content

Commit a229b93

Browse files
committed
Fix e2e tests
1 parent 4f97ed4 commit a229b93

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

data-browser/tests/e2e.spec.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ test.describe('data-browser', async () => {
8282
// Sign out
8383
await page.click('text=user settings');
8484
await page.click('[data-test="sign-out"]');
85-
await expect(page.locator('text=Enter your Agent secret')).toBeVisible();
85+
await page.click('text=Sign in');
86+
await expect(page.locator('#current-password')).toBeVisible();
8687
await page.reload();
87-
await expect(page.locator('text=Enter your Agent secret')).toBeVisible();
88+
await page.click('text=Sign in');
89+
await expect(page.locator('#current-password')).toBeVisible();
8890
});
8991

9092
test('sign up and edit document atomicdata.dev', async ({ page }) => {
@@ -125,8 +127,8 @@ test.describe('data-browser', async () => {
125127
// Create folder called 'Not This folder'
126128
await page.locator('[data-test="sidebar-new-resource"]').click();
127129
await page.locator('button:has-text("folder")').click();
128-
await page.locator('[placeholder="New Folder"]').fill('Not This Folder');
129-
await page.locator(currentDialogOkButton).click();
130+
await page.locator(editableTitle).click();
131+
await page.locator(editableTitle).fill('Not This Folder');
130132

131133
// Create document called 'Avocado Salad'
132134
await page.locator('button:has-text("New Resource")').click();
@@ -140,8 +142,8 @@ test.describe('data-browser', async () => {
140142

141143
// Create folder called 'This folder'
142144
await page.locator('button:has-text("folder")').click();
143-
await page.locator('[placeholder="New Folder"]').fill('This Folder');
144-
await page.locator(currentDialogOkButton).click();
145+
await page.locator(editableTitle).click();
146+
await page.locator(editableTitle).fill('This Folder');
145147

146148
// Create document called 'Avocado Salad'
147149
await page.locator('button:has-text("New Resource")').click();
@@ -582,6 +584,7 @@ async function signIn(page: Page) {
582584
// If there are any issues with this agent, try creating a new one https://atomicdata.dev/invites/1
583585
const test_agent =
584586
'eyJzdWJqZWN0IjoiaHR0cHM6Ly9hdG9taWNkYXRhLmRldi9hZ2VudHMvaElNWHFoR3VLSDRkM0QrV1BjYzAwUHVFbldFMEtlY21GWStWbWNVR2tEWT0iLCJwcml2YXRlS2V5IjoiZkx0SDAvY29VY1BleFluNC95NGxFemFKbUJmZTYxQ3lEekUwODJyMmdRQT0ifQ==';
587+
await page.click('text=Sign in');
585588
await page.click('#current-password');
586589
await page.fill('#current-password', test_agent);
587590
await expect(await page.locator('text=Edit profile')).toBeVisible();

0 commit comments

Comments
 (0)