Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(atomic): migrate to Tailwindcss v3 #1718

Merged
merged 5 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/atomic/cypress/fixtures/test-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class TestFixture {
private translations: Record<string, string> = {};
private responseModifiers: SearchResponseModifierPredicate[] = [];
private returnError = false;
private redirected = false;

public with(feat: TestFeature) {
feat(this);
Expand Down Expand Up @@ -77,6 +78,11 @@ export class TestFixture {
return this;
}

public withRedirection() {
this.redirected = true;
return this;
}

public withFieldCaptions(field: string, captions: Record<string, string>) {
this.fieldCaptions.push({field, captions});
return this;
Expand Down Expand Up @@ -118,7 +124,8 @@ export class TestFixture {
}

public init() {
cy.visit(buildTestUrl(this.hash)).injectAxe();
!this.redirected && cy.visit(buildTestUrl(this.hash));
cy.injectAxe();
this.intercept();
this.stubConsole();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Standalone Search Box Test Suites', () => {
}

function setupStandardSearchBox() {
new TestFixture().with(addSearchBox()).init();
new TestFixture().withRedirection().with(addSearchBox()).init();
}

it('should redirect to the default url when a search is submitted', () => {
Expand All @@ -41,8 +41,8 @@ describe('Standalone Search Box Test Suites', () => {

describe('when being redirected to an Atomic Search Interface after submitting a query', () => {
const query = 'hello';
before(() => {
setupStandaloneSearchBox('/test.html');
beforeEach(() => {
setupStandaloneSearchBox();
SearchBoxSelectors.inputBox().type(query);
SearchBoxSelectors.submitButton().click();
setupStandardSearchBox();
Expand All @@ -54,8 +54,8 @@ describe('Standalone Search Box Test Suites', () => {

describe('when being redirected to an Atomic Search Interface after selecting a suggestion', () => {
const query = 'awards';
before(() => {
setupStandaloneSearchBox('/test.html');
beforeEach(() => {
setupStandaloneSearchBox();
SearchBoxSelectors.inputBox().type(query);
SearchBoxSelectors.querySuggestions().eq(0).click();
setupStandardSearchBox();
Expand Down
Loading