Skip to content

Commit

Permalink
e2e selector fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sadanandpai committed Mar 30, 2024
1 parent e45a492 commit b326222
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cypress/e2e/path-finder/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ describe('path finder', () => {
});

it('should verify page header', () => {
cy.get('[data-testid="navbar"]').should('contain.html', 'Path Finder');
cy.get('[data-testid="title"]').should('be.visible');
cy.get('[data-testid="title"]').should('contain.html', 'Path Finder');
});

it('should verify the maze dropdowns', () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/sorting-visualizer/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ describe('landing page', () => {
});

it('should verify sorting', () => {
cy.get('[data-testid="navbar"]').should('be.visible');
cy.get('[data-testid="title"]').should('be.visible');

cy.get('[data-testid="navbar"]').should(
cy.get('[data-testid="title"]').should(
'contain.html',
'Sorting Visualizer'
);
Expand Down
13 changes: 13 additions & 0 deletions src/apps/path-finder/components/app-tour/app-tour.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@use '/src/host/styles/theme';

.tour {
border: 1px solid theme.$base;
padding: 2px 4px;
display: none;
}

@media (width >= 1024px) {
.tour {
display: block;
}
}
8 changes: 3 additions & 5 deletions src/apps/path-finder/components/app-tour/app-tour.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
import { useSetState } from 'react-use';
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
import classes from './app-tour.module.scss';
import mazeVideo from '/assets/maze.mp4';
import pathVideo from '/assets/path.mp4';

Expand Down Expand Up @@ -99,10 +100,7 @@ function AppTour() {
/>
</div>

<button
onClick={handleClickStart}
className="border border-gray-400 rounded px-1 mx-2 hover:border-gray-500"
>
<button onClick={handleClickStart} className={classes.tour}>
Take Tour
</button>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use '/src/host/styles/theme';

.cellInfo {
display: none;
gap: 20px;
Expand Down Expand Up @@ -41,4 +42,3 @@
display: flex;
}
}

0 comments on commit b326222

Please sign in to comment.