Skip to content

Commit 446ae53

Browse files
committed
fix: tests and address comment.
1 parent 4a9861c commit 446ae53

File tree

2 files changed

+9
-7
lines changed
  • e2e/steps
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/document-[document]/settings

2 files changed

+9
-7
lines changed

e2e/steps/pro-project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function enterCreditCard(page: Page) {
1414
state: 'visible'
1515
});
1616
await page.getByPlaceholder('cardholder').fill('Test User');
17-
const stripe = page.frameLocator('[title="Secure payment input frame"]');
17+
const stripe = page.locator('[title="Secure payment input frame"]').nth(0).contentFrame();
1818
await stripe.locator('id=Field-numberInput').fill('4242424242424242');
1919
await stripe.locator('id=Field-expiryInput').fill('1250');
2020
await stripe.locator('id=Field-cvcInput').fill('123');

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/document-[document]/settings/+page.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import { Dependencies } from '$lib/constants';
1414
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
1515
import { collection } from '../../store';
16-
import { page } from '$app/stores';
16+
import { page } from '$app/state';
1717
import { Alert } from '@appwrite.io/pink-svelte';
1818
1919
let showDelete = false;
@@ -23,13 +23,15 @@
2323
2424
async function updatePermissions() {
2525
try {
26+
const { $databaseId, $collectionId, $id: documentId } = $doc;
27+
2628
await sdk
27-
.forProject($page.params.region, $page.params.project)
29+
.forProject(page.params.region, page.params.project)
2830
.databases.updateDocument(
29-
$doc.$databaseId,
30-
$doc.$collectionId,
31-
$doc.$id,
32-
$doc,
31+
$databaseId,
32+
$collectionId,
33+
documentId,
34+
undefined,
3335
permissions
3436
);
3537
await invalidate(Dependencies.DOCUMENT);

0 commit comments

Comments
 (0)