Skip to content

Commit

Permalink
Merge branch 'latest' into 2849-add-photogallery-offscreen-text
Browse files Browse the repository at this point in the history
  • Loading branch information
paruchurisilpa authored Aug 7, 2019
2 parents 94b04fe + 0a32d95 commit 3fe570a
Show file tree
Hide file tree
Showing 57 changed files with 1,405 additions and 1,003 deletions.
1 change: 1 addition & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'storybook-chromatic';
import React, { Fragment } from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { create } from '@storybook/theming';
Expand Down
32 changes: 32 additions & 0 deletions 3rdPartyCypress/cypress/integration/dataEndpoints.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
describe('Data endpoints 200 and return JSON', () => {
it('should pass for front pages', () => {
cy.testResponseCodeAndType(
'https://www.bbc.com/igbo.json',
200,
'application/json',
);
cy.testResponseCodeAndType(
'https://www.bbc.com/pidgin.json',
200,
'application/json',
);

cy.testResponseCodeAndType(
'https://www.bbc.com/yoruba.json',
200,
'application/json',
);
});
it('should pass for articles', () => {
cy.testResponseCodeAndType(
'https://www.bbc.com/news/articles/c5ll353v7y9o.json',
200,
'application/json',
);
cy.testResponseCodeAndType(
'https://www.bbc.com/persian/articles/c7eel0lmr4do.json',
200,
'application/json',
);
});
});
11 changes: 11 additions & 0 deletions 3rdPartyCypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// These are deliberately duplicated from the other cypress folder to avoid interrelationships blocking changes.
Cypress.Commands.add('testResponseCodeAndType', (path, responseCode, type) => {
cy.request({ url: path, failOnStatusCode: false }).then(
({ status, headers }) => {
expect(status).to.eq(responseCode);
expect(headers['content-type']).to.include(type);
// Always ensure we're not seeing the Mozart fallback
expect(headers).not.to.have.property('x-mfa');
},
);
});
2 changes: 2 additions & 0 deletions 3rdPartyCypress/cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './commands';

Cypress.Screenshot.defaults({
screenshotOnRunFailure: false,
});
116 changes: 0 additions & 116 deletions cypress/integration/ampSpec.js

This file was deleted.

File renamed without changes.
128 changes: 0 additions & 128 deletions cypress/integration/articleBodySpec.js

This file was deleted.

11 changes: 0 additions & 11 deletions cypress/integration/dataSpec.js

This file was deleted.

38 changes: 0 additions & 38 deletions cypress/integration/footerSpec.js

This file was deleted.

Loading

0 comments on commit 3fe570a

Please sign in to comment.