Skip to content

Commit 8bab90d

Browse files
committed
Update e2e tests
1 parent 57e2e5c commit 8bab90d

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

apps/playground/cypress/e2e/provider.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ beforeEach(() => {
1919
cy.intercept('https://api-iam.intercom.io/messenger/web/conversations').as(
2020
'intercomConversations',
2121
);
22-
cy.intercept(
23-
'https://api-iam.intercom.io/messenger/web/self_serve_suggestions',
24-
).as('intercomSelfServeSuggestions');
2522
});
2623

2724
describe('provider', () => {
@@ -86,13 +83,13 @@ describe('provider with events', () => {
8683
cy.get('iframe[name="intercom-messenger-frame"]').then(($iframe) => {
8784
const $body = $iframe.contents().find('body');
8885

89-
cy.wrap($body).contains('Ask a question').click();
86+
cy.wrap($body).contains('Send us a message').click();
9087

9188
cy.wait('@intercomHome');
9289
cy.wait('@intercomConversations');
9390

9491
cy.wrap($body)
95-
.find('textarea[name="message"]')
92+
.find('textarea')
9693
.should('exist')
9794
.type('hello')
9895
.type('{enter}');
@@ -106,8 +103,6 @@ describe('provider with events', () => {
106103
.type('hello@email.com')
107104
.type('{enter}');
108105

109-
cy.wait('@intercomSelfServeSuggestions');
110-
111106
cy.get('[data-cy=onUserEmailSuppliedText]').should(
112107
'have.text',
113108
'on user email supplied was called',

apps/playground/cypress/e2e/show.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('show', () => {
2727
.then(($iframe) => {
2828
const $body = $iframe.contents().find('body');
2929

30-
cy.wrap($body).contains('Ask a question');
30+
cy.wrap($body).contains('Send us a message');
3131
});
3232
});
3333
});
@@ -60,7 +60,7 @@ describe('showNewMessage', () => {
6060
.then(($iframe) => {
6161
const $body = $iframe.contents().find('body');
6262

63-
cy.wrap($body).contains('Ask for the team if needed');
63+
cy.wrap($body).contains('Ask us anything, or share your feedback.');
6464
cy.wrap($body).find('button[data-testid="go-back"]').should('exist');
6565
});
6666
});
@@ -79,7 +79,7 @@ describe('showNewMessage', () => {
7979

8080
cy.wrap($body).find('button[data-testid="go-back"]').should('exist');
8181
cy.wrap($body)
82-
.find('textarea[name="message"]')
82+
.find('textarea')
8383
.should('exist')
8484
.should('have.value', 'pre-definded-content');
8585
});

apps/playground/cypress/e2e/startSurvey.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ describe('startSurvey', () => {
3232

3333
cy.wait('@intercomStartSurvey');
3434

35-
cy.get('iframe[name="intercom-modal-frame"]').then(($iframe) => {
35+
cy.get('iframe[name="intercom-banner-survey-frame"]').then(($iframe) => {
3636
const $body = $iframe.contents().find('body');
3737

38-
cy.wrap($body).contains(
39-
'Want to see your feature requests on our roadmap?',
40-
);
38+
cy.wrap($body).contains('What is the highest mountain in the world');
4139
});
4240
});
4341
});

apps/playground/src/modules/useIntercom/useIntercom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const RawUseIntercomPage = () => {
148148
showSpace('messages');
149149
}, [showSpace]);
150150

151-
const handleStartSurvey = () => startSurvey(29938254);
151+
const handleStartSurvey = () => startSurvey(45288402);
152152

153153
const handleShowNews = React.useCallback(() => {
154154
showNews(33910172);

0 commit comments

Comments
 (0)