message: Test machine-readable checkbox and company loading in generator
diff: @@ -40,4 +40,35 @@ describe('Generator component', () => {
  expect(win.pdfWorker).respondTo('onerror');
  });
  });
  +
  + it("reflects 'Get data in a machine-readable format' checkbox in the generated request [false]", () => {
  + cy.get('#request-flags-data-portability').uncheck();
  + cy.contains('Send email').click();
  + cy.contains('Default email software')
  + .should('have.attr', 'href')
  + .and('not.match', /^.*?machine-readable.*$/);
  + });
  +
  + it("reflects 'Get data in a machine-readable format' checkbox in the generated request [true]", () => {
  + cy.get('#request-flags-data-portability').check();
  + cy.contains('Send email').click();
  + cy.contains('Default email software')
  + .should('have.attr', 'href')
  + .and('match', /^.*?machine-readable.*$/);
  + });
  +
  + it('loads company from slug', () => {
  + cy.visit('/generator/#!company=facebook');
  + cy.reload();
  + cy.contains('Facebook Ireland Ltd.');
  + });
  +
  + it('loads companies from slug', () => {
  + cy.visit('/generator/#!companies=facebook,google');
  + cy.reload();
  + cy.contains('Facebook Ireland Ltd.');
  + cy.contains('Next request').click();
  + cy.contains('New request').click();
  + cy.contains('Google LLC');
  + });
  });
  