Skip to content

Commit

Permalink
BACKLOG-23358 Use api
Browse files Browse the repository at this point in the history
  • Loading branch information
AKarmanov committed Nov 8, 2024
1 parent 0e2ce86 commit 69bb1d3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/cypress/e2e/jcontent/compareStagingLive.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {JContent} from '../../page-object';
import gql from 'graphql-tag';
import {publishAndWaitJobEnding} from '@jahia/cypress';

describe('JContent preview tests', () => {
const addContent = gql`mutation MyMutation {
Expand All @@ -20,11 +21,9 @@ describe('JContent preview tests', () => {
beforeEach(() => {
cy.executeGroovy('jcontent/createSite.groovy', {SITEKEY: 'jcontentSite'});
cy.apollo({mutationFile: 'jcontent/createContent.graphql'});
cy.loginAndStoreSession(); // Edit in chief
const jcontent = JContent.visit('jcontentSite', 'en', 'pages/home');
jcontent.publishAll();
cy.get('button[data-sel-role="openInLive"]', {timeout: 5000}).should('be.visible');
publishAndWaitJobEnding('/sites/jcontentSite');
cy.apollo({mutation: addContent});
cy.loginAndStoreSession(); // Edit in chief
});

it('should open preview with url', () => {
Expand Down

0 comments on commit 69bb1d3

Please sign in to comment.