Răsfoiți Sursa

Merge pull request #8882 from weseek/support/replace-tests-with-playwright

support: Replace tests with Playwright (Access to /me page)
Yuki Takei 1 an în urmă
părinte
comite
335d547407

+ 2 - 1
apps/app/nodemon.json

@@ -3,6 +3,7 @@
   "ignore": [
     ".next",
     "public/static",
-    "package.json"
+    "package.json",
+    "playwright"
   ]
 }

+ 7 - 0
apps/app/playwright/20-basic-features/access-to-page.spec.ts

@@ -13,3 +13,10 @@ test('get h1', async({ page }) => {
   // Expects page to have a heading with the name of Installation.
   await expect(page.getByRole('heading').filter({ hasText: /\/Sandbox/ })).toBeVisible();
 });
+
+test('Access to /me page', async({ page }) => {
+  await page.goto('/me');
+
+  // Expect the UserSettgins-specific elements to be present when accessing /me (UserSettgins)
+  await expect(page.getByTestId('grw-user-settings')).toBeVisible();
+});

+ 0 - 26
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--access-to-page.cy.ts

@@ -119,32 +119,6 @@ context('Access to page', () => {
 });
 
 
-context('Access to /me page', () => {
-  const ssPrefix = 'access-to-me-page-';
-
-  beforeEach(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-  });
-
-  it('/me is successfully loaded', () => {
-    cy.visit('/me');
-
-    cy.getByTestid('grw-user-settings').should('be.visible');
-
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}-me`);
-  });
-
-  // it('Draft page is successfully shown', () => {
-  //   cy.visit('/me/drafts');
-  //   cy.screenshot(`${ssPrefix}-draft-page`);
-  // });
-
-});
-
 context('Access to special pages', () => {
   const ssPrefix = 'access-to-special-pages-';