Skip to content

Commit

Permalink
Fix messaging tests (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
annarhughes authored Oct 29, 2024
1 parent 02e8489 commit e1e388f
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/community-pr-check-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
types: [opened, edited]
branches:
- "develop"
- 'develop'

jobs:
Check-For-Linked-Issue:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/community-pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: '20'

- name: Install dependencies
run: npm install @actions/github @actions/core
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/tests/create-access-code.badoo.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Create access code page should display', () => {
.should('have.prop', 'type', 'radio')
.should('have.value', 'therapy')
.parents('label')
.contains('Courses, 1:1 chat and six therapy sessions');
.contains('Courses, messaging and six therapy sessions');

cy.get('button').contains('Create access codes').should('have.prop', 'type', 'submit');
});
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/tests/initial-exploration.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe('Initial exploration', () => {
it('should be able to explore all pages', () => {
cy.visit('/');
cy.get('h1', { timeout: 8000 }).contains('Join us on your healing journey');
cy.get(`[qa-id=secondary-nav-chat-button]`).click();
cy.get(`[qa-id=secondary-nav-messaging-button]`).click();
cy.get('a', { timeout: 8000 }).contains('Get started');
cy.get(`[qa-id=secondary-nav-grounding-button]`).click();
cy.get('a', { timeout: 8000 }).contains('Get started');
Expand All @@ -21,7 +21,7 @@ describe('Initial exploration', () => {
it('a user with partner referral should be able to explore all pages for partners', () => {
cy.visit('/welcome/bumble');
cy.get('h1', { timeout: 8000 }).contains('Join us on your healing journey');
cy.get(`[qa-id=secondary-nav-chat-button]`).click();
cy.get(`[qa-id=secondary-nav-messaging-button]`).click();
cy.get('a', { timeout: 8000 }).contains('Get started');
cy.get(`[qa-id=secondary-nav-grounding-button]`).click();
cy.get('a', { timeout: 8000 }).contains('Get started');
Expand Down
29 changes: 0 additions & 29 deletions cypress/integration/tests/user-chat.cy.tsx

This file was deleted.

31 changes: 31 additions & 0 deletions cypress/integration/tests/user-messaging.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
describe('A logged in public user can', () => {
const email = `cypresstestemail+${Date.now()}@chayn.co`;
const password = 'testtesttest';

before(() => {
cy.cleanUpTestState();
cy.createUser({ emailInput: email, passwordInput: password });
cy.logInWithEmailAndPassword(email, password);
});

it('Navigate to the messaging page and begin a messaging', () => {
cy.visit('/'); //intitial home page visit
cy.get(`[qa-id=secondary-nav-messaging-button]`, { timeout: 8000 }).should('exist').click(); //go to messaging page
});

it('see the More about section', () => {
cy.visit('/messaging');
cy.get('h2').contains('Tell us what’s on your mind');
cy.get('h2').contains('Meet the Bloom team');
cy.get('h2').contains('More about how Bloom’s Messaging works');
cy.checkImage('alt', 'Illustration of a person sitting');
cy.get('p').contains('Who is 1-1 Messaging for?');
cy.get('p').contains(
'1-1 Messaging is available for everyone using Bloom, regardless of your background, race, age, disability, religion or belief, sexuality, gender identity or expression, or life circumstances—we are here for you.',
);
});

after(() => {
cy.logout();
});
});
12 changes: 11 additions & 1 deletion scripts/github-actions/checkPRLinkedIssue.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ async function main({ g, c }) {
const prBody = context.payload.pull_request.body;
const prNumber = context.payload.pull_request.number;
const prOwner = context.payload.pull_request.user.login;
const exemptPrOwners = ['kyleecodes', 'swetha-charles', 'eleanorreem', 'annarhughes', 'tarebyte', 'dependabot[bot]', 'dependabot', 'github-actions[bot]', 'github-actions'];
const exemptPrOwners = [
'kyleecodes',
'swetha-charles',
'eleanorreem',
'annarhughes',
'tarebyte',
'dependabot[bot]',
'dependabot',
'github-actions[bot]',
'github-actions',
];
const regex =
/(?!<!--)(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*#(\d+)(?![^<]*-->)/gi;
const match = prBody.match(regex);
Expand Down

0 comments on commit e1e388f

Please sign in to comment.