Skip to content

Commit

Permalink
Try timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
r100-stack committed Jan 31, 2025
1 parent e6449ab commit b7ef253
Show file tree
Hide file tree
Showing 77 changed files with 3,314 additions and 9,178 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ jobs:
- run: pnpm install

- name: Install Cypress binary if not found
run: pnpx cypress@14.0.1 install
run: pnpx cypress@13.8.1 install

- name: Run a11y tests
run: pnpm run test --filter=a11y
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ describe('Alert', () => {
it(testName, () => {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 1 addition & 1 deletion apps/react-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/node": "*",
"@types/react": "*",
"@types/react-dom": "*",
"cypress": "14.0.1",
"cypress": "13.8.1",
"cypress-image-diff-js": "1.30.1",
"eslint": "*",
"eslint-config-prettier": "^8.8.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-workshop/scripts/run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const spawn = require('child_process').spawn;
const args = process.argv.slice(2).join(' ');

const IMAGE_NAME = 'cypress/included:14.0.1'; // https://hub.docker.com/r/cypress/included
const IMAGE_NAME = 'cypress/included:13.8.1'; // https://hub.docker.com/r/cypress/included

// Need to use this script because current directory variable is different in different shells
const dockerProcess = spawn(
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Alert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe('Alert', () => {
it(testName, () => {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Anchor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Anchor', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/Avatar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('Avatar', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

// Hide images if present to avoid uncertainties in testing
if (testName === 'With Image') {
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/AvatarGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('AvatarGroup', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

if (testName.includes('Tooltip')) {
cy.get('div').contains('3').trigger('mouseenter');
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Badge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Badge', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Blockquote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Blockquote', () => {
it(testName, () => {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/Breadcrumbs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('Breadcrumbs', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

if (testName.includes('Overflow')) {
cy.get('small').hide();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Button.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ describe('Button', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/ButtonGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('ButtonGroup', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

if (testName.includes('Overflow')) {
cy.get('small').hide();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Carousel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Carousel', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.wait(1000); // wait for dots list to finish scrolling
cy.compareSnapshot(testName);
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Checkbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ describe('Checkbox', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Code.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Code', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/ColorPicker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('ColorPicker', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.get('#ladle-root').within(() => {
cy.get('button').first().click();
});
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/ComboBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('ComboBox', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

if (testName === 'Multiple Select') {
// Hide the dividers and checkboxs/labels for test image
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/DatePicker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe('DatePicker', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.get('#picker-button').siblings('span').hide();
cy.get('#picker-button').click();
cy.wait(30);
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Dialog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('Dialog', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.get('#ladle-root').within(() => {
cy.get('button').first().click();
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/DropdownButton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('DropdownButton', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(`${testName} (Closed)`);
cy.get('#ladle-root').within(() => {
cy.get('button').click();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/DropdownMenu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe('DropdownMenu', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(`${testName} (Closed)`);
cy.get('#ladle-root').within(() => {
cy.get('button').first().click();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/ExpandableBlock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ describe('ExpandableBlock', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(`${testName} (Closed)`);
if (testName !== 'Disabled') {
cy.get('[type=button]').first().click();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Fieldset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Fieldset', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/FileUpload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ describe('FileUpload', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
if (
testName === 'Default File Upload Card' ||
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Flex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Flex', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Footer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ describe('Footer', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
1 change: 1 addition & 0 deletions apps/react-workshop/src/Header.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('Header', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

// Hide images if present to avoid uncertainties in testing
if (
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Icon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ describe('Icon', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/IconButton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ describe('IconButton', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);

if (index === 0) {
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/IdeasButton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('IdeasButton', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/InformationPanel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('InformationPanel', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.get('#ladle-root').within(() => {
cy.get('button').first().click();
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Input', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/InputGrid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('InputGrid', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/InputGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('InputGroup', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/InputWithDecoration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('InputWithDecorations', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Kbd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ describe('Kbd', () => {

it(testName, () => {
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Label.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Label', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
3 changes: 3 additions & 0 deletions apps/react-workshop/src/LabeledInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ describe('LabeledInput', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand All @@ -35,6 +37,7 @@ describe('LabeledInput', () => {
it(newTestName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

// Click the input to show the status outline
cy.get('input').first().click();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/LabeledSelect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ describe('LabeledSelect', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
3 changes: 3 additions & 0 deletions apps/react-workshop/src/LabeledTextarea.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ describe('LabeledTextarea', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand All @@ -32,6 +34,7 @@ describe('LabeledTextarea', () => {
it(newTestName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

// Click the textarea to show the status outline
cy.get('textarea').first().click();
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/List.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ describe('NotificationMarker', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.compareSnapshot(testName);
});
});
Expand Down
2 changes: 2 additions & 0 deletions apps/react-workshop/src/Modal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Modal', () => {
it(testName, function () {
const id = Cypress.storyId(storyPath, testName);
cy.visit('/', { qs: { mode: 'preview', story: id } });
cy.wait(300);

cy.get('#ladle-root').within(() => {
cy.get('button').first().click();
});
Expand Down
Loading

0 comments on commit b7ef253

Please sign in to comment.