Skip to content

Commit 6884af8

Browse files
committed
Fix Cypress tests to work with Playground's new default WP URL
1 parent c0f788a commit 6884af8

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎packages/playground/website/cypress/e2e/query-api.cy.ts‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,18 @@ describe('Query API', () => {
127127

128128
describe('option `login`', () => {
129129
it('should log the user in as an admin', () => {
130-
cy.visit('/');
130+
// Specify initial WP URL because the Playground has changed
131+
// its default WP URL in the past.
132+
cy.visit('/?url=%2F');
131133
cy.wordPressDocument()
132134
.its('body')
133135
.should('have.class', 'logged-in');
134136
});
135137

136138
it('should not log the user in as an admin when not requested', () => {
137-
cy.visit('/?login=no');
139+
// Specify initial WP URL because the Playground has changed
140+
// its default WP URL in the past.
141+
cy.visit('/?login=no&url=%2F');
138142
cy.wordPressDocument()
139143
.its('body')
140144
.should('not.have.class', 'logged-in');
@@ -152,7 +156,9 @@ describe('Query API', () => {
152156

153157
describe('option `lazy`', () => {
154158
it('should defer loading the Playground assets until someone clicks on the "Run" button', () => {
155-
cy.visit('/?lazy');
159+
// Specify initial WP URL because the Playground has changed
160+
// its default WP URL in the past.
161+
cy.visit('/?lazy&url=%2F');
156162
cy.get('#lazy-load-initiator').should('exist');
157163
cy.get('.playground-viewport').should('not.exist');
158164

0 commit comments

Comments
 (0)