Skip to content

Commit 7786384

Browse files
committed
chore: refactor file
1 parent a16f21e commit 7786384

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

cypress/e2e/page/more-page-action.cy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { TestConfig, logTestEnvironment } from '../../support/test-config';
1+
import { logTestEnvironment } from '../../support/test-config';
22
import { setupCommonExceptionHandlers } from '../../support/exception-handlers';
33
import { TestTool } from '../../support/page-utils';
44
import { PageSelectors, waitForReactUpdate } from '../../support/selectors';
55

66
describe('More Page Actions', () => {
7-
const { apiUrl, gotrueUrl } = TestConfig;
87
const newPageName = 'Renamed Test Page';
98
let testEmail: string;
109

cypress/e2e/page/publish-page.cy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { TestConfig, logTestEnvironment } from '../../support/test-config';
1+
import { logTestEnvironment } from '../../support/test-config';
22
import { setupCommonExceptionHandlers } from '../../support/exception-handlers';
33
import { TestTool } from '../../support/page-utils';
44
import { PageSelectors, ShareSelectors, SidebarSelectors } from '../../support/selectors';
55

66
describe('Publish Page Test', () => {
7-
const { apiUrl, gotrueUrl } = TestConfig;
87
let testEmail: string;
98
const pageName = 'publish page';
109
const pageContent = 'This is a publish page content';

cypress/support/e2e.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ import 'cypress-plugin-api';
1919
import 'cypress-real-events';
2020
import './commands';
2121

22-
// Global hooks for console logging
22+
// Global hooks for console logging and setup
2323
beforeEach(() => {
24+
// Set global viewport size for all tests
25+
// This provides consistent viewport across all E2E tests
26+
// Individual tests can override if needed with cy.viewport()
27+
cy.viewport(1280, 720);
28+
2429
// Start capturing console logs for each test
2530
cy.startConsoleCapture();
26-
31+
2732
// Mock billing endpoints to prevent 502 errors in console
2833
cy.intercept('GET', '**/billing/api/v1/active-subscription/**', {
2934
statusCode: 200,
@@ -32,7 +37,7 @@ beforeEach(() => {
3237
status: 'free'
3338
}
3439
}).as('billingSubscription');
35-
40+
3641
// Mock other billing endpoints
3742
cy.intercept('GET', '**/billing/api/**', {
3843
statusCode: 200,

0 commit comments

Comments
 (0)