jam411 пре 3 година
родитељ
комит
5762377b95

+ 21 - 0
packages/app/test/cypress/integration/21-basic-features-for-guest/access-to-page.spec.ts

@@ -1,6 +1,13 @@
 context('Access to page by guest', () => {
 context('Access to page by guest', () => {
   const ssPrefix = 'access-to-page-by-guest-';
   const ssPrefix = 'access-to-page-by-guest-';
 
 
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+  });
+
   it('/Sandbox is successfully loaded', () => {
   it('/Sandbox is successfully loaded', () => {
     cy.visit('/Sandbox');
     cy.visit('/Sandbox');
     cy.get('.fa-spinner').should('not.exist');
     cy.get('.fa-spinner').should('not.exist');
@@ -46,6 +53,13 @@ context('Access to page by guest', () => {
 context('Access to /me page', () => {
 context('Access to /me page', () => {
   const ssPrefix = 'access-to-me-page-by-guest-';
   const ssPrefix = 'access-to-me-page-by-guest-';
 
 
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+  });
+
   beforeEach(() => {
   beforeEach(() => {
     // collapse sidebar
     // collapse sidebar
     cy.collapseSidebar(true);
     cy.collapseSidebar(true);
@@ -62,6 +76,13 @@ context('Access to /me page', () => {
 context('Access to special pages by guest', () => {
 context('Access to special pages by guest', () => {
   const ssPrefix = 'access-to-special-pages-by-guest-';
   const ssPrefix = 'access-to-special-pages-by-guest-';
 
 
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+  });
+
   it('/trash is successfully loaded', () => {
   it('/trash is successfully loaded', () => {
     cy.visit('/trash', {  });
     cy.visit('/trash', {  });
     cy.collapseSidebar(true, true);
     cy.collapseSidebar(true, true);

+ 2 - 0
packages/app/test/cypress/integration/30-search/search.spec.ts

@@ -155,6 +155,8 @@ context('Search all pages', () => {
     const tag = 'help';
     const tag = 'help';
     const searchText = `tag:${tag}`;
     const searchText = `tag:${tag}`;
     cy.visit('/');
     cy.visit('/');
+    cy.get('.grw-skelton').should('not.exist');
+
     // Add tag
     // Add tag
     cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click({force: true});
     cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click({force: true});
     cy.get('#edit-tag-modal').should('be.visible');
     cy.get('#edit-tag-modal').should('be.visible');