diff --git a/cypress/integration/factory/summary.spec.ts b/cypress/integration/factory/summary.spec.ts index d689a77..1cc1783 100644 --- a/cypress/integration/factory/summary.spec.ts +++ b/cypress/integration/factory/summary.spec.ts @@ -1,16 +1,16 @@ context('Factory', () => { beforeEach(() => { cy.visit('http://localhost:3000'); - cy.wait(100); - cy.contains('Build Request').parent().find('button').click(); + cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting + cy.contains('Build Request').parent().find('button').click(); }); it('switch to the factory overview', () => { - cy.get('[aria-label="factory"]').click(); + cy.get('[aria-label="factory"]').click(); }); it('view factory overview active build request details', () => { - cy.get('[aria-label="factory"]').click(); - cy.contains('Active Build Requests').parent().find('button').click(); + cy.get('[aria-label="factory"]').click(); + cy.contains('Active Build Requests').parent().find('button').click(); }); }); diff --git a/cypress/integration/factory/viewer.spec.ts b/cypress/integration/factory/viewer.spec.ts new file mode 100644 index 0000000..792c1af --- /dev/null +++ b/cypress/integration/factory/viewer.spec.ts @@ -0,0 +1,19 @@ +context('Factory', () => { + beforeEach(() => { + cy.visit('http://localhost:3000'); + }); + + it('can click in center of factory view', () => { + cy.get('canvas').click('center'); + }); + + it('can orbit camera of factory view', () => { + cy.get('canvas') + .trigger('mousedown', { button: 0 }) + .trigger('mousemove', { + clientX: 550, + clientY: 250, + }) + .trigger('mouseup', { force: true }); + }); +}); diff --git a/cypress/integration/market/market.spec.ts b/cypress/integration/market/market.spec.ts index 684b5be..748d46e 100644 --- a/cypress/integration/market/market.spec.ts +++ b/cypress/integration/market/market.spec.ts @@ -4,14 +4,13 @@ context('Market', () => { }); it('get the first build request summary', () => { - cy.wait(100); - cy.contains('Build Request'); + cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting + cy.contains('Build Request'); }); it('bid on first build request summary', () => { // Act - cy.wait(100); - cy.contains('Build Request').parent().find('button').click(); + cy.wait(100); // eslint-disable-line cypress/no-unnecessary-waiting + cy.contains('Build Request').parent().find('button').click(); }); - }); diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 447666f..0cbfffb 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,12 +1,10 @@ { - "compilerOptions": { - "strict": true, - "baseUrl": "../node_modules", - "target": "es5", - "lib": ["es5", "dom"], - "types": ["cypress"] - }, - "include": [ - "**/*.ts" - ] - } \ No newline at end of file + "compilerOptions": { + "strict": true, + "baseUrl": "../node_modules", + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress"] + }, + "include": ["**/*.ts"] +}