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

screenWidth results with wrong images #73

Closed
amitaibu opened this Issue May 5, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@amitaibu
Contributor

amitaibu commented May 5, 2015

screenWidth property on two different tests results with the all the files to have the images of the first test.

describe('Search engine tests', function() {

  this.timeout(99999999);
  var client = {};

  before(function(done){
    client = shoovWebdrivercss.before(done, caps);
  });

  after(function(done) {
    shoovWebdrivercss.after(done);
  });

  it('should show the Google main search page',function(done) {
    client
      .url('https://www.google.com/?gfe_rd=cr&ei=ku8bVbG3K-SG8QeFmICQDg&gws_rd=cr&fg=1')
      .webdrivercss(testName, {
        name: 'google',
        screenWidth: [320,640,960]
      }, shoovWebdrivercss.processResults)
      .call(done);

  });

  it('should show the DuckDuckGo main search page',function(done) {
    client
      .url('https://duckduckgo.com/')
      .webdrivercss(testName, {
        name: 'duckduck',
        screenWidth: [320,640,960]
      }, shoovWebdrivercss.processResults)
      .call(done);

  });
});

So in the above example the duckduck images are actually showing the google images

@christian-bromann

This comment has been minimized.

Show comment
Hide comment
@christian-bromann

christian-bromann May 11, 2015

Contributor

The problem here is that you are using the same pageName. If you execute the webdrivercss command with the same pageName, it remembers whether or not that page got captured with given screen size. If so it reuses that image.

Contributor

christian-bromann commented May 11, 2015

The problem here is that you are using the same pageName. If you execute the webdrivercss command with the same pageName, it remembers whether or not that page got captured with given screen size. If so it reuses that image.

@amitaibu

This comment has been minimized.

Show comment
Hide comment
@amitaibu

amitaibu May 11, 2015

Contributor

The name is different (google and duckduck). If I remove the screenWidth then the results are as expected.

Contributor

amitaibu commented May 11, 2015

The name is different (google and duckduck). If I remove the screenWidth then the results are as expected.

@christian-bromann

This comment has been minimized.

Show comment
Hide comment
@christian-bromann

christian-bromann May 11, 2015

Contributor

oh sorry I was a bit unclear. You need to change testName in your duckduckgo test. As I said it doesn't take you screenshots because if you use the same page name it assumes that it already took a capture of that page.

Contributor

christian-bromann commented May 11, 2015

oh sorry I was a bit unclear. You need to change testName in your duckduckgo test. As I said it doesn't take you screenshots because if you use the same page name it assumes that it already took a capture of that page.

@amitaibu

This comment has been minimized.

Show comment
Hide comment
@amitaibu

amitaibu May 11, 2015

Contributor

But that seems to happen only with the screenWidth, as otherwise it will produce correct baseline names (assuming testName == default):

default.google.baseline.png
default.duckduckgo.baseline.png
Contributor

amitaibu commented May 11, 2015

But that seems to happen only with the screenWidth, as otherwise it will produce correct baseline names (assuming testName == default):

default.google.baseline.png
default.duckduckgo.baseline.png
@christian-bromann

This comment has been minimized.

Show comment
Hide comment
@christian-bromann

christian-bromann May 11, 2015

Contributor

This is intentional since capturing multiple screen sizes can consume a lot of time.

Contributor

christian-bromann commented May 11, 2015

This is intentional since capturing multiple screen sizes can consume a lot of time.

@amitaibu

This comment has been minimized.

Show comment
Hide comment
@amitaibu

amitaibu May 11, 2015

Contributor

Ok thanks - I'll add a comment to the README to clarify this.

Contributor

amitaibu commented May 11, 2015

Ok thanks - I'll add a comment to the README to clarify this.

@christian-bromann

This comment has been minimized.

Show comment
Hide comment
@christian-bromann

christian-bromann May 11, 2015

Contributor

👍

Contributor

christian-bromann commented May 11, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment